None
None
combo device
uint8_t CC74[16];
for (int c = 0; c < 16; c++)
CC74[c] = 0;
if (dev != (midi_device_t)MIDI_DEVICE_INTERNAL) {
int channel = status & 0x0F;
// remember the latest CC74 for every channel
if ((status & 0xF0) == MIDI_CONTROL_CHANGE && data1 == 74) {
CC74[channel] = data2;
}
// Midi thru
if (status) {
PatchMidiInHandler((midi_device_t)attr_device, status, data1, data2);
}
// on note on, send the CC74 immediately after
if ((status & 0xF0) == MIDI_NOTE_ON && data2 != 0) {
// LogTextMessage("NoteOn ->CtrlChange ch%2D n%3D v%3D", 1 + channel, 74,
//CC74[channel]);
PatchMidiInHandler((midi_device_t)attr_device,
MIDI_CONTROL_CHANGE + channel, 74, CC74[channel]);
}
}