Automatic parameter binding if element is handled as a sub controller

Hi,

I have created a GUI with the VST GUI editor. There is a CParamDisplay element in the UI which is connected to a parameter and updates continuously. While that parameter is shown I would like to change the color from time to time. For this purpose, I add a sub controller tag and obtain a pointer reference to my CParamDisplay element. Now, I can set the color if the right condition is detected.

However, unfortunately, when setting up the sub controller, the automatic parameter binding seems to stop working. What I then did was to add the function to update the CParamDisplay element by calling setDirty() in the setParamNormalized function and using the string conversion function lambda to address the right parameter - which works. But is that really the recommended way to handle it? Or can I somehow re-attach the parameter binding even when attaching a sub controller?

Thank you and best regards

Hauke

Hi Hauke,
have a look at the DelegationController class. If you use that as a base for your custom controller, you should be able to do what you want to do without loosing automatic parameter binding. Just make sure to always call the base class if you override one of the methods.

Cheers,
Arne

Hi Arne,

thank you very much. Works like a charme :-).

I just had to find out that the DelegationController requires a link to the VST3Editor reference which holds the sub controller references.

Thank you and best regards

Hauke