From 6d7f79c6af97cac5be4902e4345cb3957cac2791 Mon Sep 17 00:00:00 2001 From: "Robin E. R. Davies" Date: Sat, 19 Jul 2025 13:26:12 -0400 Subject: [PATCH] MIDI CC-0 and MIDI LSB are ignored when listening for MIDI events. --- src/AudioHost.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/AudioHost.cpp b/src/AudioHost.cpp index a255b9f..ebc387c 100644 --- a/src/AudioHost.cpp +++ b/src/AudioHost.cpp @@ -931,6 +931,15 @@ private: uint8_t cmd = (uint8_t)(event.buffer[0] & 0xF0); bool isNote = cmd == 0x90 && event.buffer[2] != 0; // note on with velocity > 0. bool isControl = cmd == 0xB0; + if (isControl) + { + // ignore bank select, and CC LSB values. + uint8_t cc1 = (uint8_t)(event.buffer[1]); + if (cc1 == 0 || (cc1 >= 32 && cc1 < 64)) + { + isControl = false; + } + } if (isNote || isControl) { MidiNotifyBody notifyBody (event.buffer[0],event.buffer[1], event.buffer[2]);