counting from value to value, slider value goes fluently to new slider value
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.).
patch: https://cycling74.com/forums/slowdown-servo-move
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.
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.
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. :)
thanks
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...
scale: I though so.
geniuses: I'm sure about that. ;)
I usually title such requests with the words 'simple math problem', and the responses are many, fast, and always right..good luck
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.
Thanks a lot Tim!
Saved my project.