touch

Midi channel pressure input
Author: Johannes Taelman
License: BSD
Github: midi/in/touch.axo

Inlets

None

Outlets

frac32.positive channel pressure, 0..64

bool32.pulse trigger output

Declaration
int32_t _press;
int32_t ntrig;
Init
_press = 0;
ntrig = 0;
Control Rate
outlet_o = _press;
outlet_trig = ntrig;
ntrig = 0;
Midi Handler
if (status == MIDI_CHANNEL_PRESSURE + attr_midichannel) {
  _press = (data1) << 20;
  ntrig = 1;
}

Privacy

© 2024 Zrna Research