## acceleration recognition

Jun 13 2009 | 3:31 pm
Hi all
here is a simple patch demonstrating my attempt to do a acceleration detector. It does work very well. I've searched the forum and the max objects list for an external that would do this but did not find anything. It's obvious that in order to accomplish this you need time based objects but I only know of [thresh][quickthresh][timer][clocker].
any suggestions would be greatly appreciated.
thanks a lot
phil

• Jun 14 2009 | 6:38 am
OOPs !!
I meant it doesn't work very well. Damn I should really reread myself more often. sorry about that.
Again, Since it DOESN'T work very well, would any of you have any suggestions.
Thanks and sorry about my mistake.
phil
• Jun 14 2009 | 5:26 pm
• Jun 14 2009 | 7:29 pm
Hey Thanks a lot Holland.
Not quite sure what's going on your subpatch, will need to investigate further.
I just love simplified patching like that!
thanks again it works like a charm.
phil
• Jun 17 2009 | 1:47 am
It's a bit of a hack, but it works. Technically velocity = change in distance / time and acceleration = change in velocity / time. Since the values are always updated at a constant rate, I've just pulled time out of the equations and simplified velocity to change in distance and acceleration to change in velocity. So, a bit of a hack, but one that's proved useful for me.
• Jun 20 2009 | 5:15 pm
Hi Holland
Hi
After having a 2nd deeper look into you "gap calculator patch". My question is;for calculating gaps in between did you choose [bucket] because it does this (by mistake or not) anyways ??
If you look in the help file example; when you quickly change values on input slider, bucket creates a gap in it's output.
Again, I understand that by putting a
[metro 50] | [i ] |
that's what your creating , a (calculate the gap between 2 values @ the rate of 50ms)
thanks again
phil
• Jun 20 2009 | 5:25 pm
here is a patch that illustrates what I mean with no metro @ all.
what do you think??
phil
• Jun 20 2009 | 5:35 pm
yet another version.
SO what is the speed of bucket ?!!
phil
• Jun 21 2009 | 9:30 pm
Bucket simply outputs the previous input, so its "speed" is entirely dependent on the rate of the data fed into it. Your second patch (the one without the metro) works because the slider object doesn't interpolate between values. Hook up [print] to the output of a slider, mouse around a little and you'll soon see plenty of "gaps" between values. Someone who knows much more than I do about how Max interacts with the OS can probably explain this behavior.
The advantage of using a metro to bang out incoming data at a constant rate is simply so you don't have to calculate the time between successive values in order to find velocity or acceleration.
• Jun 21 2009 | 9:52 pm
Hi holland
thanks for the reply. Yes so my point stands that one can called the accel based on the gap/space between values. So if having a [number box] that outputs to slowly
I pressume it's totally based on scheduler speed/Overdrive/computer speed etc...
thanks again, for your little patch. It's very handy for interactive stuff
phil