VST3 automation with legacy parameter handling broken

We have a few plugins that still using the deprecated way for parameter handling (setParameter(), getNumParameters()…).

For this kind of plugins parameter automation does not work anymore with VST3. VST2 still works.

Tested in Reaper and Ableton Live in OSX Catalina latest JUCE 6 develop. Any help welcome.

I’m unable to reproduce this issue in Reaper 6.25 or Live 11.0, using Catalina 10.15.7.

To test, I modified the GainPluginDemo by removing the addParameter call from the processor’s constructor. Then, I added the following overridden methods:

    int getNumParameters() override { return 1; }
    String getParameterID (int index) override { return gain->paramID; }
    float getParameter (int parameterIndex) override { return static_cast<AudioProcessorParameter*> (gain.get())->getValue(); }
    String getParameterName (int parameterIndex, int maximumStringLength) override { return gain->getName (maximumStringLength); }
    const String getParameterText (int parameterIndex) override { return gain->getCurrentValueAsText(); }
    String getParameterText (int parameterIndex, int maximumStringLength) override { return gain->getCurrentValueAsText(); }
    int getParameterNumSteps (int parameterIndex) override { return static_cast<AudioProcessorParameter*> (gain.get())->getNumSteps(); }
    bool isParameterDiscrete (int parameterIndex) const override { return static_cast<AudioProcessorParameter*> (gain.get())->isDiscrete(); }
    float getParameterDefaultValue (int parameterIndex) override { return static_cast<AudioProcessorParameter*> (gain.get())->getDefaultValue(); }
    String getParameterLabel (int index) const override { return gain->label; }
    bool isParameterOrientationInverted (int index) const override { return gain->isOrientationInverted(); }
    void setParameter (int parameterIndex, float newValue) override { return static_cast<AudioProcessorParameter*> (gain.get())->setValue (newValue); }
    bool isParameterAutomatable (int parameterIndex) const override { return gain->isAutomatable(); }
    bool isMetaParameter (int parameterIndex) const override { return gain->isMetaParameter(); }
    AudioProcessorParameter::Category getParameterCategory (int parameterIndex) const override { return gain->category; }

private:
    //==============================================================================
    std::unique_ptr<AudioParameterFloat> gain = std::make_unique<AudioParameterFloat> ("gain", "Gain", 0.0f, 1.0f, 0.5f);

Finally, I loaded the plugin in Reaper/Live and tried moving the gain slider while the DAW was recording. In both cases, automation was recorded properly. Playing back the recording caused the parameter value to update appropriately.

Although we’re still using an AudioParameterFloat in this case, all the parameter functions are forwarded through the legacy parameter interface (verified in a debugger).

Are you able to provide a minimal example which reproduces the problem you’re seeing? If so, I’ll happily take another look at this issue.


On a related note, we are currently planning to remove the old parameter methods as part of a future JUCE release. These methods have been marked as deprecated for two years, which is already a very generous length of time. Supporting the old parameter system makes the plugin wrapper code much more complex that it needs to be, and we will need to remove these functions in order to facilitate support of existing and future plugin formats.

I’d encourage you to consider moving to the new parameter API as soon as possible, in order to avoid disruptions when updating to a future version of JUCE.

Thanks for testing this. It looks like i didn’t overwrite all the methods. Maybe that is the problem with the VST3.

In this case it is better to start rewriting the old parameter handling code and don’t waste time with this. Only our freeware is affected. I was a bit lazy with them. Our commercial products are already updated.

1 Like

I had another look at it and found the problem. I didn’t enable JUCE_FORCE_USE_LEGACY_PARAM_IDS . Looks like this is required for the VST3 when using the legacy parameter system.