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 1380cbe0e6097675c479625321f61398b2471516
parent 83b3d83d967a3c4453270ddad70e7e4e5a6c1d07
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Fri,  2 Aug 2024 01:09:00 +0200

fix preset names to match hardware

Diffstat:
Msource/nord/n2x/n2xJucePlugin/n2xPatchManager.cpp | 24++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/source/nord/n2x/n2xJucePlugin/n2xPatchManager.cpp b/source/nord/n2x/n2xJucePlugin/n2xPatchManager.cpp @@ -6,6 +6,8 @@ namespace n2xJucePlugin { + constexpr char g_performancePrefixes[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'L' }; + static constexpr std::initializer_list<jucePluginEditorLib::patchManager::GroupType> g_groupTypes = { jucePluginEditorLib::patchManager::GroupType::Favourites, @@ -65,10 +67,28 @@ namespace n2xJucePlugin char name[128]{0}; + auto getBankChar = [&]() -> char + { + if(isSingle) + { + if(bank == n2x::SingleDumpBankEditBuffer) + return 'e'; + return static_cast<char>('0' + bank - n2x::SysexByte::SingleDumpBankA); + } + if(bank == n2x::MultiDumpBankEditBuffer) + return 'e'; + + return static_cast<char>('0' + bank - n2x::SysexByte::MultiDumpBankA); + }; + if(isSingle) - (void)snprintf(name, sizeof(name), "%c.%02d", bank == n2x::SingleDumpBankEditBuffer ? 'e' : '0' + (bank - n2x::SysexByte::SingleDumpBankEditBuffer), program); + { + (void)snprintf(name, sizeof(name), "%c.%02d", getBankChar(), program); + } else - (void)snprintf(name, sizeof(name), "P%c.%02d", bank == n2x::MultiDumpBankEditBuffer ? 'e' : '0' + (bank - n2x::SysexByte::MultiDumpBankEditBuffer), program); + { + (void)snprintf(name, sizeof(name), "%c.%c%01d", getBankChar(), g_performancePrefixes[(program/10)%std::size(g_performancePrefixes)], program % 10); + } p->name = name; p->sysex = std::move(_sysex);