Root note and bitmap of scale types
This commit is contained in:
@@ -110,6 +110,39 @@ void UIManager::draw(UIState currentState, int menuSelection,
|
||||
display.setCursor(0, 50);
|
||||
display.println(F(" (Press to confirm)"));
|
||||
break;
|
||||
case UI_EDIT_ROOT:
|
||||
display.println(F("SET ROOT NOTE"));
|
||||
display.drawLine(0, 8, 128, 8, SSD1306_WHITE);
|
||||
display.setCursor(20, 25);
|
||||
display.setTextSize(2);
|
||||
{
|
||||
const char* noteNames[] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"};
|
||||
display.print(noteNames[currentRoot % 12]);
|
||||
}
|
||||
display.setTextSize(1);
|
||||
display.setCursor(0, 50);
|
||||
display.println(F(" (Press to confirm)"));
|
||||
break;
|
||||
case UI_EDIT_SCALE_TYPE:
|
||||
display.println(F("ENABLED SCALES"));
|
||||
display.drawLine(0, 8, 128, 8, SSD1306_WHITE);
|
||||
display.setCursor(0, 20);
|
||||
if (menuSelection < 10) {
|
||||
const char* typeNames[] = {"Chrom", "Major", "Minor", "H.Min", "P.Maj", "P.Min", "ChdMaj", "ChdMin", "ChdDim", "Chd7"};
|
||||
display.setTextSize(2);
|
||||
display.print(typeNames[menuSelection]);
|
||||
display.setTextSize(1);
|
||||
display.setCursor(0, 45);
|
||||
bool isEnabled = (enabledScaleTypes & (1 << menuSelection));
|
||||
display.print(isEnabled ? F("[ENABLED]") : F("[DISABLED]"));
|
||||
} else {
|
||||
display.setTextSize(2);
|
||||
display.print(F("Back"));
|
||||
}
|
||||
display.setTextSize(1);
|
||||
display.setCursor(0, 55);
|
||||
display.println(F(" (Press to toggle)"));
|
||||
break;
|
||||
case UI_EDIT_INTENSITY:
|
||||
drawNumberEditor("SET INTENSITY", trackIntensities[randomizeTrack], 1, 10);
|
||||
break;
|
||||
@@ -294,6 +327,14 @@ void UIManager::drawMenu(int selection, UIState currentState, int midiChannel, i
|
||||
}
|
||||
}
|
||||
} else if (id == MENU_ID_TEMPO) { display.print(F(": ")); display.print(tempo); }
|
||||
else if (id == MENU_ID_ROOT) {
|
||||
const char* noteNames[] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"};
|
||||
display.print(F(": ")); display.print(noteNames[currentRoot % 12]);
|
||||
}
|
||||
else if (id == MENU_ID_SCALE_TYPE) {
|
||||
const char* typeNames[] = {"Chrom", "Major", "Minor", "H.Min", "P.Maj", "P.Min", "ChdMaj", "ChdMin", "ChdDim", "Chd7"};
|
||||
display.print(F(": ")); if (currentScaleType >= 0 && currentScaleType < 10) display.print(typeNames[currentScaleType]);
|
||||
}
|
||||
else if (id == MENU_ID_STEPS) { display.print(F(": ")); display.print(currentTrackNumSteps); }
|
||||
else if (id == MENU_ID_SONG_MODE) { display.print(F(": ")); display.print(songModeEnabled ? F("ON") : F("OFF")); }
|
||||
else if (id == MENU_ID_TRACK_SELECT) { display.print(F(": ")); display.print(randomizeTrack + 1); }
|
||||
|
||||
Reference in New Issue
Block a user