Skip to content

Commit

Permalink
Reinstate MIDI_CC_DETUNE_LEVEL (#171)
Browse files Browse the repository at this point in the history
Accidentally got reverted
#150 (comment)
  • Loading branch information
probonopd authored Apr 26, 2022
1 parent 5ba274c commit 363c287
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/mididevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,15 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
break;

case MIDI_CC_DETUNE_LEVEL:
m_pSynthesizer->SetMasterTune (maplong (pMessage[2], 0, 127, -99, 99), nTG);
if (pMessage[2] == 0)
{
// "0 to 127, with 0 being no celeste (detune) effect applied at all."
m_pSynthesizer->SetMasterTune (0, nTG);
}
else
{
m_pSynthesizer->SetMasterTune (maplong (pMessage[2], 1, 127, -99, 99), nTG);
}
break;

case MIDI_CC_ALL_SOUND_OFF:
Expand Down

0 comments on commit 363c287

Please sign in to comment.