Some of the knobs in my modules use custom tapers. For example, when the user turns a DURATION knob, my modules apply a custom taper to compute the duration.
The custom taper means that I can’t use the param configurations’ built-in linear/exponential mappings.
I would like to make sure the knob rotation and the display value always correspond. Given the knob rotation, I can compute the corresponding duration. Given a duration, I can compute the corresponding rotation.
When the user turns the knob, how can I set its display value to reflect the computed duration?
When the user enters a duration via the keyboard, how can I set the knob’s rotation to reflect the computed rotation?
It’s not obvious to me how to do this. If it’s possible, I’m sure I can figure it out eventually. I’m not sure I can figure it out before v1 launches.
Got it. The remaining thing for me to figure out is what event is generated when the user types a value. But you’ve narrowed the search enough that I think I can find that on my own.
When a user types a value for a ParamWidget? No event is generated. But setDisplayValue is called which allows you to call setValue after transforming the value.
But… what if I want to have a custom subclass that return values due to a range?
I mean, I have my configParam<Division>(...); param knob that display division on this range:
"1/2d", "1/2", "1/2t", "1/4d", "1/4", "1/4t"
Another time, I just need different ranges, such as: