Forums > Javascript

speed of drawing from a lcd object

May 19, 2006 | 9:11 am

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


May 19, 2006 | 10:03 am

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


May 19, 2006 | 10:31 am


May 22, 2006 | 8:32 am

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


May 22, 2006 | 8:53 am


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