Crossfading between multiple movies

Jimbuck's icon

Greetings folks, I am working on an installation that uses motion tracking within the space to determine which video clip will be triggered...I have 5 video clips, each uniquely rendered to be triggered based on proximity within the space..I have partitioned the screen in the cv.jit object to output bangs when an object falls into that portion of the space. I was wondering if there was an easy way to setup one large crossfader that fades between clips when tracking occurs. Any ideas on a solution would be appreciated. I have been racking my brain over this and would love some input from the community. Here's the patch...

Cheers,

-Craig

Jimbuck's icon

One more thing! I was having difficulty in an earlier project crossfading the audio that is embedded within the movie clip as well....Hopefully this isn't much of an issue to resolve. Thanks again!

Rob Ramirez's icon

you haven't really specified how you want them to mix, so i'll assume linearly (mov1 to mov2 to mov3 etc.)

easiest way is to cascade 5 jit.xfades to mix between your five sources. best way is to use slabs, something like in examples/jitter-examples/render/slab/jit.gl.slab-op3sources.pat.

you probably want to create one fader to fade from 1 to 5.
i've included a very crude example of one way you can to that.

plug the float box into the amount param for each slab (or xfade attribute for jit.xfade)

for sound you want to use spigot~ and mix it with msp objects. although you can probably use the same fader values for this as well.

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

Rob Ramirez's icon

actually, that fader wouldn't actually work with the slab patch without some further tweaking, but maybe it will push you in the right direction.

Jimbuck's icon

Thanks for the response. I wasn't able to get jit.xfade to fade across more than two video clips....there has got to be a way to automatically have these clips mix in relation to the cv.jit parameters....Anyone ideas?

Cheers,

-Craig

Rob Ramirez's icon

there's really nothing that's "automatic" about max.
it does what you tell it to do.

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

Jimbuck's icon

Hey thanks for the help. I seemed to have sorted out getting the movies to be triggered by the crossfader that is assigned to the motion tracking. I was wondering a few things.....

1. How can I have one clip constantly playing and only if the space becomes occupied does the clip crossfade to another. Then, as someone leaves the space the original clip plays at full visibility.

2.Ideally I would like to have only two clips of the 5 crossfading when motion is detected. This will prove to be crucial as I am also crossfading the audio from each of the video tracks.

3.You mentioned in an earlier post about using spigot~ to aid in crossfading between the movies. How would this be approached? I am having some issues with the spigot~ object and it seems that I am not the only one having a tough time with it.

Thanks again. Any help is appreciated.

Benedict Eris Carey's icon

$1fader.maxpat
Max Patch
replaced the # 1s with $1s