diff options
| author | Zach DeCook <zachdecook@librem.one> | 2024-06-15 11:49:40 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2024-06-15 11:49:40 -0400 |
| commit | 94bc7ae34373ac828a10d75c06d2d652a28aab5c (patch) | |
| tree | 2ede612f2191525062cfbb5502f82e70ba2ae744 /HexBoard.ino | |
| parent | b13d2f49c06c7213f3a88ccf41fd28d909221c16 (diff) | |
| download | HexBoard-94bc7ae34373ac828a10d75c06d2d652a28aab5c.tar.gz | |
Mono Synth mode: Don't switch notes when you release unheld note
Diffstat (limited to 'HexBoard.ino')
| -rw-r--r-- | HexBoard.ino | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/HexBoard.ino b/HexBoard.ino index ee7a6b9..5ba3893 100644 --- a/HexBoard.ino +++ b/HexBoard.ino @@ -1812,6 +1812,7 @@ return n; } void replaceMonoSynthWith(byte x) { + if (arpeggiatingNow == x) return; h[arpeggiatingNow].synthCh = 0; arpeggiatingNow = x; if (arpeggiatingNow != UNUSED_NOTE) { @@ -1879,7 +1880,9 @@ void trySynthNoteOff(byte x) { if (playbackMode && (playbackMode != SYNTH_POLY)) { - replaceMonoSynthWith(findNextHeldNote()); + if (arpeggiatingNow == x) { + replaceMonoSynthWith(findNextHeldNote()); + } } if (playbackMode == SYNTH_POLY) { if (h[x].synthCh) { @@ -1909,10 +1912,7 @@ if (playbackMode == SYNTH_ARPEGGIO) { if (runTime - arpeggiateTime > arpeggiateLength) { arpeggiateTime = runTime; - byte x = findNextHeldNote(); - if (x != arpeggiatingNow) { - replaceMonoSynthWith(x); - } + replaceMonoSynthWith(findNextHeldNote()); } } } |
