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 7a2f30c4c3bb1eeb8350d79d43d617fda8e7447e
parent 2c76bef819e904dcae061b68d407bdf0de876c4f
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Fri,  2 Aug 2024 02:07:06 +0200

fix wrong parameter index when trying to send control changes

Diffstat:
Msource/nord/n2x/n2xJucePlugin/n2xController.cpp | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/source/nord/n2x/n2xJucePlugin/n2xController.cpp b/source/nord/n2x/n2xJucePlugin/n2xController.cpp @@ -190,7 +190,11 @@ namespace n2xJucePlugin const auto& controllerMap = getParameterDescriptions().getControllerMap(); - const auto& ccs = controllerMap.getControlChanges(synthLib::M_CONTROLCHANGE, _parameter.getDescription().index); + uint32_t paramIndex; + if(!getParameterDescriptions().getIndexByName(paramIndex, _parameter.getDescription().name)) + assert(false && "parameter not found"); + + const auto& ccs = controllerMap.getControlChanges(synthLib::M_CONTROLCHANGE, paramIndex); if(ccs.empty()) { assert(false && "TODO: implement parameter sending for non-CC params");