int32.positive b0
int32.positive b1
int32.positive b2
int32.positive b3
int32.positive b4
int32.positive b5
int32.positive b6
int32.positive b7
None
uint8_t in[8];
uint8_t prev[8];
uint8_t i;
uint8_t doit;
in[0] = inlet_b0;
in[1] = inlet_b1;
in[2] = inlet_b2;
in[3] = inlet_b3;
in[4] = inlet_b4;
in[5] = inlet_b5;
in[6] = inlet_b6;
in[7] = inlet_b7;
if (!doit) {
if (in[i] != prev[i]) {
prev[i] = in[i];
doit = i + 1;
}
i++;
i = i % 8;
}
if (doit && !MidiGetOutputBufferPending(MIDI_DEVICE_USB_HOST)) {
MidiSend3(MIDI_DEVICE_USB_HOST, 2, MIDI_CONTROL_CHANGE, doit + 19,
prev[doit - 1]);
doit = 0;
}