compute acceleration of mouvement to control motor with beauty!
Hi all,
I wish to control motor with music and I have a patch enabling to do that.
But in order to not confuse you too much, I just post a patch computing a distance between two positions
Is there a better way to compute distance between two positions?
Distance is it enough to get acceleration ?
My motor can do 6400 step in one sec.
To do that I have to set max.speed, let's say 12800 step/s
And I have to set acc as 6400 step/(s*s)
Tomorrow I will test to scale distance [scale 0 6400 0. 6400.] or [scale 0 6400 0. 12800.] in order to see the behavior of motor.
Do you think acceleration should be suitable to position ?
Here you can see distance when I move quickly live.dial in both way

ps : In order to get a better acceleration computing, should I substract the old distance to the actual distance and divide all by three?
But in order to not confuse you too much
Sorry, you did.
I guess you can replace everything in the patch you posted by this:

Your solution was funny to see but not optimal at all.
So we are basically computing the difference between two positions in a small laps of time. This is what we call speed! Acceleration is the derivative of speed, so you might want to repeat the same process:

But honestly I still don't understand what you really want to do.