cc hr i

Receives Midi Continuous Controller messages, 14 bit, float output
Author: Mark Harris
License: BSD
Github: midi/in/cc hr i.axo

Inlets

None

Outlets

frac32.positive midi CC 0.0-64.0

bool32.pulse trigger output

Attributes

spinner cc

spinner default

Declaration
uint32_t ccl;
uint32_t _ccv;
uint8_t ntrig;
Init
_ccv = attr_default << 20;
ccl = 0;
ntrig = 0;
Control Rate
outlet_midiCC = _ccv;
outlet_trig = ntrig;
ntrig = 0;
Midi Handler
if ((status == attr_midichannel + MIDI_CONTROL_CHANGE) && (data1 == attr_cc)) {
  _ccv = (data2 << 20) + ccl;
  ntrig = 1;
} else if ((status == attr_midichannel + MIDI_CONTROL_CHANGE) &&
           (data1 == (attr_cc + 32))) {
  ccl = data2 << 13;
}

Privacy

© 2024 Zrna Research