touch omni

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

Inlets

None

Outlets

bool32.pulse trigger output

frac32.positive channel pressure, 0..64

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 & 0xF0) == MIDI_CHANNEL_PRESSURE) {
  _press = (data1) << 20;
  ntrig = 1;
}

Privacy

© 2024 Zrna Research