From 46b90d9ea0522857ea4999acb56f33b62c499a46 Mon Sep 17 00:00:00 2001 From: reuk Date: Wed, 3 Jan 2024 18:30:26 +0000 Subject: [PATCH] VST3 Host: Ensure that parameter changes from the processor are communicated to the edit controller --- .../format_types/juce_VST3PluginFormat.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 107506a3e9..be22c7daaa 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -2244,7 +2244,7 @@ public: for (const auto* item : queues) { auto* ptr = item->ptr.get(); - callback (ptr->getParameterId(), ptr->get()); + callback (ptr->getParameterIndex(), ptr->getParameterId(), ptr->get()); } } @@ -2753,8 +2753,12 @@ public: processor->process (data); - outputParameterChanges->forEach ([&] (Vst::ParamID id, float value) + outputParameterChanges->forEach ([&] (Steinberg::int32 vstParamIndex, Vst::ParamID id, float value) { + // Send the parameter value from the processor to the editor + parameterDispatcher.push (vstParamIndex, value); + + // Update the host's parameter value if (auto* param = getParameterForID (id)) param->setValueWithoutUpdatingProcessor (value); });