Multiple patches on one second screen

sa star's icon

Hi all,
I really need your help.

So I am exploring Max Jitter for a while and I created around 6 good working patches. The thing is I will be using them in performance, so I have a projector at my home and I can make them work on second screen, works fine, I also mapped stuff in presentation mode so I can use my controller, but the issues is, I am apparently missing how to "build" them together so I can automatically switch between patches in full screen when performing..?
I am looking online but I simply don't get it.

I attached a patch that I found here, but it's also a mystery to me how it works..?

Maybe someone can help me, much appreciated!

pager.zip
application/zip 71.58 KB

carsol's icon

hey... one option.... in a main patch, put your patches into subpatches and use the enable property ... like this

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

sa star's icon

@Carsol thanks so much!
I tried your idea, and it works when I have patches without world object...could you maybe take a look at my patch, or just point me on what to consider about it?

MainPATCH.maxpat
Max Patch

carsol's icon

you only need one render context, meaning you only need one jit.world in the main patch. If you add another jit.world into a subpatch you are declaring another context and another output window and I guess isn't what you want. Check the posted patch...

so remove [jit.world sanja] and remove sanja named context in all gl.objects inside EffectPhotos and then the output will go to the jit.world context in the main patch...

remember ENABLE/DISABLE ALL *.GL objects... meaning jit.gl.texture, jit.gl.mesh etc etc... and keep an eye to the metro's too... if you disable a subpath, stop the metro's or gate them in case you send bangs from jit.world in the main patch...

sa star's icon

@Carsol, great, will do that.
Will this also work if I have more than one subpatch who uses world?

sa star's icon

It actually works so that's good! :)
But one of my "world" patches freezes after I turn him off in main patch, any idea what to do if I want to make sure that the world window goes black again when I switch off on toggle?

carsol's icon

glad is working....
if you enable 0 all the objects that produces output inside the subpatch, the window must go always black.... post striped patch if you still having issues with this...

about having more than one jit.world, yes, you can have but just if you really need them

sa star's icon

Hi @Carsol, thank you for your reply. I was trying to solve the off/on issue with my 4th patch (pasted here) but no success so far. The patch is working but if I switch it off, you can still see it in world..? Maybe you know the answer?

sa star's icon

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

carsol's icon

is just that the jit.gl.mesh isn't connected to the [prepend enable] and for the best, add the @enable 0 to the jit.gl.mesh

sa star's icon

@Carsol omg thank you so much! :) it works now

If you have a little bit more patience, I just found out I will be projecting the patches on different sizes screens (1920x1080, 4400x1440 and 4000x720). Now the world is set to HD 1920x1080, what should I do with other two sizes? No clue.. I also don't know how to physically connect it to my laptop, is this something way complicated? Thank you so much for your help, I really appreciate it.

carsol's icon

you can send the message (size 4400 1440) to the jit.world object to resize the window or to go fullscreen with whatever resolution is set in the projector hitting ESC key (having the window in the projector) and also there's the jit.world fullscreen attribute..

i forgot to mention in the other post that in your first subpatch [p pripletMaterial] you have several jit.gl.* objects always enabled; lights, mesh, material, camera......

if you use this enable 0/1 method with subpatches in a big main patch, you need to be very careful with this.... and always set ALL JIT.GL.* with an enable 0 attribute... and enable them only when you activate the scene

sa star's icon

@Carsol thanks! :)
Can the suggested method run in the same time on those 3 different screens? Can I just drag the window 3x (if I have Matrox Triplehead2go for example)?

carsol's icon

is a bit difficult to give a precise answer without knowing which is the whole scenario and what you trying to achieve....

if the content is different for each screen, with the th2go, you can span the window to the three screens (config the th2go as a single desktop) and then place the content in the right sweet spot.... or you can try having multiple jit.worlds...

if the video content in the 3 screens is going to be always the same, I would say the best is a hardware video splitter... feasible too with the th2go, but you need time to go through some of the Jitter rendering contexts fundamentals and do some searches in the forum ... all is in here! ;)

Roman Thilenius's icon

this very old version of [pager] is basically a solo/mute gate which can trigger the "bringtofront" message to [thispatcher] from a remote (i.e. from the window which is currently is foreground)

1.) create an emtpy fullscreen window and save it under two different names to disk

2.) put this in the first patch

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N thispatcher;
#Q end;
#P newobj 30 185 73 9109513 thispatcher;
#P bpatcher 30 86 340 59 0 0 110.bp.pager.mxb 0;
#P connect 0 0 1 0;
#P window clipboard copycount 2;

3.) and this in the second

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N thispatcher;
#Q end;
#P newobj 30 185 73 9109513 thispatcher;
#P bpatcher 30 86 340 59 0 0 110.bp.pager.mxb 0;
#P connect 0 1 1 0;
#P window clipboard copycount 2;

4.) now open both at the same time (easy on mac, not so easy on silly windows OS) and it´ll function like a big tab control.

if you add keyboard (or midi or network) control and make it invisible you can switch between movies.

Roman Thilenius's icon

...and about your "together" question...

...simply make yourself a "main patch" which contains your other patches as objects (can you say "tree structure"?)

[myproject1] [myproject 2]

if you add at least one [inlet] into all of them, you can now open and close them with it using [pcontrol]