diff --git a/Software/Gravity/Gravity.ino b/Software/Gravity/Gravity.ino index 67a76c3..207170b 100644 --- a/Software/Gravity/Gravity.ino +++ b/Software/Gravity/Gravity.ino @@ -84,6 +84,7 @@ unsigned int channelPulseCount[6]; unsigned int channelPulsesPerCycle[6]; byte sixteenthPulseCount = 0; int playingModes[6]; // should be renamed to currentSubdivs or something. Updated from channels object on beat and with applied CV modulation +int playingModesOld[6]; unsigned int pulsePeriod; bool isPlaying = false; @@ -257,8 +258,9 @@ void externalClock() { void sendTriggers() { for (byte i = 0; i < 6; i++) { - if (playingModes[i] != subDivs[channels[i].subDiv]) { + if (playingModes[i] != subDivs[channels[i].subDiv] && playingModesOld[i] != playingModes[i]) { needPulseReset[i] = true; + playingModesOld[i] = playingModes[i]; } }