MCPcopy Create free account
hub / github.com/VCVRack/Rack / processSystem

Method processSystem

include/dsp/midi.hpp:481–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479 }
480
481 void processSystem(const midi::Message& msg) {
482 switch (msg.getChannel()) {
483 // Song Position Pointer
484 case 0x2: {
485 int64_t pos = int64_t(msg.getNote()) | (int64_t(msg.getValue()) << 7);
486 clock = pos * 6;
487 } break;
488 // Timing
489 case 0x8: {
490 clockPulse.trigger(1e-3);
491 if (clock % clockDivision == 0) {
492 clockDividerPulse.trigger(1e-3);
493 }
494 clock++;
495 } break;
496 // Start
497 case 0xa: {
498 startPulse.trigger(1e-3);
499 clock = 0;
500 } break;
501 // Continue
502 case 0xb: {
503 continuePulse.trigger(1e-3);
504 } break;
505 // Stop
506 case 0xc: {
507 stopPulse.trigger(1e-3);
508 } break;
509 default: break;
510 }
511 }
512
513 uint8_t assignChannel(uint8_t note) {
514 if (channels <= 1)

Callers

nothing calls this directly

Calls 4

getNoteMethod · 0.80
triggerMethod · 0.80
getChannelMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected