# Notifying PluginProcessor about slider isEnabled state

**URL:** <https://forum.juce.com/t/notifying-pluginprocessor-about-slider-isenabled-state/36618>\
**Category:** Development\
**Created:** [December 11, 2019, 3:24pm UTC](https://forum.juce.com/t/notifying-pluginprocessor-about-slider-isenabled-state/36618 "2019-12-11T15:24:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![spacemob](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@spacemob](https://forum.juce.com/u/spacemob)\
**Post date:** [December 11, 2019, 3:24pm UTC](https://forum.juce.com/t/notifying-pluginprocessor-about-slider-isenabled-state/36618/1 "2019-12-11T15:24:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [December 11, 2019, 3:42pm UTC](https://forum.juce.com/t/notifying-pluginprocessor-about-slider-isenabled-state/36618/2 "2019-12-11T15:42:02Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![spacemob](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@spacemob](https://forum.juce.com/u/spacemob)\
**Post date:** [December 11, 2019, 3:49pm UTC](https://forum.juce.com/t/notifying-pluginprocessor-about-slider-isenabled-state/36618/3 "2019-12-11T15:49:05Z")

</div>

> 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. 😅

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [December 11, 2019, 5:03pm UTC](https://forum.juce.com/t/notifying-pluginprocessor-about-slider-isenabled-state/36618/4 "2019-12-11T17:03:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![spacemob](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@spacemob](https://forum.juce.com/u/spacemob)\
**Post date:** [December 11, 2019, 5:41pm UTC](https://forum.juce.com/t/notifying-pluginprocessor-about-slider-isenabled-state/36618/5 "2019-12-11T17:41:33Z")

</div>

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!
