Non linear sliders/knobs, best practice?
-
would you rather change the skew factor / middle Position on a knob/slider or use cable_tables in a network to make them non-linear/exponential/logarithmic? or is there even another method I don't know yet?
Is the skew factor curved or just a linear knee?
Which method is more precise on 0-1 sliders?the nodes also offer a curve on each knob, but that's reset once a faust is recompiled... also I noticed it can lead to snapping of knobs
-
@Morphoice I don't know about Faust resetting the curve but:
-
The curve you see does nothing but adjusting the skew factor behind the scene. So no it's not linear, it is exactly what you see.
-
I personally only use the skew number, that's my habit, and it's one less node in the graph! But a
cable_table
would do the same (but of course is necessary for more complex behaviour) -
in the end, most of the time the curves I need are either linear or log, so the skew is often either
1.0
or approx0.3
for a kinda log behaviour -
If the slider is snapping, it's probably because
StepSize
isn't0.0
-
-
@ustk does that apply to sliders in the UI too? I noticed there is no skew factor there but a mid point, so is it still a curved metric?
-
There isn't a consistent system.
I always interpret the knobs at the last step.I do it manually rather than use hise's skew.
Make everything work standardized behind the scenes (percentages when possible, or standard ranges) and then I use the UI script to interpret all of them with different curve functions. That way there is consistency and it's easy to change anything.Then again I work with c++ so I'm able to be quite picky with how I want parameters to be interpreted in the code
-
@Morphoice @griffinboy The system is not consistant in apparence but behind the scene, a mid point sets the skew factor via a formula. This formula is reverted to get the mid point back from the skew, so in essence it is the same thing. Now for the user, it is indeed confusing...
-
@ustk the problem is just the knobs start jumping as we can't have smaller stepsize than 0.01
and most sliders are from 0-1 not really giving many steps to work with -
@Morphoice So you're talking about UI here, right? In that case I make the silder
0-100
, so with a0.01
stepSize it's feeling like0.0
granularity
Then in the callback you can usecomponent.getValueNormalized()
so it's0-1
again -
@ustk that was my workaround. We just found out, though, that this works:
Knob1.set("stepSize", 0.001);