Forums > Jitter

flow from jit.matrix A to jit.matrix B, but ignore plane X from jit.matrix A

Jul 14 2012 | 11:51 am

…if that makes sense? :)

In other words, I have stuff going on already in plane X in matrix B. Now I want to add to that everything from matrix A except its plane X.

I think I can do this with jit.op, but I would have to pass both matrices A and B through it and create a third matrix C.

Is there a way I can do it without having to create a third matrix?

Jul 14 2012 | 12:42 pm

Could you use [jit.unpack] to grab the planes you want from matrix A?

Jul 14 2012 | 12:52 pm

yeah, but then I still have to unpack the one plane I want from matrix B, and then pack them all into a third matrix C.

I’m actually going ahead with using a 3rd matrix, seems like it’s the easiest way.

Jul 15 2012 | 12:59 am

You can do it with jit.op with a multi-plane op attribute, which is probably the most expedient and efficient. If your concern is parsimonious use of memory, you can use a named matrix to do the addition in-place.

-- Pasted Max Patch, click to expand. --

Jul 16 2012 | 4:22 pm

you could also do this with a single jit.pack, using the offset and jump attributes:

-- Pasted Max Patch, click to expand. --

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > Jitter