Newbie question: dealing with AU/VST plugin parameters and interaction with host

Hi, I am using Juce since relatively a poor time. 
I am porting my plugins written in portable C++ and absolutely love Juce's methodology.

Reading the example code and the forum, the the fact (i think) in the course of the time since first revisions of Juce many things changed, i'm having problems with parameters and I have some questions to ask, I've searched in the forum but found not a clear way to solve. 

1) Working with my compressor plugin, i have various parameters with their listeners attached, all right. My plugin works (AU) into all hosts. BTW if I choose the parameter view in Logic not a single parameter was shown. I think this is due the fact I've not implemented various getParameters() setParameters() etc, is this right? BTW i've read on this forum that now some other class and method were introduced, like addParameter() and so on. What is the correct procedure?

2) Not understood correctly interatcion between GUI-changed properties and HOST-changed ones. I mean, in example i've a switch on my compressor that sets the compressor behavior (compressor/limiter). If user choose "limiter" the "Ratio Knob" should disappear or at least not give chance to the user to change its value (this will be decided further, that's not the point). How's the correct procedure in order to say "if switch is selected by user and (let's say) bIsLimiter is "true", then the knob must be grayed and the processor (furthermore) should set another foo value and communicate it to the GUI (in example, let's say that when user select limiter mode, the "knee" switch should change from Soft to Hard.. it's only an example for understanding).

3) When someone (thanks in advance) will tell me the correct procedure, this will be valid for AU as well for VST RTAS and AAX platforms? 


4) (not inherent to parameters) I use XCode and I am trying to understand how to debug. I attach the process to Logic Pro X or hoowever the host DAW but no way to ghet my std::cout messages in the XCode's debug console. 

Thank you very much!

1) Yes you need to implement setParameters/getParameters or - even better - use the new AudioProcessorParameter class. I think it may be best if you look at the Juce demo plugin in examples/audio plugin demo then this should give you an idea how to use them. For example, look at this file.

2) A plug-in must always have a fixed number of parameters - so there is no way to just make a parameter disappear.  Simply ignore the parameter in that case. However, you are in charge of what you want to show in your GUI. So you can hide/disable GUI parameters whenever you want. As the button/slider/knob callbacks are called on the GUI thread (in, for example, your ButtonListener etc.) you can simply call setEnabled to enable/disable any other GUI elements.

In general, it's important to know, that GUI elements are in no way connected to the parameters of your plug-in unless you actively synchronize them with callbacks and setValue/getValue etc.

3) The point in using JUCE is that your plug-in will work for VST, AU and AAX without any changes to your code. You do need to install the various SDKs for the various plug-in formats though. Follow this tutorial, for example, which will instruct you on how to download the VST SDK and how to tell the Introjucer where the SDK folder is located.

4) Try using DBG ("bla bla bla"); instead of std::cout. You also need to start your DAW from within Xcode. To do this, select Product -> Scheme -> Edit Scheme... and then go onto the Debug... tab. There you can select which application to start (such as Cubase or Logic) when you want to debug your plug-in. After this, just choose Run... from within xcode. This will then launch Cubase or Logic and you will see the debug output in Xcode.

Does this answer your questions?





Definitely YES! 

Thanks a lot, Fabian.