Cabbage Logo
Back to Cabbage Site

Change default value of sliders after init

I have no idea if this is possible, but I am making a multi effects plugin right now. To save on processing, the system uses a bank of normalized sliders that are then deformalized to display values. I also give these sliders defaults when a user switches effects. Would if be possible to change the slider range default value to also reflect this so when a user double clicks the slider it snaps to the generated default value rather than the one set on the widgets creation.

TenBand.csd (55.0 KB)

It would be possible to update the default click-to value, but not the slider range. Just today I added an internal identifier to do this, but I can expose it. At the moment it’s called initValue(), but if people are going to be able to change it at run time, perhaps defaultValue() would be better.

Exposing that would work great! Either name would work from my perspective, but defaultValue() makes a bit more sense.

1 Like