AudioProcessorParameter not showing in host automation


#1

Hi - I need help automating parameters in my plugins, as far as I can see I have all the required bits of code but they dont show up in automation in any DAW. Following the juce demo plugin I have extended AudioProcessorParameter to make my FloatParameter class:

class FloatParameter : public AudioProcessorParameter
{
public:
    FloatParameter (float defaultParameterValue, const String& paramName): defaultValue (defaultParameterValue),
    value (defaultParameterValue),
    name (paramName)
    {
    }

    float getValue() const override
    {
        return value;
    }
    
    void setValue (float newValue) override
    {
        value = newValue;
    }

    float getDefaultValue() const override
    {
        return defaultValue;
    }

    String getName (int maximumStringLength) const override
    {
        return name;
    }

    String getLabel() const override
    {
        return String();
    }
 
    float getValueForText (const String& text) const override
    {
        return text.getFloatValue();
    }

private:
    float defaultValue, value;
    String name;
};

 

In my processor.h i declare a new parameter:

    AudioProcessorParameter* gain;

 

and instantiate it in the processor constructor:

addParameter(gain = new FloatParameter(1.0f, "Gain"));

 

Is there something I have not got here that means my parameter is not appearing in the DAW host automation?


#2

Make sure that you don't by mistake override the old getNumParameters, getParameter, setParameter, ... methods. When using the new AudioProcessorParameter classes you must allow the base class to handle those calls.


#3

Ah that fixed it thanks - Is this documented anywhere? Because I'm working from a plugin created by the introjuicer, and AudioProcessor::getNumParameters / getParameter / setParameter / getParameterName / getParameterNameText were all overrided in the processor by default, as setup by introjuicer and thus causing this problem.