Quick question regarding jit.pwindow/jit window

paperluffy's icon

Hello, thanks for the help!

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

I just had a quick question, can you make the jit.window white? In the preferences I see that you can change the border, but I want the whole matrix white. I have a video that is using pak positioning and while moving through the space of the window, the background is black, but i want to change it to white. A quick patch is down below. Thank you for the help!

dtr's icon

I had a look but your patch is both non-functional and unreadable...

If it's about making the jit.gl.render background white then an 'erase_color 1 1 1 1' message/attribute will do.

paperluffy's icon

Ill try it out thanks for that. In this particular patch I brought it back into jit matrix from gl so the video could move across the screen.. And I put a little read message so you could put your own video in.. it works for me when I use it? idk weird.

Whoops forgot the q metro lol

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

here it is with the q metro, just throw your own video into it.
Also I just tried and it worked! thank you very much :)

paperluffy's icon

Alright so scratch that it works but I ran into another problem. Basically Im making a mixer, 2 videos cross by eachother and when they over lap they mix using the Jit,op @op + object. Im pretty sure I know why, but the second video that is crossing the screen just stays completely white only showing up when the videos actually add to each other.

Anyway my new question is, is there a way to make the jit.op @op object have either side as the "main" side? I believe the way the object works now is (similar to a normal + object) the left inlet is the main one that bangs the movie through, where as the right inlet is the one mixing to it. I want to know if you can make it essentially store the last video put into either inlet (left or right) and when another video goes into the opposite inlet it becomes the "main" one.

basically I want the jit.op object to be dynamic, can you do this?

paperluffy's icon

Sorry for the third post in a row, I just wanted to make my question a little bit more clear. In the jit.op help file it says it applies a binary operator to two input matrices, or a unary operator to the left input.
What my above question was asking, is it possible to make that unary operator come out of either input? So if you have say a video going into the right inlet, and only have that playing (not the left one) I want it to still play as the outcome.

Thank you very much for reading and help

dtr's icon

Jit.op indeed follows the same triggering scheme as most Max objects, only acts when receiving something in the left. This is fine in the usual setup where you have one qmetro banging all your video sources (ie. one main 'clock'). You make sure in your data flow that the right input is always received before the left.

Now if you want it to also fire when a matrix is only received in the right inlet you can send a bang to the left inlet after the matrix in the right. That will also activate the object and it will work with whatever was previously received in the left inlet.

What you should watch out for is double triggering of your jit.op object. If you patch it so that every time a matrix is sent to the right inlet a bang is sent to the left inlet as well, you might be double triggering it when also a matrix is sent to the left inlet within the same 'frame', leading to unnecessary processing and potentially performance decrease.