summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2023-06-28 18:44:05 +0200
committerBad Diode <bd@badd10de.dev>2023-06-28 18:44:05 +0200
commit10f0c0b60dee4b8bb4fb1685bc478ecdc5b526aa (patch)
tree4e2f596c15631201bd2bda7f204e538f0cca9480
parent9bce3c39f535edcc4cd7cc830824f6806e3de98b (diff)
downloadlaunchpad-polymaker-10f0c0b60dee4b8bb4fb1685bc478ecdc5b526aa.tar.gz
launchpad-polymaker-10f0c0b60dee4b8bb4fb1685bc478ecdc5b526aa.zip
Add channel selection for bypassed keyboard
-rw-r--r--src/app.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app.c b/src/app.c
index de3d796..8f70a6e 100644
--- a/src/app.c
+++ b/src/app.c
@@ -536,7 +536,16 @@ app_surface_event(u8 type, u8 index, u8 value) {
536 } 536 }
537 return; 537 return;
538 } 538 }
539 // Find the minimum channel the keyboard can use for sending
540 // notes.
539 u8 channel = 0; 541 u8 channel = 0;
542 for (int i = 0; i < 16; i++) {
543 if (state.ch_listen[i] != 0) {
544 channel = i;
545 break;
546 }
547 }
548
540 // TODO: Aftertouch? 549 // TODO: Aftertouch?
541 // TODO: Per KBD channel selection. 550 // TODO: Per KBD channel selection.
542 int note = kbd_find_note(index); 551 int note = kbd_find_note(index);