combining 4 matrices using op message of the jit.matrix object


    Jun 11 2013 | 5:54 pm
    hello jitter community,
    I have a question about the op message of the jit.matrix object.
    I made an example patch, which shows, what i am trying to achieve.
    I simply want to add 4 matrices together with an overlap range.
    In my patch i do this using 4 jit.matrix objects and 3 jit.op operators.
    It works, but it seems not very elegant.
    It should be possible with one jit.matrix object.
    In the reference i found the op message of the jit.matrix object, but i did not get it to work.
    Havent found an example how to use this feature ...
    Perhaps someone can give me a hint.
    Thanks in advance,
    tom
    here is my patch:

    • Jun 12 2013 | 12:33 am
      I'm no jitter expert , but I know there's the jit.expr object which I think can accept more than one matrix input, (or if you're clever with constructing an expressions you might be able to do as an operation on one matrix). But it doesn't seem well documented...
    • Jun 12 2013 | 8:43 am
      I don't know if it's more elegant solution, but here you have...
    • Jun 12 2013 | 9:12 am
      If you're looking for elegance, jit.gen fits perfectly!
    • Jun 12 2013 | 10:04 am
      hello all,
      thanks for looking in my patch and for the great examples !
      but what i am trying to achieve is to use one single jit.matrix (or jit.gen) to position and mix the 4 incoming
      matrices in add mode. i am hoping that it will take less cpu power ;-)
      i have attached a patch which does not work.
      i tried to send the following messages for each incoming matrix.
      dstdimstart > dstdimend > op + matrixname
      perhats this is not possible to do this in one step with jit.matrix and the "op" message ...
      i will definitly try the jit.gen way !
      best,
      tom
      here is the patch
    • Jun 12 2013 | 8:26 pm
      (op + $2) – you want a matrix name, not "jit_matrix" symbol.
    • Jun 13 2013 | 6:55 am
      thanks a lot andrzej !
      now i can combine the matrices :-)
      the only thing, which is not working is that jit.matrix is ignoring my dstdimstart and dstdimend commands ....
    • Jun 13 2013 | 7:28 am
      forgot to set the @usedstdim 1.
      but same result.
      seems that we can not use dstdimstart/dstdimend and the "op" message the same time in jit.matrix.
      does anyone know how to combine matrices with different sizes in gen ?
      (with offset and mix mode)
    • Jun 13 2013 | 10:12 am
      with one more intermediate jit.matrix:
      adding whole matrices in gen are really elegant (esp in codebox), but keep in mind this is quite low level processing on cell-by-cell basis.