diff --git a/src/PianoRoll/PianoRollModule.cpp b/src/PianoRoll/PianoRollModule.cpp index c0b25b5..23594e3 100644 --- a/src/PianoRoll/PianoRollModule.cpp +++ b/src/PianoRoll/PianoRollModule.cpp @@ -89,14 +89,20 @@ void PianoRollModule::step() { } bool clockTick = false; - + float currentClockLevel = 0.f; + while((int)clockBuffer.size() > clockDelay) { - clockTick = clockInputTrigger.process(clockBuffer.shift()); + currentClockLevel = clockBuffer.shift(); + clockTick |= clockInputTrigger.process(currentClockLevel); } if (runInputTrigger.process(inputs[RUN_INPUT].value)) { transport.toggleRun(); + if (currentClockLevel > 1.f) { + clockTick = true; + } + if (!transport.isRunning()) { gateOutputPulse.reset(); }