Menu with button support to switch wave tables

This commit is contained in:
Dejvino
2026-02-27 06:48:19 +01:00
parent 59b48c1ab3
commit 34d15a7f1c
4 changed files with 196 additions and 42 deletions
+26 -1
View File
@@ -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