Forums > Jitter

expression inside jit.expr

September 20, 2008 | 2:51 pm

Hello,

I get no problem with this:
_________________________________

[floatnumbox]
|
v
[pak (cell[0]%4.<1.) * 1.]
|
v
[tosymbol]
|
v
[prepend expr]
|
v
[jit.expr]
__________________________________

But I get no result with this :

[jit.expr @inputs 1 @expr "(cell[0]%4.<1.) * in[0]"]

Is my syntaxe inside [jit.expr] is bad?

thank you very much.

max v2;
#N vpatcher 0 44 847 632;
#P window setfont "Sans Serif" 18.;
#P window linecount 1;
#P comment 431 391 19 196626 ?;
#P flonum 595 150 86 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 20 445 226 196617 jit.expr @inputs 1 @expr (cell[0]%4.<1.)*in[1];
#P newex 509 444 232 196617 jit.expr @inputs 1 @expr (cell[0]%4.<1.) * in[0];
#P newex 354 382 29 196617 t b f;
#P flonum 353 364 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jit.cellblock 257 475 713 515 3 9 4 1 108 17 0 1 1 0 0 0 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 2 0 0 0;
#P comment 344 224 164 196617 si cell 0 alors meme valeur x;
#P newex 382 104 29 196617 t b f;
#P flonum 382 86 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 291 130 120 196617 pak (cell[0]%4.<1.) * 1.;
#P newex 291 152 50 196617 tosymbol;
#P newex 291 174 68 196617 prepend expr;
#P newex 272 198 45 196617 jit.expr;
#P newex 272 63 109 196617 jit.matrix 1 float32 4;
#P newex 257 444 242 196617 jit.expr @inputs 1 @expr "(cell[0]%4.<1.) * in[0]";
#P user jit.cellblock 272 247 728 287 3 9 4 1 108 17 0 1 1 0 0 0 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 2 0 0 0;
#P newex 257 418 109 196617 jit.matrix 1 float32 4;
#P fasten 13 0 0 0 359 407 262 407;
#P connect 0 0 2 0;
#P fasten 13 1 2 0 378 438 262 438;
#P connect 2 0 11 0;
#P fasten 9 0 3 0 387 126 421 126 421 57 277 57;
#P fasten 5 0 4 0 296 195 277 195;
#P connect 3 0 4 0;
#P connect 4 0 1 0;
#P connect 7 0 6 0;
#P connect 6 0 5 0;
#P connect 16 0 12 0;
#P connect 12 0 13 0;
#P connect 16 0 8 0;
#P connect 8 0 9 0;
#P connect 9 1 7 2;
#P pop;


September 21, 2008 | 8:30 am

Ok, there was a misunderstanding with jit.expr.
It needs a matrix, not a floatnum

max v2;
#N vpatcher 168 50 1042 650;
#P window setfont "Sans Serif" 9.;
#P flonum 399 404 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 158 136 194 196617 pak (cell[0]%4.>0.)*(cell[0]%4.<3) * 1.;
#P newex 158 80 194 196617 pak (cell[0]%4.<1.)*(cell[0]%4.>2) * 1.;
#P comment 170 157 164 196617 si cell 1 ou 2 alors meme valeur x;
#P comment 176 65 164 196617 si cell 0 ou 3 alors meme valeur x;
#P comment 56 144 14 196617 3;
#P comment 132 142 14 196617 2;
#P comment 130 67 14 196617 1;
#P button 118 127 13 0;
#P button 68 128 13 0;
#P button 117 84 13 0;
#P button 67 85 13 0;
#P comment 55 69 14 196617 0;
#P window setfont "Sans Serif" 18.;
#P comment 572 418 19 196626 !;
#P flonum 736 177 86 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 161 472 226 196617 jit.expr @inputs 1 @expr (cell[0]%4.<1.)*in[1];
#P newex 650 471 232 196617 jit.expr @inputs 1 @expr (cell[0]%4.<1.) * in[0];
#P user jit.cellblock 398 502 854 542 3 9 4 1 108 17 0 1 1 0 0 0 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 2 0 0 0;
#P comment 485 251 164 196617 si cell 0 alors meme valeur x;
#P newex 523 131 29 196617 t b f;
#P flonum 523 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 432 157 120 196617 pak (cell[0]%4.<1.) * 1.;
#P newex 432 179 50 196617 tosymbol;
#P newex 432 201 68 196617 prepend expr;
#P newex 413 225 45 196617 jit.expr;
#P newex 413 90 109 196617 jit.matrix 1 float32 4;
#P newex 398 471 242 196617 jit.expr @inputs 1 @expr "(cell[0]%4.<1.) * in[0]";
#P user jit.cellblock 413 274 869 314 3 9 4 1 108 17 0 1 1 0 0 0 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 2 0 0 0;
#P newex 398 445 109 196617 jit.matrix 1 float32 4;
#P connect 28 0 0 0;
#P connect 0 0 2 0;
#P connect 2 0 11 0;
#P connect 14 0 28 0;
#P fasten 9 0 3 0 528 153 562 153 562 84 418 84;
#P fasten 5 0 4 0 437 222 418 222;
#P connect 3 0 4 0;
#P connect 4 0 1 0;
#P connect 7 0 6 0;
#P connect 6 0 5 0;
#P connect 14 0 8 0;
#P connect 8 0 9 0;
#P connect 9 1 7 2;
#P pop;


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