jitter video playback help!!

danieljay's icon

so heres what I'm trying to do:

play video in jitter. using only " Y" axis, i want to control FPS of video to speed up when going upward. the same thing for going downward on Y axis, except as you go down, the video reverses.

also, when you don't push on trackball, the video defaults to playing normally. please help!!!! I've attached my patch and what I've done below.

im a bit pressed on time/stressed.

3513.forwrdreverse2.maxpat
Max Patch
cap10subtext's icon

You've got a lot going on in that patch that's really not necessary.

You have most of the components you need buried in that patch. Basically here's how it works. The movie is playing, so you know how to do that, get rid of the other crap hooked up to the movie and window that isn't just simply for playing back a movie.

If you are just trying to speed up and slow down the movie, the message you want is "rate $1" and the rate will be a floating point number: 1.00 is full speed, 2.00 is double, -1.00 is reverse, -2.00 is 2x reverse etc..
so you need the mouse Y position (a number between 0 and the height of the screen) to be mapped to a range that you will feed into the rate (you just need to decide what are the minimum and maximum speeds of backwards and forwards). The zmap or scale object would help you with this or you can do the math yourself.
Then you said it changes the speed if the mouse is down but plays back at normal speed (meaning rate 1.0) when it's released.

The code below should start to help with the last part you just need to decide what to do with the bang on mouse up and I would recommend a gate object to control when info from the mouse changes the rate.

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

Hope this helps.

danieljay's icon

great suggestions! it gets overwhelming to decide one of a hundred different ways to do the same thing

danieljay's icon

I'm still a bit confused about one thing. if z mapped lets say the half way point of the y axis from 0-450 (900) total.
now I've attached [zmap 0. 450. 0. 1.] to bang to rate$1 ? I'm lost in the in between and with gating this also for 451-900 to bang rate -1.

3514.forwrdreverse2.maxpat
Max Patch
danieljay's icon

also i same applies to cycling through the frames

cap10subtext's icon

Sorry, just realized my alerts aren't' working. DId you figure it out? You can zmap or use the scale object and set it like [scale 0. 900. -1. 1.] or flip it [scale 0. 900. 1. -1.] then just hook that right up to rate.

Cycling through the frames, you need to stop your movie and then you can use a message like this "frame $1, bang" which means take the movie to frame X and then output that frame. If you do it while the metro is running or if you don't bang after the frame message it won't' work.