different background in matrix with expr

May 22, 2012 at 7:16pm

different background in matrix with expr

I suppose it’s a very stupid question for jitter masters,
but… how can I change the background from black to another color in such a matrix?

Many thanks


  1. DifferentBg.maxpat
May 22, 2012 at 8:06pm

jit.expr fills your matrix based on a formula. in this case you have a one plane matrix only: so if you have black its just the number “0″, if you have pure white it is “255″.

If you want to replace all the black pixels (= zeros), you could first transform the matrix in a 4 plane matrix (jit.matrix 4 char 200 100), then you could use f.e. jit.chromakey to replace black with another color, or you could use jit.op…

May 22, 2012 at 9:26pm

Thank you very much.

So, can’t I create the same effect with a different ‘color background’ inside ‘jit.expr’ (changing, of course the matrix to 4 planes)? I tried to change the expression, but no success…


May 22, 2012 at 9:41pm

since you are simply trying to replace black (or 0), as simple [ jit.op @op + ] will do the trick.
one way of many:

– Pasted Max Patch, click to expand. –
May 22, 2012 at 10:29pm

Thank you Robert,

now it’s clearer.


You must be logged in to reply to this topic.