Forums > MaxMSP

acceleration control

August 9, 2010 | 7:37 am

hi,
I’m controlling a motor by trying to avoid inertia when it has reached its target value.
In order to do that, I used the line object en the bline one but none of them allowed me to really smooth the movement. I can’t realy get rid of steps in the motor trajectory.
I would like to create a smooth acceleration at the beginning and a smooth decelaration a the end.
Ideally the trajectory would be a sigmoid curve.
is there better solutions than line or bline to do such a thing?
thanks a lot for your help


August 9, 2010 | 10:10 am

A number of ‘smoothing’ solutions were suggested here

http://cycling74.com/forums/topic.php?id=15180

Brendan


August 9, 2010 | 5:33 pm

Marc, You can calculate the desired acceleration/deceleration curve using expr. Someone who knows physics better than I do might disagree with me, but I believe that the "smoothest" acceleration/deceleration is exhibited by simple harmonic motion (like the swinging of a pendulum), which would be a sinusoidal curve rather than a sigmoid curve (and a sigmoid is theoretically asymptotic, i.e. never truly reaches its goal). But you can calculate either with expr. Here’s an example comparing the two. –Chris

– Pasted Max Patch, click to expand. –

August 9, 2010 | 9:36 pm

thanks brendan for your link and chrisopher for your patch. Actually expr is the perfect solution for me.
I will play with functions to find the best for my application.
time to revise my maths….


August 11, 2010 | 11:12 pm

here's an addendum which puts those curves into a table and lets you invert the values:

– Pasted Max Patch, click to expand. –

[attachment=138696,959]

Attachments:
  1. screenshot_expr_curves.PNG

August 12, 2010 | 12:04 am

thanks seejayjames for this inverting tip….


Viewing 6 posts - 1 through 6 (of 6 total)