A strange thing of imovie object............HELP!

dreamug's icon

Hi everyone. I m be learning max for about just 10 days with the tutorial.
In the basic tutorial 12 (Movie play back), it says "by sending in a int number will turn the video to the location".
I try it on the first movie "countdown15.mov", please see the picture which is quite strange: the duration of this movie is 10000, but when the int number into the inlet is 6960, the movie has been located to the end....

Please help me about this issue, thx very much.

4614.201211031.24.39.png
png
newdendrite's icon

I think you need to be using either getduration or length instead of the duration message. The documentation in Max for the int input to [imovie] doesn't provide complete information.

Best regards,
Michael

Leah482's icon

***deleted** wrong comment, sorry.

Gregory Taylor's icon

The dendrite is absolutely right. Controlling movie playback isn't all that difficult once figure out how to ask a the right questions. Quicktime has some special ways to describe time [you have to calculate how long in milliseconds the loaded movie is by doing a little math, if you're jonesing to think in milliseconds. You don't need to do that to do nonlinear playback, though]. The jit.qt.movie object will tell you all that stuff if you ask.

If all you want to do is nonlinear playback, you can just send the jit.qt.movie object the message "frame N" (where N is one of the frames in the movie), followed by a bang message (that displays the frame). If you just count through the number of frames, you play the movie forward. If you randomly choose a frame number, it'll play out of order.

You don't have to RTFM to learn about that stuff - Just Jitter Tutorial 4 on Controlling Movie Playback.

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

This patch will ask the right questions and tell you what the timescale and the number of frames is, etc. each time you load a movie. You might want to play with it and see if you can figure out what's going on.