creating a 'multiturn' wheel issue

    MaxMSPbugs/issues

    chapelier fou
    May 28 2023 | 8:00 pm
    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 Patcher
    In Max, select New From Clipboard.
    Show Text

    • Source Audio's icon
      Source Audio
      May 29 2023 | 8:44 am
      in first place onebang reset
      Share
    • mizu's icon
      mizu's icon
      mizu
      May 29 2023 | 9:24 am
      seems you update the counter after the jump to 0. in p incdec_value. Here a partial proposition:
      Max Patcher
      In Max, select New From Clipboard.
      hth michel
    • mizu's icon
      mizu's icon
      mizu
      May 29 2023 | 9:34 am
      oups added a loadmess 1 for the first run
      Max Patcher
      In Max, select New From Clipboard.
    • Source Audio's icon
      Source Audio's icon
      Source Audio
      May 29 2023 | 11:27 am
      CW and CCW are reversed. example above still jumps if run CCW
      here is simplified variant.
      Max Patcher
      In Max, select New From Clipboard.
      manual dial -> float is bad idea if moved really fast
    • chapelier fou's icon
      chapelier fou's icon
      chapelier fou
      May 29 2023 | 6:30 pm
      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.