bend ch

Midi pitch bend input on specified channel
Author: Johannes Taelman
License: BSD
Github: midi/in/bend ch.axo

Inlets

None

Outlets

frac32.bipolar pitch bend, -64..64

bool32.pulse trigger output

Attributes

spinner channel

Declaration
int32_t _bend;
int32_t ntrig;
Init
_bend = 0;
ntrig = 0;
Control Rate
outlet_bend = _bend;
outlet_trig = ntrig;
ntrig = 0;
Midi Handler
if (status == MIDI_PITCH_BEND + attr_channel - 1) {
  _bend = ((int)((data2 << 7) + data1) - 0x2000) << 14;
  ntrig = 1;
}

Privacy

© 2024 Zrna Research