Forums > Jitter

jit.op initialization delay??

July 27, 2007 | 11:28 pm

i am sending a matrix in the right input of jit.op then immediately following that with a matrix in the left inlet triggering the operation to execute, i have been running into a problem with jit.op not doing the calculation correctly the first time.
whenever i run my program a second time all the outputs are as expected.
the below patch illustrates what i am having trouble with, the first time you run the patch the output is not correct, but subsequent tries produce the correct results.
i understand it sounds like an initialization problem, but i am using triggers to ensure that i am sending a matrix to the right inlet before the left inlet.
any suggestions?

max v2;
#N vpatcher 20 74 632 635;
#P window setfont "Sans Serif" 9.;
#P newex 47 372 106 196617 jit.print @title result;
#P newex 222 291 94 196617 jit.print @title dos;
#P newex 64 293 94 196617 jit.print @title uno;
#P newex 47 264 27 196617 t l l;
#P newex 205 265 27 196617 t l l;
#P newex 47 180 55 196617 zl group 9;
#P newex 47 208 55 196617 jit.fill uno;
#P newex 47 236 136 196617 jit.matrix uno 1 float32 3 3;
#P newex 205 234 136 196617 jit.matrix dos 1 float32 3 3;
#P newex 205 178 55 196617 zl group 9;
#P newex 205 206 55 196617 jit.fill dos;
#P button 47 64 15 0;
#P newex 47 120 30 196617 t b b;
#P newex 47 92 40 196617 uzi 9;
#P message 205 151 14 196617 2;
#P message 47 153 14 196617 1;
#P newex 47 337 97 196617 jit.op @op – @val 8;
#P connect 5 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 1 0;
#P connect 1 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 13 0;
#P connect 13 0 0 0;
#P connect 0 0 16 0;
#P connect 13 1 14 0;
#P fasten 12 0 0 1 210 330 139 330;
#P fasten 4 1 2 0 72 142 210 142;
#P connect 2 0 7 0;
#P connect 7 0 6 0;
#P connect 6 0 8 0;
#P connect 8 0 12 0;
#P connect 12 1 15 0;
#P pop;


July 28, 2007 | 1:37 am

Not sure this answer is correct, and it is certainly not a solution. But it
seems that jit.op needs to know what kind of matrix it is dealing with
first, which is defined by something going into the left inlet, or with
arguments. This seems to work.

Christopher Overstreet

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 47 372 106 196617 jit.print @title result;
#P newex 222 291 94 196617 jit.print @title dos;
#P newex 64 293 94 196617 jit.print @title uno;
#P newex 47 264 27 196617 t l l;
#P newex 205 265 27 196617 t l l;
#P newex 47 180 55 196617 zl group 9;
#P newex 47 208 55 196617 jit.fill uno;
#P newex 47 236 136 196617 jit.matrix uno 1 float32 3 3;
#P newex 205 234 136 196617 jit.matrix dos 1 float32 3 3;
#P newex 205 178 55 196617 zl group 9;
#P newex 205 206 55 196617 jit.fill dos;
#P button 47 64 15 0;
#P newex 47 120 30 196617 t b b;
#P newex 47 92 40 196617 uzi 9;
#P message 205 151 14 196617 2;
#P message 47 153 14 196617 1;
#P newex 47 337 135 196617 jit.op 1 float32 3 3 @op – 8;
#P fasten 12 0 0 1 210 330 105 330;
#P connect 0 0 16 0;
#P connect 13 0 0 0;
#P connect 12 1 15 0;
#P connect 8 0 12 0;
#P connect 6 0 8 0;
#P connect 7 0 6 0;
#P connect 2 0 7 0;
#P fasten 4 1 2 0 72 142 210 142;
#P connect 13 1 14 0;
#P connect 9 0 13 0;
#P connect 10 0 9 0;
#P connect 11 0 10 0;
#P connect 1 0 11 0;
#P connect 4 0 1 0;
#P connect 3 0 4 0;
#P connect 5 0 3 0;
#P window clipboard copycount 17;

On 7/27/07 4:28 PM, "quin" wrote:

> max v2;
> #N vpatcher 20 74 632 635;
> #P window setfont "Sans Serif" 9.;
> #P newex 47 372 106 196617 jit.print @title result;
> #P newex 222 291 94 196617 jit.print @title dos;
> #P newex 64 293 94 196617 jit.print @title uno;
> #P newex 47 264 27 196617 t l l;
> #P newex 205 265 27 196617 t l l;
> #P newex 47 180 55 196617 zl group 9;
> #P newex 47 208 55 196617 jit.fill uno;
> #P newex 47 236 136 196617 jit.matrix uno 1 float32 3 3;
> #P newex 205 234 136 196617 jit.matrix dos 1 float32 3 3;
> #P newex 205 178 55 196617 zl group 9;
> #P newex 205 206 55 196617 jit.fill dos;
> #P button 47 64 15 0;
> #P newex 47 120 30 196617 t b b;
> #P newex 47 92 40 196617 uzi 9;
> #P message 205 151 14 196617 2;
> #P message 47 153 14 196617 1;
> #P newex 47 337 97 196617 jit.op @op – @val 8;
> #P connect 5 0 3 0;
> #P connect 3 0 4 0;
> #P connect 4 0 1 0;
> #P connect 1 0 11 0;
> #P connect 11 0 10 0;
> #P connect 10 0 9 0;
> #P connect 9 0 13 0;
> #P connect 13 0 0 0;
> #P connect 0 0 16 0;
> #P connect 13 1 14 0;
> #P fasten 12 0 0 1 210 330 139 330;
> #P fasten 4 1 2 0 72 142 210 142;
> #P connect 2 0 7 0;
> #P connect 7 0 6 0;
> #P connect 6 0 8 0;
> #P connect 8 0 12 0;
> #P connect 12 1 15 0;
> #P pop;


July 29, 2007 | 6:39 pm

oh thanks, that makes sense


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