monitor

provides in-patcher information about incoming midi-data
Author: robert schirmer
License: BSD
Github: rbrt/midi/in/monitor.axo

Inlets

None

Outlets

None

Displays

int32.label note

int32.label velocity

int32.label cc

int32.label value

bool32 gate

Declaration
uint8_t gate;
uint8_t note;
uint8_t velo;
uint8_t cc;
uint8_t ccindex;
Control Rate
disp_note = note;
disp_velocity = velo;
disp_gate = gate;
disp_cc = ccindex;
disp_value = cc;
Midi Handler
if ((status == MIDI_NOTE_ON + attr_midichannel) && (data2)) {
  gate = 1;
  velo = data2;
  note = data1;
}
if (((status == MIDI_NOTE_ON + attr_midichannel) && (!data2)) ||
    (status == MIDI_NOTE_OFF + attr_midichannel))
  gate = 0;

if (status == attr_midichannel + MIDI_CONTROL_CHANGE) {
  cc = data2;
  ccindex = data1;
}

Privacy

© 2024 Zrna Research