live camera effects in a loop

Alexandros Sapounidis's icon

Hi,
I have no experience on MAXMSP and I 've made two different video effects that both work separately (I open the camera for the first one, close the camera and then open it for the second effect). But as I need it for a presentation I need them to loop (One works for some time, then it stops and initializes the second effect and then again the first one ). Thanks :) Waiting for a response!

effect-1.maxpat
Max Patch
effect-2.maxpat
Max Patch
Jean-Francois Charles's icon

Can't look at your code right now, but you could try first to put all of your code in one patch.
Then, you could try a [gate 2] to route your matrices (output of jit.grab?) to one FX line or the other.
Drive the left input of your [gate] with 1 or 2, alternatively, maybe using a long timed [metro].

Alexandros Sapounidis's icon

Thank you very much for the reply! I 've tried to use these two effects in one patch and connect them to an output (jit.grab) by using jit.xfade but it didn't work. And if you could explain me what do you mean by using a long time metro it would be helpful.

SID's icon

Hi Alexandros,
I put your two effects together through a (jit.xfade) in the one patch. I've had to bunch things up a little to account for the extra objects, but you should still be able to recognise your original objects for each effect. I've also included Jean-Francois' idea for a long-timed metro that switches between the effects over the course of several seconds. I've made this switching incorporate a mix of the two effects as the blend goes from one effect to the other.
I can't say it's the most efficient use of resources, but it works to your specifications (I hope).
Cheers.

effects1-2a.maxpat
Max Patch
Alexandros Sapounidis's icon

This is amazing!! Thank you so much I really appreciate it!!!

SID's icon

My pleasure, Alexandros.
Your request was a great opportunity to freshen up my rusty jitter skills.