gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

commit 4be4051c3c86b675515a121e142519c71f9893fb
parent 251d26e67e234328d7866d73f16bf6e9434f9836
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Tue, 27 Aug 2024 19:56:09 +0200

fix negative VM MAP values were displayed as maximum positive values

Diffstat:
Mdoc/changelog.txt | 2++
Msource/nord/n2x/n2xJucePlugin/n2xController.cpp | 10+++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/doc/changelog.txt b/doc/changelog.txt @@ -6,6 +6,8 @@ NodalRed2x: - [Fix] UI state not updated when loading preset via DAW - [Fix] Synth lost state of previously loaded DAW preset after switching the active part +- [Fix] Negative VM MAP values were displayed as maximum positive values after loading + a patch or DAW state 1.3.19 diff --git a/source/nord/n2x/n2xJucePlugin/n2xController.cpp b/source/nord/n2x/n2xJucePlugin/n2xController.cpp @@ -96,6 +96,10 @@ namespace n2xJucePlugin if(!parseMidiPacket(midiPacketName(MidiPacketType::SingleDump), data, params, _msg)) return false; + // the read parameters are in range 0-255 but the synth has a range of -128 to 127 (signed byte) + for (auto& param : params) + param.second = static_cast<int8_t>(param.second); // NOLINT(bugprone-signed-char-misuse) + const auto bank = data[pluginLib::MidiDataType::Bank]; const auto program = data[pluginLib::MidiDataType::Program]; @@ -119,6 +123,10 @@ namespace n2xJucePlugin if(!parseMidiPacket(midiPacketName(MidiPacketType::MultiDump), data, params, _msg)) return false; + // the read parameters are in range 0-255 but the synth has a range of -128 to 127 (signed byte) + for (auto& param : params) + param.second = static_cast<int8_t>(param.second); // NOLINT(bugprone-signed-char-misuse) + const auto bank = data[pluginLib::MidiDataType::Bank]; if(bank != n2x::SysexByte::MultiDumpBankEditBuffer) @@ -205,7 +213,7 @@ namespace n2xJucePlugin if(ccs.empty()) { nonConstParam.setRateLimitMilliseconds(sysexRateLimitMs); - setSingleParameter(part, singleParam, _value); + setSingleParameter(part, singleParam, static_cast<uint8_t>(_value)); return; }