Browse Source

MIDI-CV: Handle MIDI Song Position Pointer message by setting clock position. Don't reset clock position on MIDI Stop message.

tags/v2.0.6
Andrew Belt 2 years ago
parent
commit
f93a6dd82a
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/core/MIDI_CV.cpp

+ 5
- 1
src/core/MIDI_CV.cpp View File

@@ -256,6 +256,11 @@ struct MIDI_CV : Module {

void processSystem(const midi::Message &msg) {
switch (msg.getChannel()) {
// Song Position Pointer
case 0x2: {
int32_t pos = int32_t(msg.getNote()) | (int32_t(msg.getValue()) << 7);
clock = pos * 6;
} break;
// Timing
case 0x8: {
clockPulse.trigger(1e-3);
@@ -276,7 +281,6 @@ struct MIDI_CV : Module {
// Stop
case 0xc: {
stopPulse.trigger(1e-3);
clock = 0;
} break;
default: break;
}


Loading…
Cancel
Save