How do you create an infinitely rotatable knob?
-
I tried: https://puu.sh/vOEqU/3f79419f5a.mp4
How should I do it?
btw, how do you use onControl callback? Can't find any info. Edit: Err, can't find much info. There's some in the document but I think I need some more examples.
edit: oh I see, the more correct code is this (still doesn't work of course)
function onControl(controller, value) { if (controller == InfKnob) InfKnob.setValue(value - Math.floor(value)); }
-
http://forum.hise.audio/topic/19/how-do-you-use-oncontrol-number-value/2
Use a switch statement instead of if/else though
-
The JUCE slider is not really suitable for making endless encoders. You might want to customize a ScriptPanel for this behaviour (also what parameter do you want to control? Normally you don't have delta values in a plugin but a absolute range)
-
360 degree rotation requires an endless encoder to allow for easy rotation of the stereo field.
-
Edit: Oops, I (Christoph) accidently edited your post instead of replying :)
-
Yes, and setting the value in the callback would cause an endless loop (there is a safety mechanism that prevents this).
You'll definitely need to make a custom widget for this behaviour (but this should be rather easy). If you send me the filmstrip, I'll sketch it for you.
-
lol Christoph such power
is dangerous in your handsis extremely reassuring :) -
https://puu.sh/vSclu/ff3baeb0df.png
headsprite! -