cc any disp

Receives Midi Continuous Controller messages from any CC number and channel. Instead of outlets with display_cc
Author: Johannes Taelman
License: BSD
Github: phi/midi/in/cc any disp.axo

Inlets

None

Outlets

None

Displays

frac32.u.dial value

int32.label cc

int32.label channel

bool32 trig

Declaration
int32_t value;
int32_t cc;
int32_t channel;
int32_t ntrig;
Init
cc = 0;
channel = 1;
value = 0;
ntrig = 0;
Control Rate
disp_value = value;
disp_cc = cc;
disp_channel = channel;
disp_trig = ntrig;
ntrig = 0;
Midi Handler
if ((status & 0xF0) == MIDI_CONTROL_CHANGE) {
  value = data2 << 20;
  ;
  cc = data1;
  channel = (status & 0x0F) + 1;
  ntrig = 1;
}

Privacy

© 2024 Zrna Research