From 45a0c1786466d6900d9147603f0dd86d1ebed21e Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Mon, 13 Feb 2012 21:03:37 -0300 Subject: [PATCH] midi2osc: added processing of program change events --- midi2osc/midi2osc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/midi2osc/midi2osc.c b/midi2osc/midi2osc.c index 6b0f5e2..9a179bd 100644 --- a/midi2osc/midi2osc.c +++ b/midi2osc/midi2osc.c @@ -125,6 +125,15 @@ static void forward(snd_seq_t *midi, lo_address osc) msg[2] = ctrl; msg[3] = value; break; + case SND_SEQ_EVENT_PGMCHANGE: + if (debug) + fprintf(stderr, "prog c%u=%u\n", + ev->data.control.channel, + ev->data.control.value); + msg[1] = 0xe0 | ev->data.control.channel; + msg[2] = ev->data.control.value; + msg[3] = 0; + break; case SND_SEQ_EVENT_PITCHBEND: if (debug) fprintf(stderr, "pitch c%u=%u\n",