Song progression

This commit is contained in:
Dejvino
2026-03-07 21:27:08 +01:00
parent bbe6c4ff2f
commit 99add4e2ac
8 changed files with 268 additions and 68 deletions
+26 -1
View File
@@ -10,6 +10,25 @@ struct Step {
bool tie;
};
struct ChordStep {
int8_t rootOffset; // Semitones relative to key
int8_t scaleType; // Scale type index
uint8_t repeats; // Number of repetitions
};
#define MAX_PROG_STEPS 12
struct ChordProgression {
const char* name;
int length;
ChordStep steps[MAX_PROG_STEPS]; // Max 12 steps
};
enum ProgressionOrder {
PROG_ORDER_SEQUENCE,
PROG_ORDER_RANDOM
};
enum PlayMode {
MODE_MONO,
MODE_POLY
@@ -24,7 +43,13 @@ enum UIState {
UI_EDIT_INTENSITY,
UI_SETUP_PLAYMODE_EDIT,
UI_RANDOMIZE_TRACK_EDIT,
UI_EDIT_ROOT
UI_EDIT_ROOT,
UI_EDIT_PROG_ORDER,
UI_EDIT_PROG_TEMPLATE,
UI_EDIT_PROG_LENGTH,
UI_EDIT_PROG_STEP_ROOT,
UI_EDIT_PROG_STEP_TYPE,
UI_EDIT_PROG_STEP_REPS
};
inline void sortArray(int arr[], int size) {