Forums > Jitter

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

June 11, 2013 | 10:54 am

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:
<code>

– Pasted Max Patch, click to expand. –

</code>


June 11, 2013 | 5:33 pm

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…



ak
June 12, 2013 | 1:43 am

I don’t know if it’s more elegant solution, but here you have…

<code>

– Pasted Max Patch, click to expand. –

</code>


June 12, 2013 | 2:12 am

If you’re looking for elegance, jit.gen fits perfectly!
<code>

– Pasted Max Patch, click to expand. –

</code>


June 12, 2013 | 3: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
<code>

– Pasted Max Patch, click to expand. –

</code>



ak
June 12, 2013 | 1:26 pm

(op + $2) – you want a matrix name, not "jit_matrix" symbol.


June 12, 2013 | 11:55 pm

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 ….

<code>

– Pasted Max Patch, click to expand. –

</code>


June 13, 2013 | 12: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)

<code>

– Pasted Max Patch, click to expand. –

</code>



ak
June 13, 2013 | 3:12 am

with one more intermediate jit.matrix:

<code>

– Pasted Max Patch, click to expand. –

</code>

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.


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