[feature request] skew factor for sliders
-
A skew factor entry box in the property editor would be handy :)
-
@d-healey The
middlePosition
property does exactly that but more intuitively. -
@Christoph-Hart I feel so dumb sometimes :)
What about with a bi-polar slider where you want the skew to go from the middle position out?
-
@d-healey Yes, that's not possible at the moment. I know the JUCE class has a
symmetric skew
, but I'm afraid using this will break our currentmiddlePoint
implementation.You can always roll your own with some highschool school math though...
-
@d-healey @Christoph-Hart Here's what I use:
// Get SkewFactor from MidPosition inline function getSkewFactor(start, midPosition, end) { return Math.log10(0.5) / Math.log10((midPosition - start) / (end - start)); } // Map from Skew inline function mapFromSkew(valueNormalized, skew, start, end) { return Math.pow(10, (Math.log10(valueNormalized) / (1/skew)) + Math.log10(end - start)) - start; }
-
@Christoph-Hart said in [feature request] skew factor for sliders:
@d-healey Yes, that's not possible at the moment. I know the JUCE class has a
symmetric skew
, but I'm afraid using this will break our currentmiddlePoint
implementation.Would adding a
slider.setSkew
function allow us to avoid breaking the middlePoint setting?You can always roll your own with some highschool school math though...
The problem with this is the display value of the slider won't match the output value.
-
@d-healey said in [feature request] skew factor for sliders:
The problem with this is the display value of the slider won't match the output value.
Its been a long outstanding request that we can add a custom value list to the slider for this...like in KnobMan (1,2,3,4,5,6,7 etc.)