Endless Knobs

randy b's icon

How can I create a knob object that can spin 360 degrees but also know how many times it's been spun so that its range of values is infinite? I basically want it to behave like a number box, but look like a knob. Has anyone done this? Thanks.

Samuel Freeman's icon

like this...?

Max Patch
Copy patch and select New From Clipboard in Max.

That's the sort of thing i might never have thought of making if not
for the question being asked...

On 06/11/2007, randy wrote:
>
> How can I create a knob object that can spin 360 degrees but also know how many times it's been spun so that its range of values is infinite? I basically want it to behave like a number box, but look like a knob. Has anyone done this? Thanks.
>

randy b's icon

Exactly! That makes my interface so much more intuitive. Thanks so much.

Samuel Freeman's icon

... I should have tested that a bit more before posting, its a bit
buggy... i'm sure someone can improve on this:

(same patch with multislider display of output):

Max Patch
Copy patch and select New From Clipboard in Max.

On 06/11/2007, randy wrote:
>
> How can I create a knob object that can spin 360 degrees but also know how many times it's been spun so that its range of values is infinite? I basically want it to behave like a number box, but look like a knob. Has anyone done this? Thanks.
>

randy b's icon

I see, so it gets confused when you spin too fast... You can get around this if you turn off vertical tracking, but that would be a nice feature to keep.

pelang's icon
Max Patch
Copy patch and select New From Clipboard in Max.

barry threw's icon

This works for me for all cases. My intuition says there must be an
easier way to do it, but perhaps not.

Max Patch
Copy patch and select New From Clipboard in Max.

Barry Threw
Media Art and Technology

San Francisco, CA    Work: 857-544-3967
Email: bthrew@gmail.com
IM: captogreadmore (AIM)
http:/www.barrythrew.com

Chris Muir's icon

At 9:48 AM -0800 11/7/07, barry threw wrote:
>This works for me for all cases. My intuition says there must be an easier way to do it, but perhaps not.

It doesn't have jitter, but if you turn on vertical tracking you can see that it changes more slowly the faster you move. Here's your example w/ vertical tracking on and an LCD to display data:

Max Patch
Copy patch and select New From Clipboard in Max.

--
Chris Muir | "There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue." - Brian Eno

Zachary Seldess's icon

These are all good solutions. An easy way to do this would be to use the jsui knob and adjust the script so that it doesn't output %1. Look in the msg_float function. js file attached.

Max Patch
Copy patch and select New From Clipboard in Max.

randy b's icon

That's an ideal solution for keeping the vertical tracking, but a nice feature the built in knobs have is resetting the mouse position once it reaches the top or bottom of the screen, allowing you to continue spinning the knob without finding it and clicking on it again after you run out of room. Any chance you know how to implement that?

Zachary Seldess's icon

Here's something, but I had to do the noMod stuff in max. The js file is different, so download this one.

Max Patch
Copy patch and select New From Clipboard in Max.

Stefan Tiedje's icon

randy schrieb:
> I see, so it gets confused when you spin too fast... You can get
> around this if you turn off vertical tracking, but that would be a
> nice feature to keep.

Another version which will also move faster if you turn it faster:

Max Patch
Copy patch and select New From Clipboard in Max.

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com