diff options
author | Bad Diode <bd@badd10de.dev> | 2023-06-28 18:44:05 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-06-28 18:44:05 +0200 |
commit | 10f0c0b60dee4b8bb4fb1685bc478ecdc5b526aa (patch) | |
tree | 4e2f596c15631201bd2bda7f204e538f0cca9480 /src/app.c | |
parent | 9bce3c39f535edcc4cd7cc830824f6806e3de98b (diff) | |
download | launchpad-polymaker-10f0c0b60dee4b8bb4fb1685bc478ecdc5b526aa.tar.gz launchpad-polymaker-10f0c0b60dee4b8bb4fb1685bc478ecdc5b526aa.zip |
Add channel selection for bypassed keyboard
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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); |