From 469ef79fa5b264f5bc9ce7ff1d6d8acc8f734a26 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 21 Apr 2022 22:04:25 +0200 Subject: [PATCH] Scale more CCs (#135) https://github.com/probonopd/MiniDexed/pull/122#issuecomment-1105686599 --- src/mididevice.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mididevice.cpp b/src/mididevice.cpp index ac67bb7..fe58fc4 100644 --- a/src/mididevice.cpp +++ b/src/mididevice.cpp @@ -196,11 +196,11 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign break; case MIDI_CC_RESONANCE: - m_pSynthesizer->SetResonance (pMessage[2], nTG); + m_pSynthesizer->SetResonance (maplong (pMessage[2], 0, 127, 0, 99), nTG); break; case MIDI_CC_FREQUENCY_CUTOFF: - m_pSynthesizer->SetCutoff (pMessage[2], nTG); + m_pSynthesizer->SetCutoff (maplong (pMessage[2], 0, 127, 0, 99), nTG); break; case MIDI_CC_REVERB_LEVEL: @@ -208,7 +208,7 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign break; case MIDI_CC_DETUNE_LEVEL: - m_pSynthesizer->SetMasterTune (pMessage[2], nTG); + m_pSynthesizer->SetMasterTune (maplong (pMessage[2], 0, 127, -99, 99), nTG); break; case MIDI_CC_ALL_SOUND_OFF: