frac32.positive velocity
bool32.rising trigger
int32 channel
frac32.bipolar note (-64..63)
None
int ntrig;
int lastnote;
int channel;
ntrig = 0;
if ((inlet_trig > 0) && !ntrig) {
channel = inlet_channel - 1;
channel = channel & 15;
lastnote = (64 + (inlet_note >> 21)) & 0x7F;
PatchMidiInHandler(MIDI_DEVICE_INTERNAL, 0, MIDI_NOTE_ON + (channel),
lastnote, inlet_velo >> 20);
ntrig = 1;
}
if (!(inlet_trig > 0) && ntrig) {
PatchMidiInHandler((midi_device_t)0, 0, MIDI_NOTE_OFF + (channel), lastnote,
__USAT(inlet_velo >> 20, 7));
ntrig = 0;
}