diff --git a/src/engine/engine.h b/src/engine/engine.h index 04cdd24c3..3a6d82b59 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -49,7 +49,7 @@ struct DivChannelState { int vibratoDepth, vibratoRate, vibratoPos, vibratoDir, vibratoFine; int tremoloDepth, tremoloRate, tremoloPos; unsigned char arp, arpStage, arpTicks; - bool doNote, legato, portaStop, keyOn, keyOff, nowYouCanStop, stopOnOff, arpYield, delayLocked, inPorta, scheduledSlideReset, shorthandPorta; + bool doNote, legato, portaStop, keyOn, keyOff, nowYouCanStop, stopOnOff, arpYield, delayLocked, inPorta, scheduledSlideReset, shorthandPorta, noteOnInhibit; DivChannelState(): note(-1), @@ -88,7 +88,8 @@ struct DivChannelState { delayLocked(false), inPorta(false), scheduledSlideReset(false), - shorthandPorta(false) {} + shorthandPorta(false), + noteOnInhibit(false) {} }; struct DivNoteEvent { diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index 52f40e391..4174c69f0 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -727,7 +727,7 @@ void DivEngine::processRow(int i, bool afterDelay) { } else { if (chan[i].inPorta && chan[i].keyOn && !chan[i].shorthandPorta) { chan[i].portaNote=chan[i].note; - } else { + } else if (!chan[i].noteOnInhibit) { dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,chan[i].note,chan[i].volume>>8)); } } @@ -747,6 +747,7 @@ void DivEngine::processRow(int i, bool afterDelay) { } chan[i].nowYouCanStop=true; chan[i].shorthandPorta=false; + chan[i].noteOnInhibit=false; // post effects for (int j=0; j