Browse Source

Reset clock divider in MIDI-1 when MIDI Stop is received

tags/v0.6.1
Andrew Belt 6 years ago
parent
commit
8d72d318b3
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/Core/MIDIToCVInterface.cpp

+ 3
- 0
src/Core/MIDIToCVInterface.cpp View File

@@ -233,6 +233,7 @@ struct MIDIToCVInterface : Module {
clockPulses[1].trigger(1e-3); clockPulses[1].trigger(1e-3);
} }
if (++clock >= (24*16*16)) { if (++clock >= (24*16*16)) {
// Avoid overflowing the integer
clock = 0; clock = 0;
} }
} break; } break;
@@ -248,6 +249,8 @@ struct MIDIToCVInterface : Module {
// Stop // Stop
case 0xc: { case 0xc: {
stopPulse.trigger(1e-3); stopPulse.trigger(1e-3);
// Reset timing
clock = 0;
} break; } break;
default: break; default: break;
} }


Loading…
Cancel
Save