None
int32 note on note-on
bool32.pulse pulse on note-on
bool32 any notes on hold?
spinner startNote
spinner endNote
int8_t _note;
uint8_t count;
bool trigon;
_note = 0;
outlet_noteOn = trigon;
outlet_note = _note;
trigon = 0;
outlet_gate = bool(count);
if ((status == MIDI_NOTE_ON + attr_midichannel) && (data2)) {
if ((data1 >= attr_startNote) && (data1 <= attr_endNote)) {
trigon = 1;
count += 1;
_note = data1;
}
}
if (((status == MIDI_NOTE_ON + attr_midichannel) && (!data2)) ||
(status == MIDI_NOTE_OFF + attr_midichannel)) {
if ((data1 >= attr_startNote) && (data1 <= attr_endNote)) {
if (count)
count -= 1;
}
} else if ((status == attr_midichannel + MIDI_CONTROL_CHANGE) &&
(data1 == MIDI_C_ALL_NOTES_OFF)) {
count = 0;
}