Menu with button support to switch wave tables
This commit is contained in:
+26
-1
@@ -7,14 +7,39 @@ extern volatile unsigned long lastLoop0Time;
|
||||
extern volatile unsigned long lastLoop1Time;
|
||||
extern volatile bool watchdogActive;
|
||||
|
||||
enum UIState {
|
||||
UI_MENU,
|
||||
UI_EDIT_SCALE_TYPE,
|
||||
UI_EDIT_SCALE_KEY,
|
||||
UI_EDIT_WAVETABLE
|
||||
};
|
||||
|
||||
struct Scale {
|
||||
const char* name;
|
||||
const float frequencies[8];
|
||||
const int semitones[8];
|
||||
int numNotes;
|
||||
};
|
||||
|
||||
struct MenuItem {
|
||||
const char* label;
|
||||
UIState editState;
|
||||
};
|
||||
|
||||
extern UIState currentState;
|
||||
extern const MenuItem MENU_ITEMS[];
|
||||
extern const int NUM_MENU_ITEMS;
|
||||
extern volatile int menuSelection;
|
||||
|
||||
extern const Scale SCALES[];
|
||||
extern const int NUM_SCALES;
|
||||
extern volatile int currentScaleIndex;
|
||||
|
||||
extern const char* KEY_NAMES[];
|
||||
extern const int NUM_KEYS;
|
||||
extern volatile int currentKeyIndex;
|
||||
|
||||
extern const char* WAVETABLE_NAMES[];
|
||||
extern const int NUM_WAVETABLES;
|
||||
extern volatile int currentWavetableIndex;
|
||||
|
||||
#endif // SHAREDSTATE_H
|
||||
Reference in New Issue
Block a user