Forwarding the parameters of a hosted plugin

Hey everyone

I’ve been messing around with HostPluginDemo and I’m getting to the point where I’d like to forward the inner plugin’s parameters (add them to HostPluginDemo’s parameter list and hook up them up to the corresponding parameters of the inner plugin) so that the DAW can automate them

The issue is, everything I’ve read says that dynamically adding/removing parameters doesn’t work (hosts don’t support it). So how do I go about this?

Would it be possible to allocate a bunch of parameters up front, and then change their names and ranges dynamically whenever the inner plugin is changed? I can’t make any assumptions about the parameters I’ll have to forward. They could be ints, floats, enums, etc., so that might make this approach difficult/infeasible.

Or (worst case scenario) will I have to force the user to close and reopen the outer plugin every time they swap out the inner plugin, so that I can give the outer plugin a fresh parameter list?
Or is there another way to go about this?

Thanks in advance

Yes, you’ll need to allocate a bunch of parameters up front - and you would then have to use a custom class that inherits from RangedAudioParameter (or AudioProcessorParameter).

That ‘special’ parameter class would know to dispatch to the correct internal parameter, for example within a hosted plugin. So for example isDiscrete() would report different values dynamically depends if the hosted parameter is int or float.

Additionally, when you change the hosted parameter, you need to call updateHostDisplay() from your processor to tell it that the parameter information has changed and it should then call you back for all those virtual functions to update.

Thanks for the help!
I’ll try this and share the results once I’ve got it working

Hi, did you succeed in doing that, please?