From 3ef7bed3a63852e9e4fbe44c105ae51a037c2b33 Mon Sep 17 00:00:00 2001 From: "[poww10s]" <[theironminer@gmail.com]> Date: Wed, 9 Sep 2020 04:03:36 -0400 Subject: [PATCH] begin EditorComponent refactor --- src/components/EditorComponent.js | 35 ++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/src/components/EditorComponent.js b/src/components/EditorComponent.js index f068bcf..11ead06 100644 --- a/src/components/EditorComponent.js +++ b/src/components/EditorComponent.js @@ -1,6 +1,6 @@ -import React from "react"; -import { NameInput } from "./InputComponents.js"; -import { createMuiTheme, ThemeProvider } from "@material-ui/styles"; +import React, { useEffect, useState } from "react"; +import NameInput from "./InputComponents.js"; +import { createMuiTheme, ThemeProvider } from "@material-ui/core/styles"; import Box from "@material-ui/core/Box"; import { deepPurple } from "@material-ui/core/colors"; @@ -14,8 +14,37 @@ const theme = createMuiTheme({ }); 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 [settings, setSettings] = useState(); + if (!props.show) { return null; }