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


    Aug 31 2012 | 7:54 pm
    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?

    • Aug 31 2012 | 8:05 pm
      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.
    • Aug 31 2012 | 8:59 pm
      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.