Recognising a certain gesture

Joe's icon

Hi guys

I posted a while back about recognising a significant movement (gesture) and everyone was really helpful.

I now have a similar question regarding a gesture that is specifically right to left. Is the best method of recognising this gesture to monitor velocity? Or should it be a combination of monitoring gesture velocity and gesture position?

Or is it something completely different?

All the best

Joe Gornall

brendan mccloskey's icon

Hi

Max Patch
Copy patch and select New From Clipboard in Max.

it would depend entirely on what kind of data you're getting (noise-level, resolution etc) but the simplest method for me would be to subtract a previous value from the current, then a positive result means decreasing input/numbers, and vice-versa:

But you said as much in your question :)
Brendan

brendan mccloskey's icon

ooops

just saw the related thread you mentioned; the above patch doesn't really add anything new to the solution I posted there : {

Joe's icon

With that patch you posted, can it be changed to only toggle on when the movement is really fast and the distance is about 50% of the scale?

Does that make sense?

All the best

J

brendan mccloskey's icon
Max Patch
Copy patch and select New From Clipboard in Max.

You'll have to judge for yourself what constitutes "50%" as you haven't given us any specific environment variables, but you can set a threshold like this:

Brendan

zined's icon

HI JOE

"I posted a while back about recognising a significant movement (gesture) "
---> could you tell me where your post is please.
Thanks so much

Denis

Joe's icon

n00b, sorry I was being a bit unclear. I am getting a constant stream of x&y coordinates, but I am trying to get a bang when the velocity (which I have now set thanks to your addition to the patch) and the distance (ie the x coordinates which ranges from 0 - 320) is "significant". By that I mean the numbers for the x-coordinates quickly changes from a number like 300. to 30..

Does that make it any clearer or am I just talking nonsense

All the best,

J

zined's icon

Thank you JOE, it's kind of you

Denis