From 1b4bb7b320fda1886a01419bd2d05f8d3400ae43 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 24 Apr 2025 23:42:33 +0200 Subject: [PATCH] Update mididevice.cpp Adjust Detune TX816 goes +/-75 cent and the value 0 tuning should not jump back to 64 according to @Skerjanc --- src/mididevice.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/mididevice.cpp b/src/mididevice.cpp index 6a621ab..22bcc45 100644 --- a/src/mididevice.cpp +++ b/src/mididevice.cpp @@ -411,16 +411,10 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign break; case 64: // Master Tuning LOGNOTE("MIDI-SYSEX: Set Master Tuning"); - if (val == 0) - { - // 0 to 127, with 0 being no detune effect applied at all - m_pSynthesizer->SetMasterTune(0, mTG); - } - else - { - // Scale to -99 to +99 cents - m_pSynthesizer->SetMasterTune(maplong(val, 1, 127, -99, 99), mTG); - } + + // Scale to -75 to +75 cents (TX816 range) + m_pSynthesizer->SetMasterTune(maplong(val, 1, 127, -75, 75), mTG); + break; default: // Unknown or unsupported parameter