Melody randomizes tracks length
This commit is contained in:
parent
27fd42442c
commit
84ef40a555
@ -62,13 +62,12 @@ void setup() {
|
|||||||
EEPROM.begin(4096);
|
EEPROM.begin(4096);
|
||||||
if (!loadSequence()) {
|
if (!loadSequence()) {
|
||||||
Serial.println(F("Starting fresh instead."));
|
Serial.println(F("Starting fresh instead."));
|
||||||
for (int i = 0; i < NUM_TRACKS; i++) {
|
|
||||||
numSteps[i] = NUM_STEPS;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int i=0; i<NUM_TRACKS; i++) {
|
for(int i=0; i<NUM_TRACKS; i++) {
|
||||||
midiChannels[i] = i + 1;
|
midiChannels[i] = i + 1;
|
||||||
melodySeeds[i] = random(10000);
|
melodySeeds[i] = random(10000);
|
||||||
|
randomSeed(melodySeeds[i]);
|
||||||
|
numSteps[i] = random(1, NUM_STEPS + 1);
|
||||||
currentStrategyIndices[i] = 0;
|
currentStrategyIndices[i] = 0;
|
||||||
trackMute[i] = false;
|
trackMute[i] = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -387,6 +387,10 @@ static void handleInput() {
|
|||||||
case MENU_ID_MELODY:
|
case MENU_ID_MELODY:
|
||||||
midi.lock();
|
midi.lock();
|
||||||
melodySeeds[randomizeTrack] = random(10000);
|
melodySeeds[randomizeTrack] = random(10000);
|
||||||
|
randomSeed(melodySeeds[randomizeTrack]);
|
||||||
|
for (int i = 0; i < NUM_TRACKS; i++) {
|
||||||
|
numSteps[i] = random(1, NUM_STEPS + 1);
|
||||||
|
}
|
||||||
if (isPlaying) {
|
if (isPlaying) {
|
||||||
int theme = (queuedTheme != -1) ? queuedTheme : currentThemeIndex;
|
int theme = (queuedTheme != -1) ? queuedTheme : currentThemeIndex;
|
||||||
if (!sequenceChangeScheduled) {
|
if (!sequenceChangeScheduled) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user