Hello, I woud like to have a Gui element similar to a rotary encoder.
Meaning something similiar to a poti that one can turn for an infinite amount to one direction. The output should identify in what direction the knob was turned.
is there a way to implement this?
I want to prototype a MIDI controller i’d like to build in supercollider and also have a gui for it, therefore i need this functionality.
For clarification, here is some example code for a potentiometer, but it’s printing between 0 and 1 and is only turn-able in a certain range. I’d like to have the direction printed and an infinite range of turn-ability.
(
var win, grid_size, knob_size;
knob_size = 40;
grid_size = knob_size + 10;
win = Window("gui", Rect(10, 10, grid_size * 4,grid_size * 4)).front;
Knob(win,Rect(0*(grid_size)+10, 30, knob_size, knob_size)).action_{|knob|knob.value.postln};
)
Is there some Gui element similar to this or how could i implement it?
Thank you very much!!