diff --git a/modules/juce_audio_processors/format_types/juce_VST3Common.h b/modules/juce_audio_processors/format_types/juce_VST3Common.h index 5d651d0614..cf7f2a8143 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Common.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Common.h @@ -1261,7 +1261,7 @@ private: const auto controlEvent = toVst3ControlEvent (msg); - if (! controlEvent.hasValue()) + if (! controlEvent.has_value()) return false; const auto controlParamID = midiMapping->getMapping (createSafeChannel (msg.getChannel()), @@ -1561,7 +1561,7 @@ private: Steinberg::Vst::ParamValue paramValue; }; - static Optional toVst3ControlEvent (const MidiMessage& msg) + static std::optional toVst3ControlEvent (const MidiMessage& msg) { if (msg.isController()) return Vst3MidiControlEvent { (Steinberg::Vst::CtrlNumber) msg.getControllerNumber(), msg.getControllerValue() / 127.0 }; diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 7dca5a5b54..7865d50bda 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -2211,6 +2211,7 @@ public: void setValue (float newValue) override { pluginInstance.cachedParamValues.set (vstParamIndex, newValue); + pluginInstance.parameterDispatcher.push (vstParamIndex, newValue); } /* If we're syncing the editor to the processor, the processor won't need to @@ -2680,11 +2681,6 @@ public: inputParameterChanges->set (cachedParamValues.getParamID (index), value); }); - inputParameterChanges->forEach ([&] (Steinberg::int32 index, float value) - { - parameterDispatcher.push (index, value); - }); - processor->process (data); outputParameterChanges->forEach ([&] (Steinberg::int32 index, float value)