AudioProcessorParameter not showing in host automation

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?

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.

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.

Same problem. Moreover, in an example ArpegiatorTutorial which consists of these files:

Main.cpp
ArpeggiatorTutorial.h

addParameter is working fine

But in my test project which was generated with Projucer there are 4 files:

PluginProcessor.cpp
PluginProcessor.h
PluginEditor.cpp
PluginEditor.h

I’ve copied the same addParameter call inside the constructor of PluginProcessor.cpp class, and the necessary variable in the private part of PluginProcessor.h, updated methods getStateInformation and setStateInformation accordingly but slider does not show up!
Methods getNumParameters, getParameter, setParameter are not overridden. What could be the cause of this ? The JUCE version is 7.0.3