video playback question

danieljay's icon

greetings!

so I've got this patch. I've got it scrolling through a video forward and reverse using the mouses "Y" axis. the problem I'm having is that I want the video to automatically reset normal playback (rate 1) when you release the mouse. I'm overlooking something pretty basic.

the mumbo jumbo on the right of the patch are just half thought ideas that aren't working. suggestions? (patch attached)

3534.forwardrevedited2.maxpat
Max Patch
Tobias Rosenberger's icon

you have to send a message "rate 1." to jit.qt.movie when you release mousebutton. The first outlet of "mousestate" gives you information if the mouse button is pressed, so you could connect a "sel 0" object to it that bangs the "rate 1."-message

danieljay's icon

in theory that should work. i also smoothed out the incoming number since they were chaotic, but still nothing responsive.

yp's icon

You're probably sending 1. to "rate $1" while [line] is still running, thus having that value always changed to [line]'s target value.
Using that logic, you can either gate the [line] and send a 1. directly to the rate parameter, or otherwise send 1. to the [line] object itself, which will override the last target value.

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

Here is a solution with two [gate] objects.

danieljay's icon

i am a bit confused. and the patch seems to lock the values. i guess I'm trying to understand why the select isn't connected to anything and why you would need two gates. to clarify, the static, non active mouse state value is right outlet next to incoming y axis values. could you maybe illustrate it a bit more clear in a patch? sorry Im pretty new and it takes me a bit to conceptually grasp these concepts.

danieljay's icon

its canceling out the smoothing of the numbers this way of the y axis. suggestions?

yp's icon

Here is a more elaborate explanation..

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

HTH

danieljay's icon

great clarification! thanks so much. i just need to find a better smoother for outputting number values that isn't using "line"