From 4561ded2d4132cfdb76fa40e78e976d293021b71 Mon Sep 17 00:00:00 2001 From: "[poww10s]" <[theironminer@gmail.com]> Date: Sat, 5 Sep 2020 06:06:24 -0400 Subject: [PATCH] add barebones defaultPatch --- src/components/PatchEditorComponent.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/PatchEditorComponent.js b/src/components/PatchEditorComponent.js index b6f1d6e..148d261 100644 --- a/src/components/PatchEditorComponent.js +++ b/src/components/PatchEditorComponent.js @@ -1,7 +1,23 @@ import React, { useState, useEffect } from "react"; function PatchEditorComponent() { - const [patch, updatePatch] = useState(null); + const defaultPatch = { + name: "", + arpeggio: { length: 8, pattern: [0, 0, 0, 0, 0, 0, 0, 0] }, + voiceMode: 0, + scaleKey: 0, // C + scaleType: 0, // Equal Temperment + delayFX: { sync: false, timeBase: 5, delayTime: 0, depth: 0, type: 0 }, + modFX: { lfoSpeed: 0, depth: 0, type: 0 }, + eq: { hiFreq: 0, hiGain: 0, lowFreq: 0, lowGain: 0 }, + arpeggio2: {}, + octave: 0, //this is a 7 bit number so -1 is 127 and -3 is 125 + synthParameter1: {}, // only use this one in single voice mode + synthParameter2: {}, // use this and the previous in multi voice mode + synthParameter3: {}, // this is for vocoder mode + }; + + const [patch, updatePatch] = useState(defaultPatch); useEffect( {