begin EditorComponent refactor

This commit is contained in:
[poww10s]
2020-09-09 04:03:36 -04:00
parent 20d2cec60a
commit 3ef7bed3a6
+32 -3
View File
@@ -1,6 +1,6 @@
import React from "react"; import React, { useEffect, useState } from "react";
import { NameInput } from "./InputComponents.js"; import NameInput from "./InputComponents.js";
import { createMuiTheme, ThemeProvider } from "@material-ui/styles"; import { createMuiTheme, ThemeProvider } from "@material-ui/core/styles";
import Box from "@material-ui/core/Box"; import Box from "@material-ui/core/Box";
import { deepPurple } from "@material-ui/core/colors"; import { deepPurple } from "@material-ui/core/colors";
@@ -14,8 +14,37 @@ const theme = createMuiTheme({
}); });
function EditorComponent(props) { function EditorComponent(props) {
const defaultSettings = {
name: "",
arpeggio: { length: 8, pattern: [0, 0, 0, 0, 0, 0, 0, 0] },
arpeggio2: {
tempo: 20,
seq: 0,
on: false,
latch: false,
target: 0,
keySync: false,
type: 0, // 0 - 5
range: 0, // 0 - 4
gate: 0, // 0 - 100
resolution: 0,
swing: 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 },
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 = props.patch; const patch = props.patch;
const [settings, setSettings] = useState();
if (!props.show) { if (!props.show) {
return null; return null;
} }