From a6be0a192524433397f320524e8e5fdf54c9c86d Mon Sep 17 00:00:00 2001 From: techmetx11 Date: Sat, 13 Apr 2024 20:04:43 +0000 Subject: [PATCH] Fix arpeggio --- src/engine/playback.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index f784dd707..66857bbc4 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -1138,24 +1138,24 @@ void DivEngine::processRow(int i, bool afterDelay) { dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,DIV_NOTE_NULL)); } - if (song.resetEffectsOnRowChange) { - if (chan[i].lastArp) { - chan[i].lastArp=0; - } else { - chan[i].arp=0; - dispatchCmd(DivCommand(DIV_CMD_HINT_ARPEGGIO,i,chan[i].arp)); - } - - if (chan[i].lastVibrato2) { - chan[i].lastVibrato2=0; - } else { - chan[i].vibratoDepth=0; - chan[i].vibratoRate=0; - dispatchCmd(DivCommand(DIV_CMD_HINT_VIBRATO,i,chan[i].vibratoDepth,chan[i].vibratoRate)); - } - } - if (chan[i].doNote) { + if (song.resetEffectsOnRowChange) { + if (chan[i].lastArp) { + chan[i].lastArp=0; + } else { + chan[i].arp=0; + dispatchCmd(DivCommand(DIV_CMD_HINT_ARPEGGIO,i,chan[i].arp)); + } + + if (chan[i].lastVibrato2) { + chan[i].lastVibrato2=0; + } else { + chan[i].vibratoDepth=0; + chan[i].vibratoRate=0; + dispatchCmd(DivCommand(DIV_CMD_HINT_VIBRATO,i,chan[i].vibratoDepth,chan[i].vibratoRate)); + } + } + if (!song.continuousVibrato) { chan[i].vibratoPos=0; }