From 79dca43be33c03053264a1c1137a0bdd463cbee3 Mon Sep 17 00:00:00 2001 From: hogliux Date: Mon, 9 May 2016 11:16:08 +0100 Subject: [PATCH] Workaround for VST-3 plug-ins which do not change their parameter values internally when the user changes them in the custom UI --- .../format_types/juce_VST3PluginFormat.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 6e4ef7761e..6fc6e11a99 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -398,6 +398,14 @@ public: return kResultFalse; owner->sendParamChangeMessageToListeners (index, (float) valueNormalized); + + // did the plug-in already update the parameter internally + if (owner->editController->getParamNormalized (paramID) != (float) valueNormalized) + { + Steinberg::int32 eventIndex; + owner->inputParameterChanges->addParameterData (paramID, eventIndex)->addPoint (0, valueNormalized, eventIndex); + } + return owner->editController->setParamNormalized (paramID, valueNormalized); }