MIDI CC-0 and MIDI LSB are ignored when listening for MIDI events.

This commit is contained in:
Robin E. R. Davies
2025-07-19 13:26:12 -04:00
parent 9b6798134d
commit 6d7f79c6af
+9
View File
@@ -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]);