12-command-art #2

Merged
boomjacky merged 17 commits from 12-command-art into master 2026-05-10 06:42:12 -04:00
Showing only changes of commit de0389e144 - Show all commits

View File

@@ -40,16 +40,10 @@ void midi_handle_events(void *port_buffer, jack_nframes_t nframes) {
queue_push(&cmd_queue, cmd); queue_push(&cmd_queue, cmd);
} else { } else {
switch (note) { switch (note) {
case 60: case 60: /* add channel not rtsafe, moved to FIFO pipe */
{ case 61: /* remove channel not rtsafe, moved to FIFO pipe */
command_t cmd = { .type = CMD_ADD_CHANNEL, .channel = -1, .data = 0 }; /* no operation here */
queue_push(&cmd_queue_main, cmd); break;
} break;
case 61:
{
command_t cmd = { .type = CMD_REMOVE_CHANNEL, .channel = -1, .data = 0 };
queue_push(&cmd_queue_main, cmd);
} break;
case 62: case 62:
{ {
int bch = atomic_load(&bind_channel); int bch = atomic_load(&bind_channel);
@@ -75,16 +69,10 @@ void midi_handle_events(void *port_buffer, jack_nframes_t nframes) {
command_t cmd = { .type = CMD_CYCLE, .channel = 0, .data = 0 }; command_t cmd = { .type = CMD_CYCLE, .channel = 0, .data = 0 };
queue_push(&cmd_queue, cmd); queue_push(&cmd_queue, cmd);
} break; } break;
case 60: case 60: /* add channel not rtsafe, moved to FIFO pipe */
{ case 61: /* remove channel not rtsafe, moved to FIFO pipe */
command_t cmd = { .type = CMD_ADD_CHANNEL, .channel = -1, .data = 0 }; /* no operation here */
queue_push(&cmd_queue_main, cmd); break;
} break;
case 61:
{
command_t cmd = { .type = CMD_REMOVE_CHANNEL, .channel = -1, .data = 0 };
queue_push(&cmd_queue_main, cmd);
} break;
default: default:
break; break;
} }