speed of drawing from a lcd object

ManuTheFrog's icon

Hello everyone,

I am almost a complete newbie to Max MSP, and moreover I am french and not really good at English, so apologies if what I am asking you is already in FAQ.

As you could see in the title of my post, I would like to find a way to record the speed of what is drawn on an LCD, if you suppose you simply draw an horizontal line.

I was told that it could be done with the "metro" object, but how could it be possible to record values with it, and then put it in my Javascript file ?

Thanks very much
Manuel

pdelges's icon

speed is the ratio between a distance and a duration. You could express the speed of a drawning in pixels/s.
As lcd gives you the position of the pointer, if you compare it with the position at the previous second, you'll easily get the distance, in pixels, and the speed.
[metro] won't record values, but gives the rate at which you will check the position of the cursor and compute the speed.

BTW, javascript may not be the best place to post about this topic. Or are you confusing lcd and jsui?

p

pdelges's icon
ManuTheFrog's icon

Even if your example is "dirty", you help me a lot and sorry if I placed that topic here. So, do you mean that [metro] allows to change the argument of [speedlim] ?

thank you very much