Adding Parameters / Juce Demo Plugin

Hi everyone,

I am having a hard time reproducing the juce demo plugin parameters system.

It seems quite simple but the following lines aren't compiling :

AudioParameterFloat* gainParam;
gainParam = new AudioParameterFloat("gain", "Gain", 0.0f, 1.0f, 0.9f);

In particular the last line (addParameter(gainParam)) is showing an error, saying that "argument of type "juce::AudioParameterFloat *" is incompatible with parameter of type "juce::AudioProcessorParameter *" "

Which is surprising, since after checking the documentation AudioParameterFloat is inheriting from AudioProcessorParameter (which is the type required by addParameter)...

Any hint ?

Thanks a lot,


Yeah, there must be something else going on in your code that you've not mentioned here. Otherwise, that would be fine.

Thanks a lot jules for your answer :)

At least now I am sure that my understanding of the addParameter() method is correct and that the problem lies somewhere else. I'll keep searching and will answer again below if the problem persists... I have noticed that sometimes the "link" between the libraries/classes definition "disappears" in Visual Studio. It happened to me that I create a new project, but the methods aren't recognized... so maybe my problem is linked to something like that.

All the best,