From c7fa8804336d03703047a36634cc76bd552af50c Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Tue, 26 Nov 2024 01:27:34 +0100 Subject: [PATCH] handle Portamento MIDI CC-s --- src/mididevice.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mididevice.cpp b/src/mididevice.cpp index 216b466..75a15e4 100644 --- a/src/mididevice.cpp +++ b/src/mididevice.cpp @@ -40,10 +40,12 @@ LOGMODULE ("mididevice"); #define MIDI_CC_MODULATION 1 #define MIDI_CC_BREATH_CONTROLLER 2 #define MIDI_CC_FOOT_PEDAL 4 + #define MIDI_CC_PORTAMENTO_TIME 5 #define MIDI_CC_VOLUME 7 #define MIDI_CC_PAN_POSITION 10 #define MIDI_CC_BANK_SELECT_LSB 32 #define MIDI_CC_BANK_SUSTAIN 64 + #define MIDI_CC_PORTAMENTO 65 #define MIDI_CC_RESONANCE 71 #define MIDI_CC_FREQUENCY_CUTOFF 74 #define MIDI_CC_REVERB_LEVEL 91 @@ -385,6 +387,10 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign m_pSynthesizer->ControllersRefresh (nTG); break; + case MIDI_CC_PORTAMENTO_TIME: + m_pSynthesizer->setPortamentoTime (maplong (pMessage[2], 0, 127, 0, 99), nTG); + break; + case MIDI_CC_BREATH_CONTROLLER: m_pSynthesizer->setBreathController (pMessage[2], nTG); m_pSynthesizer->ControllersRefresh (nTG); @@ -410,6 +416,10 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign m_pSynthesizer->setSustain (pMessage[2] >= 64, nTG); break; + case MIDI_CC_PORTAMENTO: + m_pSynthesizer->setPortamentoMode (pMessage[2] >= 64, nTG); + break; + case MIDI_CC_RESONANCE: m_pSynthesizer->SetResonance (maplong (pMessage[2], 0, 127, 0, 99), nTG); break;