Non-fixed parameter amount in plugins

I’ve been playing around with the AudioProcessorGraph as a modular synth for a plugin.

A problem I’ve found is how to deal with the parameters for the host. If you add or remove a node, the total number of parameters obviously changes and it quickly becomes messy.

So I was wondering if the brain trust had any advice for something like this. Is a fixed list with parameters mapped to each free slot the best solution or something more sophisticated?

I’d appreciate any help!

I have the same problem, i have a variable amount of parameters (it changes a lot since the user can add/remove parameters at runtime). I was not able to deal with that since every host deals with plugins in a different way.

For now i tell the host the plugin has s fixed large number of parameters, and i re-use them, and the unsused ones are just there but are ignored. I was thinking of notifying the host whenever the amount of parameters changes by re-setting each parameter to it’s current value (setParameterNotifyingHost) but i don’t know how each host will react to this. This is how VST works i have no idea about AU/RTAS. So if anyone found a better solution i’d love to hear about it.

The VST and AU layers are just not designed to deal with this kind of situation. Changing names and ranges of parameters during the plugin’s life would not be possible on most hosts. Any code that manages to do this will be totally host-dependent.

A mapping layer in your plugin, where a fixed number of generic AU/VST parameters are turned into named parameters in your modular environment, sounds like the right idea.