Notifying PluginProcessor about slider isEnabled state

I have a class that inherits from Slider. Right-Clicking it sets isEnabled = false and greys out the encoder. Currently also using AudioProcessorValueTreeState with listeners to grab the value’s in parameterChanged.

Is there an easy way to notify the PluginProcessor about the current isEnabled state of a slider?

cheers

Not really.
What would be the meaning of a disabled slider?

If the enablement of the slider is like switching a feature on and off, would it make sense to have that automated using an AudioParameterBool?

Remember, that the slider is just one possible way of modifying the parameter, the host’s automation can still access the value and if there is a control surface connected, or the host shows a generic parameter display, they also can play with the value…

What would be the meaning of a disabled slider?

I’m working on a compressor with auto attack/release. Initial idea was to be able to right-click disable the rotary slider, to enable attack/release automation. Meaning isEnabled = true -> manual input view slider and isEnabled = false -> parameter being automated.

I guess having a seperate “auto” button is how most plugins handle this. I’d really like to have a minimal GUI tho. :sweat_smile:

Well, it’s totally doable. But it seems to make sense to have the auto as AudioParameterBool.
You don’t need a button on the editor, the parameter would just expose that bool setting to the host. But TBH from a marketing and UX perspective, the auto button should deserve some visibility, who would know, that right click do something on the knob…

If you still want that to be handled by right click, you will have to override the enablementChanged() callback, since there is no listener callback for that.
Then you need to call beginGestureChange() before sending the new bool value and a endGestureChange() afterwards, and hope that it works in the host of your choice. Some are picky, when it is all sent at the same time, but I think there was a fix lately.

And when the editor is created, you have to set the slider’s enabled accordingly.

You’re right, would make sense to have the parameter exposed to the host. From a UX standpoint it’s obviously terrible design to not have the “auto” toggle button, but since it’s a personal project and i doubt it will ever see the light of day i’ll try your approach :).

cheers!