### 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

mat

###### Attachments:

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…

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…

mat

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

one way of many:

**all**of the following text. Then, in Max, select

*New From Clipboard*.

```
----------begin_max5_patcher----------
526.3oc0UEzaaBCE9L7qvxm15XHaHNYYm5Nta6dUUjC3k3HvlY6zvVU+uOrM
jkTUPrzHT6A.8d9oO+884me7XX.bsrlogfuBtCDD7XXPfKkMQPab.rjVmUP0
txfB1A45cvH+RFVswkdG2DKjbMCLCjskp.IHD.iPcEJ1WxEELiCDbaxeJEFA
sj4P3aJNs3jxk6Mc0mzl0mx76Jlmw1ccUI0n30vH.DBt+Df07+3JCmDiZSWQ
MYa4hMqTrLiGhTTypVxZ+fSI9nXzQn34N10n4OmBsodJLz9J506WxJvsMOe5
E8nj2NdzrEwjFWg38HDZHOBeIdj0LpNvE4xCC1uLREetN6WPKcJIkPhS5z2K
Jojq74NqtRAt08VyEePHUk2gt+le78OdywXrK9sdmwxDqQhmk5ZIHoC1Yr3J
aidpCvuql2z5XXhedyxAcrubINlQtYSA6+3dDtO0xElwbM53Ly9Uxb3QTTM9
ugoVwDz0EtcBc8ZK9UC1JIfbUt2zqurlJ1b4yQm6O5SF7WMmMxwU.rfKd9ep
c6gM+4NkVtWk0QVOZQf+sM4LsgKnFtTbRMomUyVddNysbmdx4Z6AVd+mXikM
3QvFbxjQmzwPmoybVLR5fmD5LlNmlwTSk6LeDzY55bdlv6wcVbg7weqmVU8.
SoawzQklIg6jJa37HWHW3CcHBUrG3c0SBsn8T3eAFc6vHA
-----------end_max5_patcher-----------
```

Thank you Robert,

now it’s clearer.