Better arp

This commit is contained in:
Dejvino
2026-02-17 00:49:17 +01:00
parent 6734572a67
commit 225d04a53c
6 changed files with 146 additions and 64 deletions
+8 -16
View File
@@ -146,7 +146,11 @@ void UIManager::drawMenu(const char* title, const char* items[], int count, int
display.print(F(" *"));
}
if (currentState == UI_MENU_RANDOMIZE) {
if (i == 1) { // Scale
if (i == 1) { // Melody
display.print(F(": ")); display.print(melodySeed);
} else if (i == 2) { // Flavour
display.print(F(": ")); display.print(flavourName);
} else if (i == 3) { // Scale
display.print(F(": "));
if (numScaleNotes > 0) {
const char* noteNames[] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"};
@@ -155,9 +159,7 @@ void UIManager::drawMenu(const char* title, const char* items[], int count, int
if (j < min(numScaleNotes, 6) - 1) display.print(F(" "));
}
}
} else if (i == 2) { display.print(F(": ")); display.print(melodySeed); }
else if (i == 3) { display.print(F(": ")); display.print(flavourName); }
else if (i == 4) { display.print(F(": ")); display.print(tempo); }
} else if (i == 4) { display.print(F(": ")); display.print(tempo); }
else if (i == 5) { display.print(F(": ")); display.print(mutationEnabled ? F("ON") : F("OFF")); }
else if (i == 6) { display.print(F(": ")); display.print(songModeEnabled ? F("ON") : F("OFF")); }
}
@@ -245,23 +247,13 @@ void UIManager::updateLeds(const Step* sequence, int navSelection, int playbackS
else { c[1] = color; if (sequence[s].accent) { c[0] = dimColor; c[2] = dimColor; } }
}
int stepNavIndex = navSelection - 1;
if (isPlaying) {
c[3] = pixels.Color(0, 50, 0);
if (songModeEnabled && s >= NUM_STEPS/2 && x >= (8 - min(songRepeatsRemaining, 8))) {
c[3] = (songRepeatsRemaining == 1 && x == 7 && (millis()/250)%2) ? pixels.Color(0, 250, 0) : pixels.Color(80, 100, 0);
}
} else if (currentState == UI_TRACKER && s == stepNavIndex) {
c[3] = isEditing ? pixels.Color(50, 0, 0) : pixels.Color(40, 40, 40);
} else if (c[3] == 0 && (isPlaying && s == playbackStep || (!isPlaying && currentState == UI_TRACKER && s == stepNavIndex))) {
// Cursor logic handled above, this block seems redundant or malformed in original logic translation, simplifying:
}
// Apply cursor color logic from original code more strictly
uint32_t cursorColor = 0;
if (isPlaying) {
cursorColor = pixels.Color(0, 50, 0);
if (songModeEnabled && s >= 56) {
if (songModeEnabled && s >= 8) {
int repeats = min(songRepeatsRemaining, 8);
if (x >= (8 - repeats)) cursorColor = (songRepeatsRemaining == 1 && x == 7 && (millis()/250)%2) ? pixels.Color(255, 200, 0) : pixels.Color(154, 205, 50);
if (x >= (8 - repeats)) cursorColor = (songRepeatsRemaining == 1 && x == 7 && (millis()/250)%2) ? pixels.Color(255, 200, 0) : pixels.Color(100, 220, 40);
}
} else if (currentState == UI_TRACKER) {
cursorColor = isEditing ? pixels.Color(50, 0, 0) : pixels.Color(40, 40, 40);