Trigger Video Clips With MIDI Keyboard

amean_n's icon

Hello, I am in the process of creating a patch where I have a MIDI controller to adjust play speeds and effects on the Jitter video.

I would like to use a Midi Keyboard (M AUDIO Oxygen49) to trigger different video clips to play in the imovie box.

Different notes will trigger different video clips.

I have been told that using the notein object would be the best way. I am having difficulty understanding how to assign each key on the keyboard to the separate video clips.

Can someone please recommend a solution.

Thanks :)

Jean-Francois Charles's icon

Hi, don't post the same message in Jitter and Max/MSP forums!

davydka's icon

Here's an example. the umenu automatically populates with a list of files in 'Macintosh HD/movies'.

Hope this helps.

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

jackaperkins@gmail.com's icon

I've been wondering this too.

There seems to be a huge delay using this method since the video is loaded and then played. Isn't there a better way to load the video and then trigger specific points / files similar to using cues with sfplay~ ?

seejayjames's icon

Quote: jackaperkins@gmail.com wrote on Wed, 18 February 2009 23:32
----------------------------------------------------

> There seems to be a huge delay using this method since the video is loaded and then played. Isn't there a better way to load the video and then trigger specific points / files similar to using cues with sfplay~ ?
>
>
----------------------------------------------------

This does work much better in my experience, so if possible, have fewer, longer video clips with different sections that you trigger. Load them up at the beginning into several jit.qt.movie objects, or even one big big video with everything you need, then send it frame $1 commands to jump around (or have a list of loop points to select from, using a preset or a coll). This jumping seems to be pretty much instantaneous. The loadram message can help even more if you have the memory for it. Right when you load you can do a getframecount, then scale a slider to match the length for scrubbing, or a range slider for setting loop points, or set the max values of number boxes which do the same (as the sliders will become tricky to use for long movies).

Note that with a sound track, especially if it's compressed in certain formats (not sure of all details there), changing the rate a lot--especially negative values--can give inconsistent results as jit.qt.movie deals with scaling the audio to follow. Not sure about a workaround aside from having a separate audio track to go with the movie, which if you play from groove~ you'll have no problems with any speed you want. I've had best luck using video with no sound track at all and synching audio to it---that is, when I wanted lots of speed control and changed it rapidly. When playing back relatively normally, or with most positive-number speeds, this was not an issue.