Skip to content

Commit

Permalink
Fixed couple of arpeggiator bugs (#1561)
Browse files Browse the repository at this point in the history
Two birds with one stone:
- Fixed: Dotted arp rates can produce stuck notes if changing Rhythm from one length to another #1544
- Fixed: Arpeggiator not working correctly in Kits #1558
  • Loading branch information
soymonitus authored and m-m-adams committed Mar 23, 2024
1 parent 357c65b commit 28338e2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/deluge/modulation/arpeggiator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ void ArpeggiatorForDrum::switchNoteOn(ArpeggiatorSettings* settings, ArpReturnIn
// Move indexes to the next note in the sequence
calculateNextOctave(settings);

// As we have set a note and an octave, we can say we have played a note
playedFirstArpeggiatedNoteYet = true;

// Save last note played from rhythm
lastNormalNotePlayedFromRhythm = notesPlayedFromRhythm;
}
Expand Down Expand Up @@ -515,7 +518,6 @@ void ArpeggiatorForDrum::switchNoteOn(ArpeggiatorSettings* settings, ArpReturnIn
}
else {
// Rhythm silence: Don't play the note
noteCodeCurrentlyOnPostArp = ARP_NOTE_NONE;
instruction->noteCodeOffPostArp = ARP_NOTE_NONE;
instruction->noteCodeOnPostArp = ARP_NOTE_NONE;
}
Expand Down Expand Up @@ -624,9 +626,6 @@ void Arpeggiator::calculateNextNoteAndOrOctave(ArpeggiatorSettings* settings) {
}
}
}

// As we have set a note and an octave, we can say we have played a note
playedFirstArpeggiatedNoteYet = true;
}

// Set initial values for note and octave
Expand Down Expand Up @@ -697,6 +696,9 @@ void Arpeggiator::switchNoteOn(ArpeggiatorSettings* settings, ArpReturnInstructi
// Move indexes to the next note in the sequence
calculateNextNoteAndOrOctave(settings);

// As we have set a note and an octave, we can say we have played a note
playedFirstArpeggiatedNoteYet = true;

// Save last note played from rhythm
lastNormalNotePlayedFromRhythm = notesPlayedFromRhythm;
}
Expand Down Expand Up @@ -741,7 +743,6 @@ void Arpeggiator::switchNoteOn(ArpeggiatorSettings* settings, ArpReturnInstructi
}
else {
// Rhythm silence: Don't play the note
noteCodeCurrentlyOnPostArp = ARP_NOTE_NONE;
instruction->noteCodeOffPostArp = ARP_NOTE_NONE;
instruction->noteCodeOnPostArp = ARP_NOTE_NONE;
}
Expand Down

0 comments on commit 28338e2

Please sign in to comment.