From 9987e03b71296237c92a97790f0549223326a609 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 14 Apr 2025 22:41:41 +0200 Subject: [PATCH] Handle CC 126 and 127 for mono and poly mode --- src/mididevice.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/mididevice.cpp b/src/mididevice.cpp index 29dcf3f..d468455 100644 --- a/src/mididevice.cpp +++ b/src/mididevice.cpp @@ -53,6 +53,8 @@ LOGMODULE ("mididevice"); #define MIDI_CC_ALL_NOTES_OFF 123 #define MIDI_CC_OMNI_MODE_OFF 124 #define MIDI_CC_OMNI_MODE_ON 125 + #define MIDI_CC_MONO_MODE_ON 126 + #define MIDI_CC_POLY_MODE_ON 127 #define MIDI_PROGRAM_CHANGE 0b1100 #define MIDI_PITCH_BEND 0b1110 @@ -545,6 +547,18 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign LOGDBG("Omni Mode On: TG %d set to OMNI", nTG); break; + case MIDI_CC_MONO_MODE_ON: + // Sets monophonic mode + m_pSynthesizer->setMonoMode(1, nTG); + LOGDBG("Mono Mode On: TG %d set to MONO", nTG); + break; + + case MIDI_CC_POLY_MODE_ON: + // Sets polyphonic mode + m_pSynthesizer->setMonoMode(0, nTG); + LOGDBG("Poly Mode On: TG %d set to POLY", nTG); + break; + default: // Check for system-level, cross-TG MIDI Controls, but only do it once. // Also, if successfully handled, then no need to process other TGs,