Jitter - Add Noise to Matrix but only to Values that aren't 0

Sym's icon

Hey, I'm trying to figure out how I can set it up that I add jit.noise to a jit.matrix but only have the noise beeing added to the values in the matrix that aren't 0.

Can somebody give me a hint how to achieve this?

Jesse's icon
Max Patch
Copy patch and select New From Clipboard in Max.

You can mask your input matrix using jit.op, and then multiply by a noise matrix.

matmat's icon
Max Patch
Copy patch and select New From Clipboard in Max.

hi,
at the same time Jesse :)

Sym's icon

Thanks guys, that worked perfectly!

Now I have the noise only on the values over the treshold and I would like to scale it depending on the value of the number in the matrix it is modulating.

So that to numbers in the matrix with smaller numbers only a smaller amount of noise is added.

Is there any object to scale the incoming noise matrix accordingly?