Handle CC 126 and 127 for mono and poly mode

more-midi-functions
probonopd 3 days ago committed by GitHub
parent ce6f3348fa
commit 9987e03b71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 14
      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,

Loading…
Cancel
Save