clockthru

Midi clock thru
Author: Remco van der Most
License: BSD
Github: sss/midi/out/clockthru.axo

Inlets

None

Outlets

None

Attributes

combo device

Declaration
int32_t _active;
int32_t _pos;
int32_t _pos_shadow;
Init
_active = 0;
_pos = 0;
_pos_shadow = 0;
Midi Handler
if (status == MIDI_TIMING_CLOCK) {
  if (_pos < 1) {
    MidiSend1((midi_device_t)attr_device, MIDI_TIMING_CLOCK);
  }
  _pos = (_pos + 1) % 3;
} else if (status == MIDI_START) {
  MidiSend1((midi_device_t)attr_device, MIDI_START);
} else if (status == MIDI_STOP) {
  MidiSend1((midi_device_t)attr_device, MIDI_STOP);
} else if (status == MIDI_CONTINUE) {
  MidiSend1((midi_device_t)attr_device, MIDI_CONTINUE);
}

Privacy

© 2024 Zrna Research