I was wondering if it’s possible to have a rotary slider that can increase to infinity but doesn’t go below zero. (If you keep increasing the value it’ll keep looping while the value increases.)
Did you ever get an answer to this @psyzza ?
Nope, not sure if it’s possible.
if you don’t want the value to wrap you’d just make the range very large and rotate at an interval to give the appearance of “infinite” no?
the range is 0 - 1000, the rotation is circular and rotates back around when hitting intervals of 1
unfortunately, infinite doesn’t work in computers, so you just give it the appearance
forcing the rotary to return to the minimum when it reaches the maximum (and vice versa) and keep a lap counter positive o negative. Also modify the control so that the start and end angle are 180º to produce the illusion of continuity.
So multiplying the lap counter by the range and adding the actual value of the rotary, the “infinite” position is obtained.
I have seen that there is a function for set the rotary without limit, setting the value of stopToEnd to false
setRotaryParameters(0, juce::MathConstants::twoPi, false);
I think that if the Slider class implemented a counter and storing the previous value/counter, juce would have an infinite rotary. The programmer would only have to add a function that receives the increase or decrease in each call.