Dynamic Param Management in APVTS

Hi folks, I’m a big fan of the new type of effect racks (e.g. Serum 2, Nexus 5) where you can add ‘infinite’ modules with modifiable and automatable parameters. I want to recreate such a system. But how exactly does it work?

I came up with two ideas:

  • Either there’s a way to change the APVTS at runtime and create parameters and GUI connections dynamically
  • Or the APVTS is created with tons of ‘extraParams’ that are used up when a module is added

I found some old discussions on this forum claiming ‘not possible’, but maybe this is a newer feature because I only know new plugins using that.

I’m not searching for an instant solution, but rather some discussion, blogs, or directions to start with.

Serum 2 (and most plugins doing something similar) is not changing the reported parameters of the host when you add new effects.

Instead, it just creates “internal” parameters (just some variables) to control the UI/DSP, store the values in presets, etc.

You can see that, If you open Serum 2 and try to record automation in any of the FX rack parameters, nothing is recorded.

However, if you right click a parameter in the rack and click “automate” in Serum 2, a dynamic mapping gets created between a preallocated (fixed, not dynamic) parameter in the host and the internal variable that control that particular effect. After you do that parameter automation is recorded.

This is how you would do this now in JUCE - notice that there’s still quite a lot of flexibility there because the AudioProcessorParameter class can actually be overridden so for example it reports a different parameter name to the DAW once a new assignment has been made.

2 Likes