bool32.risingfalling g0
bool32.risingfalling g1
frac32.positive velon
frac32.positive veloff
int32 startnote
None
int32 startnote
combo device
spinner channel
spinner velon
spinner veloff
uint8_t prev0;
uint8_t prev1;
uint8_t prev2;
uint8_t prev3;
uint8_t vel;
uint8_t velon;
uint8_t veloff;
uint8_t startnote;
velon = attr_velon + (inlet_velon >> 20);
veloff = attr_veloff + (inlet_veloff >> 20);
startnote = param_startnote + inlet_startnote;
if (inlet_g0 != prev0) {
vel = inlet_g0 ? velon : veloff;
MidiSend3((midi_device_t)attr_device, MIDI_NOTE_ON + (attr_channel - 1),
startnote, vel);
prev0 = inlet_g0;
}
if (inlet_g1 != prev1) {
vel = inlet_g1 ? velon : veloff;
MidiSend3((midi_device_t)attr_device, MIDI_NOTE_ON + (attr_channel - 1),
startnote + 1, vel);
prev1 = inlet_g1;
}