From ac09b4fbc9fe65fbb81c8ab0ca0dd502c77978e5 Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 20 Apr 2022 23:51:46 +0200 Subject: [PATCH] Implement MIDI CC 120 (All Sound Off) and 123 (All Notes Off) Closes https://github.com/probonopd/MiniDexed/issues/126 --- src/mididevice.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mididevice.cpp b/src/mididevice.cpp index 888c59d..e3df3e9 100644 --- a/src/mididevice.cpp +++ b/src/mididevice.cpp @@ -40,6 +40,8 @@ #define MIDI_CC_FREQUENCY_CUTOFF 74 #define MIDI_CC_REVERB_LEVEL 91 #define MIDI_CC_DETUNE_LEVEL 94 + #define MIDI_CC_ALL_SOUND_OFF 120 + #define MIDI_CC_ALL_NOTES_OFF 123 #define MIDI_PROGRAM_CHANGE 0b1100 #define MIDI_PITCH_BEND 0b1110 @@ -194,6 +196,14 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign case MIDI_CC_DETUNE_LEVEL: m_pSynthesizer->SetMasterTune (pMessage[2], nTG); break; + + case MIDI_CC_ALL_SOUND_OFF: + m_pSynthesizer->panic (pMessage[2], nTG); + break; + + case MIDI_CC_ALL_NOTES_OFF: + m_pSynthesizer->notesOff (pMessage[2], nTG); + break; } break;