Map CC 2-11 to pads 0-9 for Loopy Pro LED feedback

This commit is contained in:
2026-06-24 05:56:58 +00:00
parent 550fb7616e
commit b5a1710ebd
+6 -3
View File
@@ -80,9 +80,12 @@ void AppTask::process_midi_event(const MidiEvent& event) {
uint8_t cc_num = event.data1; uint8_t cc_num = event.data1;
uint8_t cc_val = event.data2; uint8_t cc_val = event.data2;
// Map CC number to pad index (CC 0-9 for pads 0-9, or CC 36-45 for notes 36-45) // Map CC number to pad index
// Try both mappings // Loopy Pro: CC2=pixel0, CC3=pixel1, ... CC11=pixel9
if (cc_num < NUM_PADS) { // Also try CC 0-9 and CC 36-45 for compatibility
if (cc_num >= 2 && cc_num < 2 + NUM_PADS) {
led_index = cc_num - 2; // CC 2-11 -> pads 0-9
} else if (cc_num < NUM_PADS) {
led_index = cc_num; // CC 0-9 led_index = cc_num; // CC 0-9
} else if (cc_num >= 36 && cc_num < 36 + NUM_PADS) { } else if (cc_num >= 36 && cc_num < 36 + NUM_PADS) {
led_index = cc_num - 36; // CC 36-45 led_index = cc_num - 36; // CC 36-45