counting from value to value, slider value goes fluently to new slider value

    Apr 01 2010 | 6:06 pm
    Hi, Im trying hard to fade fluently from one value to another. trying to control servos slowly from old value to new. Basically try to imagine slider on one left and slider on right. If I click on left one, the right one slides to the new value fluently, in speed x (metro for ex.).
    I tried to solve that using [counter], but its hard to set up correctly when it should count up and down. It not always works, for ex. if the new number is not bigger than the number before the previous.
    Perhaps there is some object making this really easy.

    • Apr 01 2010 | 7:37 pm
      If I understand your request, I think [line] might help here: [slider]->[$1 100] message -> [line] -> [slider]. That's the simplest way to do it in Max; but i've never used serial-output to control servos.
    • Apr 01 2010 | 8:33 pm
      great! now I will just relativize speed for different values to fade (now same time to fade from 1-100 as 1-10) and its done. :)
    • Apr 01 2010 | 8:54 pm
      not sure about the last bit, but maybe look at: [maximum], [peak], [scale] and related objects; you might be able to cobble something together - there are some geniuses on this forum who could do this in their sleep...
    • Apr 01 2010 | 9:11 pm
      scale: I though so.
      geniuses: I'm sure about that. ;)
    • Apr 01 2010 | 9:14 pm
      I usually title such requests with the words 'simple math problem', and the responses are many, fast, and always right..good luck
    • Apr 01 2010 | 9:45 pm
      This should get you started (It does what you need if I'm understanding correctly).
      Although there is a problem with the method, in that if you set a new destination value before line has finished ramping, line might have to "jump" to the old destination value (now the starting value). It may not be an issue unless your ramp time is long though.
    • Sep 09 2010 | 12:22 am
      Thanks a lot Tim!
      Saved my project.