Set negative slider values

    MaxMSP

    DominikK's icon
    DominikK's icon
    DominikK
    Jul 21 2017 | 1:03 pm
    Hello,
    while trying to put a slider object to work I was wondering about it's behavior when it's set to having negatives values. If I have a slider with minimum value -1. and range of 2 (float output) and I send a "0." or "set 0." message, shouldn't the slider jump to the middle position where it actually outputs 0.? Instead it jumps to -1. as if 0 meant "jump to minimum value" and 1 "jump to maximum value". That's somehow inconsistent compared to what a slider does when its range is positive. Am I missing something? best dominikk

    • Herr Markant's icon
      Herr Markant's icon
      Herr Markant
      Jul 21 2017 | 2:16 pm
      never noticed before, but you can use multislider instead of slider
      Share
    • Christopher Dobrian's icon
      Christopher Dobrian's icon
      Christopher Dobrian
      Jul 21 2017 | 2:55 pm
      It's best to think of the 'minimum' as the 'offset' that will be added to whatever comes in the inlet. For an integer slider, the range will be 'range' different integers from 0 to range-1, plus offset, whereas for a float slider the range will be the full range from 0. to range., inclusive, plus offset.
      Max Patcher
      In Max, select New From Clipboard.
      Show Text
    • Roman Thilenius's icon
      Roman Thilenius's icon
      Roman Thilenius
      Jul 21 2017 | 9:16 pm
      it is a silly behavior, you would think that a GUI object alsways outputs what it gets as input (and i second the reference to the mslider object as alternative), but it has historical purposes, so dont be angry at it.
    • DominikK's icon
      DominikK's icon
      DominikK
      Jul 24 2017 | 12:13 pm
      Thanks for the answers. I expected it to be one of the infamous historical max behaviours. I just couldn't believe that I never noticed it in all these years of max.
    • Christopher Dobrian's icon
      Christopher Dobrian's icon
      Christopher Dobrian
      Jul 24 2017 | 2:57 pm
      You can think of it as a sort of scale object hidden inside the slider. It's the 'hidden' aspect that makes it problematic, and the somewhat deceptive word 'minimum', which refers to the minimum output, not the minimum input.
      Max Patcher
      In Max, select New From Clipboard.
    • Roman Thilenius's icon
      Roman Thilenius's icon
      Roman Thilenius
      Jul 24 2017 | 7:39 pm
      if you want it to be a part of a collection of objects all dealing with thi skind of range, it might be easier to add the offset outside. set it base 0 , range 2, then do -1 at the output, nothing at the input.