Chance setting
This commit is contained in:
+4
-1
@@ -133,7 +133,10 @@ static void handlePlayback() {
|
||||
// If tied to the SAME note, do not retrigger (sustain)
|
||||
bool isContinuing = wasTied && (prevNote == currentNote) && !justPanicked;
|
||||
|
||||
if (!trackMute[t] && currentNote != -1 && !isContinuing) {
|
||||
// Check chance
|
||||
bool shouldPlay = (random(100) < trackChance[t]);
|
||||
|
||||
if (!trackMute[t] && currentNote != -1 && !isContinuing && shouldPlay) {
|
||||
uint8_t velocity = local_sequence[t][current_step].accent ? 127 : 100;
|
||||
midi.sendNoteOn(currentNote, velocity, trackChannel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user