Combine a 4-plane matrix and a 1-plane matrix into a 5-plane matrix?

Aug 31, 2012 at 7:54pm

Combine a 4-plane matrix and a 1-plane matrix into a 5-plane matrix?

I have two ‘streams’ of matrix data – one with 4 planes and one with 1 plane. Eventually they are mixed down into a single 5 plane matrix.

Up until now I have been using 5 plane matrices throughout the whole patch. The first stream only uses the first 4 of those planes. The second stream only uses the fifth plane.

This makes it easy to mix down the two matrices, using [jit.op @op pass pass pass pass !pass]

However, there are obviously a lot of redundant planes.

Are there better ways of doing this?

#64166
Aug 31, 2012 at 8:05pm

not sure if it’s more efficient, but you can use jit.pack

[ jit.pack 2 @jump 4 1 ]

4 plane matrix in left inlet, 1 plane matrix in the right.

#231433
Aug 31, 2012 at 8:59pm

Thanks Robert, I did think about jit.pack.

I was more interested to know about the efficiency. Working with databases taught me to always use the smallest possible container for a piece of data, so having empty planes feels wrong to me.

#231434

You must be logged in to reply to this topic.