bend

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

Inlets

None

Outlets

frac32.bipolar pitch bend, -64..64

bool32.pulse trigger output

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_midichannel) {
  _bend = ((int)((data2 << 7) + data1) - 0x2000) << 14;
  ntrig = 1;
}

Privacy

© 2024 Zrna Research