Send CC instead of NOTE_ON for Loopy Pro generic mirror. Clean up flash_activity.
This commit is contained in:
+8
-8
@@ -126,18 +126,18 @@ void AppTask::process_switch_event(uint8_t switch_id, bool pressed) {
|
||||
for (uint8_t i = 0; i < NUM_PADS; i++) {
|
||||
if (pad_mapping[i].physical_switch == switch_id) {
|
||||
uint8_t channel = pad_mapping[i].midi_channel;
|
||||
// Loopy Pro Launchpad mode expects NOTE_ON/NOTE_OFF on notes 36-45
|
||||
uint8_t note = pad_mapping[i].midi_note;
|
||||
uint8_t velocity = pressed ? 127 : 0;
|
||||
// Loopy Pro Generic mode mirrors CC back on the same CC it received
|
||||
// CC2-11 maps to pads 0-9
|
||||
uint8_t cc_num = 2 + i;
|
||||
uint8_t value = pressed ? 127 : 0;
|
||||
|
||||
if (pressed) {
|
||||
midi_transport->send_note_on(channel, note, velocity);
|
||||
} else {
|
||||
midi_transport->send_note_off(channel, note, velocity);
|
||||
midi_transport->send_cc(channel, cc_num, value);
|
||||
}
|
||||
// Don't send CC 0 on release — Loopy Pro uses velocity 0 to turn off
|
||||
|
||||
Serial.printf("[APP] Switch %d -> Ch%d Note%d Vel%d (%s)\n",
|
||||
switch_id, channel, note, velocity,
|
||||
Serial.printf("[APP] Switch %d -> Ch%d CC%d Val%d (%s)\n",
|
||||
switch_id, channel, cc_num, value,
|
||||
pressed ? "PRESS" : "RELEASE");
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user