circular number

Mar 29, 2010 at 2:26pm

circular number

hi,
there must be a technically better way to explain this, but i’m trying to figure out how to create a dial slider or a number object that will have a circular clockwise behavior.
i know this could be easily automated with the line object, but i need to link this feature with an electronically enhanced physical object which continuously sends numbers about it’s rotational angle (0 to 360), and i want to avoid the erratic change from 360 to 0 which occurs whenever a cycle is completed.

will appreciate any advise.

#49405
Mar 29, 2010 at 7:39pm

Hi,
I’m not sure about what you mean by “the erratic change from 360 to 0″?
Have you tried a [dial] with “clip dial values” unchecked and “numbers of degrees” set to 360?
Ch.

#177490
Mar 29, 2010 at 8:23pm

the physical device i’m using works like rotary knob – meaning, it sends numbers representing its rotational angle at any given moment – going from 0 to 360 (=degrees). so, whenever there’s an attempt to turn the knob above 360, it jumps back to 0, and this is is quite a sharp change in terms of sound which i’d like to avoid. one thing that comes to mind is having a dial object which has an ‘endless’ rotary behavior – e.g. go from 0->360->0->360..

#177491
Mar 29, 2010 at 9:02pm

Maybe somtehing like that then :

– Pasted Max Patch, click to expand. –
#177492
Mar 30, 2010 at 2:25am

just to ask back: you do not want to connect something in max to your dial, you just want
to create a user interface “object” in max which works like an endless knob/dial, right?

in this case, first thing to do is to split the mouse input from the display object.

example:

put an [lcd] obejct behiind a numberbox.

the lcd object will get the direction you move the mouse, and the number
box will display the current value. the numberbox will have to be set to
“ignore mouse” (or however that is called.)

between the “input” lcd and the “display” numberbox there will have to some math.

i dint know offhand but it is something like [expr ($i1+1) % $i2] where $i2 is the
resolution (for example 128 for midi, but i would work in 0. 1. float for a more
general example) which will “loop” the running input.

the running put will be simply the curretn status plus the mouse position from the lcd.

(for hardware connection the running input will be a counter which can count up and
down when it receivesa bang here for turning the dial left and a bang there when turning
the dial right.)

-110

#177493
Mar 30, 2010 at 8:21am

Ch: exactly what i meant! very simple indeed, i just had no clue which abs expression should be used for this (too many years of bad math training).

also, thanks for the additional advise!

cheers.

#177494

You must be logged in to reply to this topic.