Forums > Jitter

jit.matrixset can't be named?

May 3, 2006 | 12:37 pm

I’m sharing a jit.matrixset amongst different locations in my patch.
Normally with a jit.matrix, you give it a name and you’re done. Names don’t
seem to work with jit.matixset. I need to query an outputmatrix at location
A while not sending it to B or the other placed I use the matrixset. I can
think of a workaround by using a jit.matrix @thru 0 at the
jit.matrixsetoutput, but am I overlooking something? Is there a reason
for the object NOT
to have a name attribute?

-Thijs


May 3, 2006 | 1:07 pm

hoi thijs,

as far as i know (which might not be far enough ;-) there is no way
to reference the matrices of a jit.matrixset by names.
have a look at mxj matrixlist, which makes this and other nice things
possible.

groetn,

jan klug


May 3, 2006 | 1:59 pm

Hi Jan, thanks for the tip. I wanted a global reference to the matrixset
object global, just like jit.matrix can. I’ll have a look at the java thing
and figure something out.

best, thijs


May 3, 2006 | 5:39 pm

hey,

a good workaround is to put it into an abstraction with a set of named
send and receive pairs and voila – a named jitter matrix buffer!
save this as matrix-buffer.mxb and load it into any patch. you can
easily expand on this idea to write into the matrix.

all the best,

jeremy

http://www.mantissa.ca

max v2;
#N vpatcher 267 260 1025 667;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 145 46 309 196617 simple named buffers with jit.matrixset;
#P comment 228 87 163 196617 use $1 to make the name dynamic;
#P newex 326 167 68 196617 prepend send;
#P newex 144 137 107 196617 prepend outputmatrix;
#P newex 144 236 47 196617 forward;
#P newex 144 113 192 196617 unpack i l;
#P newex 144 166 158 196617 jit.matrixset 20 4 char 320 240;
#P newex 144 85 68 196617 r set01;
#P comment 349 115 309 196617 index and destination (so you can send it
to multiple locations);
#P connect 1 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 2 0;
#P connect 2 0 4 0;
#P fasten 6 0 4 0 331 210 149 210;
#P connect 3 1 6 0;
#P pop;


May 4, 2006 | 3:44 pm

Hey Thijs,
My new favorite solution to this is to use the poly~ object to create a
bank of named jit.matrix objects. The named matrices can then be called
whenever you need them by naming your output matrix. The sprintf object
is your buddy. See attached patch. Coming soon to a Recipe book near you.

Cheers,
Andrew B.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N in 1;
#P newobj 229 172 25 196617 in 1;
#P newex 229 211 168 196617 jit.matrix 4 char 640 480 @thru 0;
#P newex 263 172 94 196617 sprintf name ab%s;
#P number 42 55 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 42 87 27 196617 t b i;
#P newex 263 123 48 196617 loadbang;
#P newex 263 147 52 196617 thispoly~;
#P user jit.pwindow 58 185 82 62 0 1 0 0 1 0;
#P newex 59 164 55 196617 jit.matrix;
#P newex 59 126 94 196617 sprintf name ab%s;
#P comment 242 103 100 196617 inside of a poly~;
#P user panel 220 58 188 196;
#X brgb 255 255 255;
#X frgb 157 157 157;
#X border 5;
#X rounded 20;
#X shadow 0;
#X done;
#P comment 74 109 115 196617 this is your output stage;
#P connect 10 0 11 0;
#P connect 12 0 11 0;
#P connect 6 0 10 0;
#P connect 9 0 8 0;
#P fasten 8 0 4 0 47 151 64 151;
#P connect 8 1 3 0;
#P connect 3 0 4 0;
#P connect 7 0 6 0;
#P connect 4 0 5 0;
#P window clipboard copycount 13;


May 4, 2006 | 4:15 pm

Thanks for the replies. For my patch, it was vital to read and write the
matrixset to files as quickly an easy as possible. I really like that about
matrixset. I solved my problem by simply putting a (temporary) matrix at the
output. Request the matrix I need, dump the output to anywhere I need it,
request another, etc. works like a charm.

best,

-thijs


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