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 29d4e30cbf58b6ef2fb23a01dce54f19bde4a14d
parent 63903ef1de3e2d650fccdacd812df24823a62279
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Tue, 13 Aug 2024 19:17:18 +0200

fix FX settings not properly (re)stored in Multi mode

Diffstat:
Mdoc/changelog.txt | 4++++
Msource/virusLib/microcontroller.cpp | 43+++++++++++++++++++++++++++++++++++--------
Msource/virusLib/microcontroller.h | 2+-
Msource/virusLib/microcontrollerTypes.h | 9++++++++-
4 files changed, 48 insertions(+), 10 deletions(-)

diff --git a/doc/changelog.txt b/doc/changelog.txt @@ -6,6 +6,10 @@ Framework: - [Fix] CLAP: Ranges of discrete parameters were not reported properly +Osirus: + +- [FIX] FX settings were not restored in Multi Mode + 1.3.18 Framework: diff --git a/source/virusLib/microcontroller.cpp b/source/virusLib/microcontroller.cpp @@ -788,9 +788,14 @@ bool Microcontroller::sendSysex(const std::vector<uint8_t>& _data, std::vector<S } } + if(!m_rom.isTIFamily() && page == PAGE_A && m_globalSettings[PLAY_MODE] != PlayModeSingle) + { + applyToMultiEditBuffer(page, part, param, value); + } + if(page == PAGE_C || (page == PAGE_B && param == CLOCK_TEMPO)) { - applyToMultiEditBuffer(part, param, value); + applyToMultiEditBuffer(page, part, param, value); const auto command = static_cast<ControlCommand>(param); @@ -1281,14 +1286,36 @@ void Microcontroller::applyToSingleEditBuffer(TPreset& _single, const Page _page _single[offset] = _value; } -void Microcontroller::applyToMultiEditBuffer(const uint8_t _part, const uint8_t _param, const uint8_t _value) +void Microcontroller::applyToMultiEditBuffer(const Page _page, const uint8_t _part, const uint8_t _param, const uint8_t _value) { - // remap page C parameters into the multi edit buffer - if (_param >= PART_MIDI_CHANNEL && _param <= PART_OUTPUT_SELECT) { - m_multiEditBuffer[MD_PART_MIDI_CHANNEL + ((_param-PART_MIDI_CHANNEL)*16) + _part] = _value; - } - else if (_param == CLOCK_TEMPO) { - m_multiEditBuffer[MD_CLOCK_TEMPO] = _value; + // multi edit buffer duplicates parameters of a single, apply them to the multi edit buffer + switch (_page) + { + case PAGE_A: + switch (_param) + { + case EFFECT_SEND: m_multiEditBuffer[MD_PART_EFFECT_SEND + _part] = _value; break; + case DELAY_REVERB_MODE: m_multiEditBuffer[MD_DELAY_MODE] = _value; break; + case DELAY_TIME: m_multiEditBuffer[MD_DELAY_TIME] = _value; break; + case DELAY_FEEDBACK: m_multiEditBuffer[MD_DELAY_FEEDBACK] = _value; break; + case DELAY_RATE: m_multiEditBuffer[MD_DELAY_RATE] = _value; break; + case DELAY_DEPTH: m_multiEditBuffer[MD_DELAY_DEPTH] = _value; break; + case DELAY_LFO_SHAPE: m_multiEditBuffer[MD_DELAY_SHAPE] = _value; break; + case DELAY_COLOR: m_multiEditBuffer[MD_DELAY_COLOR] = _value; break; + } + break; + case PAGE_B: + if (_param == CLOCK_TEMPO) + { + m_multiEditBuffer[MD_CLOCK_TEMPO] = _value; + } + break; + case PAGE_C: + if (_param >= PART_MIDI_CHANNEL && _param <= PART_OUTPUT_SELECT) + { + m_multiEditBuffer[MD_PART_MIDI_CHANNEL + ((_param-PART_MIDI_CHANNEL)*16) + _part] = _value; + } + break; } } diff --git a/source/virusLib/microcontroller.h b/source/virusLib/microcontroller.h @@ -87,7 +87,7 @@ private: void applyToSingleEditBuffer(Page _page, uint8_t _part, uint8_t _param, uint8_t _value); static void applyToSingleEditBuffer(TPreset& _single, Page _page, uint8_t _param, uint8_t _value); - void applyToMultiEditBuffer(uint8_t _part, uint8_t _param, uint8_t _value); + void applyToMultiEditBuffer(Page _page, uint8_t _part, uint8_t _param, uint8_t _value); Page globalSettingsPage() const; bool isPageSupported(Page _page) const; void processHdi08Tx(std::vector<synthLib::SMidiEvent>& _midiEvents); diff --git a/source/virusLib/microcontrollerTypes.h b/source/virusLib/microcontrollerTypes.h @@ -85,7 +85,14 @@ namespace virusLib MULTI_PROGRAM_CHANGE = 105, MIDI_CLOCK_RX = 106, UNK6d = 109, - EFFECT_SEND = 113, // actually in bank A + DELAY_REVERB_MODE = 112, + EFFECT_SEND = 113, + DELAY_TIME = 114, + DELAY_FEEDBACK = 115, + DELAY_RATE = 116, + DELAY_DEPTH = 117, + DELAY_LFO_SHAPE = 118, + DELAY_COLOR = 119, PLAY_MODE = 122, PART_NUMBER = 123, GLOBAL_CHANNEL = 124,