creating a 'multiturn' wheel issue

chapelier fou's icon

Here is the idea : i've got a 'wheel' that output values between 0. and 1.
I want to detect whole turns in order to fraction the result, so I need several turns to reach.
The final goal is to have a melody 'scanned' by a 360° potentiometer, but with several turns.
Any idea what's wrong in this example patch ?

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

Source Audio's icon

in first place onebang reset

mizu's icon

seems you update the counter after the jump to 0. in p incdec_value. Here a partial proposition:

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

hth
michel

mizu's icon

oups added a loadmess 1 for the first run

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

Source Audio's icon

CW and CCW are reversed.
example above still jumps if run CCW

here is simplified variant.

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

manual dial -> float is bad idea if moved really fast

chapelier fou's icon

Thanks all, and especially DoubleUG, I feel stupid about this patching error with [onebang], well spotted !
Oh, and I didn't know the 'Clip Dial Values' attribute.
And yeah, manual dial to float is bad with the mouse. It's just and illustration/simulation. The real thing is a hall effect sensor and an arduino.