Enabling/Disabling Parameter Automation

Hello All,

I was curious setting a parameter’s “automatable” member to true/false based on certain conditions for a plugin I am working on. Specifically this plugin is allowed to run in mono and stereo modes, and if for example I’m running two instances where one is left-mono, I would like to disable this left-channel plugin from automating the right-channel plugins’s parameters. However since the plugin registers with all of the left and right parameters available on construction (since you’d need them all in stereo mode) the opposite channel’s parameters are still available in the DAW automation for a left or right mono instance of the plugin.

I considered doing something to add/remove the relevant parameters from the list when the Stereo/Mono mode is changed, but this feels risky as then the plugin will be registering and unregistering parameters with the DAW during operation, potentially even during audio playback. The AudioParameter(Int/Float/Bool/etc) classes don’t come with a setter for this property, presumably for a reason.

Does anyone have suggestions here? Part of my confusion is how the “registering” of parameters with the DAW actually happens, although I expect this varies between plugin formats and DAWs.

Thank you!!

As far as I know, the way to do this is just by not feeding the parameter you want to disable into your DSP and disabling it in the GUI. The parameter layout should be unchanging, so the DAW can apply presets, etc.

Yeah thank you! I think I figured out the right way to get the plugin to just ignore any parameter changes to the “wrong” parameter if the user mistakenly sends automation data to it. Unfortunately it still allows for the potential user error but I don’t see any way to actively hide/show parameters to the DAW once the layout is established on construction.

It’s a unique situation because of the way this plugin interacts with a hardware device but I think this will be ok.

I handled a similar issue by disabling the associated UI element (e.g. the slider). This was on an older JUCE (likely 7.3).

1 Like

Yeah the problem was that even if the UI element was disabled the user could still choose to change this parameter using the DAW automation. I wrote in a check to make sure that the parameter being asked to change is coming from the correct Left or Right instance of the plugin (if we’re in mono mode)