Forums > Jitter

making a mosaic with jitter or gem

March 25, 2009 | 10:05 pm

Hello, I did a mosaic made out of 256 squares… Each squares should be totaly independent in color and in resizing.
I did it with the Gem librairie in Max, because it was much easier for me.
The big problem is the heavyness of my project. My machine is exploding!
I m pluging an arduino with a sensor in it.
This sensor is supposed to change the colors and the size of each squares of the mosaic…

Somebody could help me
I cannot send my patch here it’s too heavy…1,9mb
If you need it to understand I can send it to you by mail.

my machine is mac book pro 2.6ghz and I use max 4.6

thanx and please help me!!!


March 26, 2009 | 1:57 am

If it’s a patch using GEM, you may have more luck on a PD forum, or even ask on the Max/MSP list. But hopefully someone here can help you as well.
J-F


March 26, 2009 | 4:27 am

poly~ or jit.gl.multiple are your friends for this kind of thing. Here’s something simple to get you started. It’s super light. If you don’t know how to control each instance inside of the poly~ independantly, read a bit about it in the docs, then post back here with questions/problems.

best,
Zachary

———-

Main patch – save as whatever name:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 30 89 281 242;
#P window setfont "Sans Serif" 9.;
#P message 67 75 68 196617 fullscreen $1;
#P toggle 50 75 15 0;
#P newex 92 50 35 196617 sel 27;
#P newex 50 50 40 196617 key;
#P outlet 67 95 15 0;
#P fasten 2 0 3 0 97 72 55 72;
#P fasten 3 0 4 0 66 90 66 75;
#P connect 4 0 0 0;
#P fasten 1 0 2 0 91 67 91 52;
#P pop;
#P newobj 27 193 52 196617 p fscreen;
#P user jit.fpsgui 27 146 60 196617 0;
#P number 277 51 35 9 0 0 64 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 277 72 54 196617 voices $1;
#P newex 277 95 114 196617 poly~ mosaic_grid 256;
#P newex 27 215 148 196617 jit.window mosaic @pos 10 50;
#P toggle 27 37 15 0;
#P newex 27 91 50 196617 t b erase;
#P newex 27 60 57 196617 qmetro 16;
#P newex 27 122 200 196617 jit.gl.render mosaic @erase_color 0 0 0 1;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P connect 2 1 0 0;
#P connect 0 0 8 0;
#P connect 9 0 4 0;
#P connect 7 0 6 0;
#P connect 6 0 5 0;
#P window clipboard copycount 10;

save this as mosaic_grid.pat -

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 241 194 75 196617 scale $1 $1 1.;
#P newex 241 170 111 196617 scale 0 100 0.05 0.15;
#P newex 241 145 64 196617 random 101;
#P newex 99 33 48 196617 loadbang;
#P newex 113 194 99 196617 pak position 0. 0. 0.;
#P newex 142 146 27 196617 – 1.;
#P newex 142 72 40 196617 uzi 2;
#P newex 142 170 55 196617 zl group 2;
#P newex 142 122 40 196617 / 100.;
#P newex 142 97 64 196617 random 201;
#P newex 35 94 40 196617 uzi 3;
#P newex 35 194 71 196617 prepend color;
#P newex 35 169 55 196617 zl group 3;
#P newex 35 144 40 196617 / 255.;
#P newex 35 119 64 196617 random 256;
#P window linecount 2;
#P newex 35 242 226 196617 jit.gl.gridshape mosaic @shape plane @cull_face 1 @dim 2 2 @scale 0.1 0.1 1. @blend_mode 6 1;
#P connect 14 0 15 0;
#P connect 13 0 14 0;
#P fasten 12 0 5 0 104 72 40 72;
#P fasten 12 0 9 0 104 61 147 61;
#P fasten 12 0 13 0 104 56 246 56;
#P connect 8 0 11 1;
#P connect 10 0 8 0;
#P connect 7 0 10 0;
#P connect 6 0 7 0;
#P connect 9 0 6 0;
#P fasten 11 0 0 0 118 219 40 219;
#P connect 4 0 0 0;
#P fasten 15 0 0 0 246 225 40 225;
#P connect 3 0 4 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P connect 5 0 1 0;
#P window clipboard copycount 16;


March 26, 2009 | 1:12 pm

Hello and thanx a lot for your answer. poly is a very nice object and I find how it works.
But I have 2 problems … :
First is when you want to change in real time the color (for instance) of 256 squares… the framerate goes to 50 ips to 4 ips !!!!
and the variation is the same for the 256 squares… Imagine if it was a different varaition…

My second is how to make two different variation for two different square in real time. I m using the message target to assign a preset on one square but how to do it if I want a different variation on the two squares???

thank you for your answer

here s my patch :

max v2;
#N vpatcher 246 409 1306 993;
#P window setfont "Sans Serif" 9.;
#P newex 16 31 48 196617 loadbang;
#P message 276 192 26 196617 256;
#P newex 385 85 92 196617 scale 0 100 -1. 1.;
#P newex 255 87 92 196617 scale 0 100 -1. 1.;
#P number 386 66 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 343 65 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 1022 44 1622 444;
#P window setfont "Sans Serif" 9.;
#P newex 520 36 48 196617 loadbang;
#P outlet 273 327 15 0;
#P outlet 195 328 15 0;
#P inlet 38 38 15 0;
#P message 160 92 34 196617 0;
#P message 122 92 34 196617 1;
#P newex 121 111 49 196617 switch 1;
#B color 5;
#P message 71 91 34 196617 0;
#P message 33 91 34 196617 1;
#P newex 33 112 49 196617 switch 1;
#B color 5;
#P comment 35 344 124 196617 lorqu’il n’y a parsonne;
#P number 453 291 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 450 229 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 492 292 15 0;
#P message 452 251 68 196617 90 , 65 1000;
#P newex 451 270 40 196617 line;
#P button 500 230 15 0;
#P message 449 190 68 196617 65 , 90 1000;
#P newex 450 207 40 196617 line;
#P number 36 305 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 33 243 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 75 306 15 0;
#P message 34 265 74 196617 100 , 90 1000;
#P newex 34 284 40 196617 line;
#P button 83 244 15 0;
#P message 32 203 74 196617 90 , 100 1000;
#P newex 33 221 40 196617 line;
#P comment 35 362 100 196617 jaune mais;
#P connect 27 0 2 0;
#P hidden connect 6 0 2 0;
#P connect 27 0 19 0;
#P connect 24 0 18 0;
#P connect 20 0 18 0;
#P connect 19 0 18 0;
#P connect 2 0 1 0;
#P connect 1 0 7 0;
#P connect 3 0 5 0;
#P connect 5 0 4 0;
#P connect 4 0 8 0;
#P hidden connect 8 0 18 1;
#P hidden connect 7 0 18 1;
#P connect 4 1 6 0;
#P connect 1 1 3 0;
#P connect 24 0 21 0;
#P connect 22 0 21 0;
#P connect 23 0 21 0;
#P connect 27 0 22 0;
#P hidden connect 12 0 21 1;
#P hidden connect 15 0 21 1;
#P connect 18 0 25 0;
#P connect 21 0 26 0;
#P hidden connect 14 0 10 0;
#P connect 27 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 15 0;
#P connect 13 0 12 0;
#P connect 11 0 13 0;
#P connect 12 0 16 0;
#P connect 12 1 14 0;
#P connect 9 1 11 0;
#P pop 1;
#P newobj 343 37 49 196617 p nobody;
#P toggle 756 288 15 0;
#P newex 757 305 58 196617 metro 100;
#P toggle 696 287 15 0;
#P newex 697 304 58 196617 metro 100;
#P toggle 636 288 15 0;
#P newex 637 305 58 196617 metro 100;
#P message 654 90 36 196617 -0.52;
#P number 174 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 139 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 104 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 69 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 68 357 141 196617 pak rect 0 0 640 480;
#P user multiSlider 430 115 12 82 -1. 1. 1 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 473 115 12 82 -1. 1. 1 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 510 115 12 82 -1. 1. 1 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 545 115 12 82 -1. 1. 1 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 576 119 12 82 -1. 1. 1 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 619 119 12 82 -1. 1. 1 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 656 119 12 82 -1. 1. 1 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 691 119 12 82 -1. 1. 1 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P message 730 193 14 196617 0;
#P number 518 311 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 579 90 31 196617 0.07;
#P message 540 92 31 196617 0.04;
#P flonum 728 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 653 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 690 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 615 213 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 540 213 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 577 213 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 499 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 424 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 461 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 600 335 19 196617 -1;
#P newex 521 408 44 196617 s topoly;
#P message 557 335 14 196617 3;
#P message 578 335 14 196617 0;
#P message 539 335 14 196617 2;
#P message 521 335 14 196617 1;
#P message 521 371 51 196617 target $1;
#P number 585 383 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 260 193 14 196617 3;
#P newex 226 410 44 196617 s topoly;
#P message 226 386 35 196617 open 1;
#P message 304 386 35 196617 open 3;
#P message 265 386 35 196617 open 2;
#P newex 339 217 46 196617 r topoly;
#P newex 226 356 44 196617 s topoly;
#P toggle 414 305 15 0;
#P message 414 327 54 196617 mute 0 $1;
#P toggle 340 305 15 0;
#P message 340 327 54 196617 mute 3 $1;
#P toggle 283 305 15 0;
#P message 283 327 54 196617 mute 2 $1;
#P toggle 226 305 15 0;
#P message 226 327 54 196617 mute 1 $1;
#P comment 435 305 19 196617 all;
#N vpatcher 30 89 281 242;
#P window setfont "Sans Serif" 9.;
#P message 67 75 68 196617 fullscreen $1;
#P toggle 50 75 15 0;
#P newex 92 50 35 196617 sel 27;
#P newex 50 50 40 196617 key;
#P outlet 67 95 15 0;
#P fasten 2 0 3 0 97 72 55 72;
#P fasten 3 0 4 0 66 90 66 75;
#P connect 4 0 0 0;
#P fasten 1 0 2 0 91 67 91 52;
#P pop;
#P newobj 11 356 52 196617 p fscreen;
#P user jit.fpsgui 11 309 60 196617 0;
#P number 261 214 35 9 0 0 64 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 261 235 54 196617 voices $1;
#P newex 261 258 360 196617 poly~ mosaic_grid 256;
#P newex 11 378 148 196617 jit.window mosaic @pos 10 50;
#P toggle 11 200 15 0;
#P newex 11 254 50 196617 t b erase;
#P newex 11 223 57 196617 qmetro 16;
#P newex 11 285 200 196617 jit.gl.render mosaic @erase_color 0 0 0 1;
#P connect 73 0 3 0;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P connect 2 1 0 0;
#P connect 0 0 8 0;
#P connect 55 0 4 0;
#P connect 9 0 4 0;
#P fasten 56 0 55 1 74 353 105 353;
#P fasten 57 0 55 2 109 353 137 353;
#P fasten 58 0 55 3 144 353 169 353;
#P fasten 59 0 55 4 179 353 201 353;
#P connect 12 0 11 0;
#P fasten 17 0 19 0 419 348 231 348;
#P fasten 15 0 19 0 345 348 231 348;
#P fasten 13 0 19 0 288 348 231 348;
#P connect 11 0 19 0;
#P connect 23 0 24 0;
#P fasten 21 0 24 0 270 406 231 406;
#P fasten 22 0 24 0 309 406 231 406;
#P connect 68 0 70 0;
#P connect 25 0 7 0;
#P connect 72 0 7 0;
#P connect 7 0 6 0;
#P connect 20 0 5 0;
#P connect 6 0 5 0;
#P connect 35 0 5 0;
#P connect 73 0 72 0;
#P connect 14 0 13 0;
#P connect 34 0 5 1;
#P connect 16 0 15 0;
#P connect 67 0 68 0;
#P connect 36 0 5 2;
#P connect 69 0 71 0;
#P connect 67 1 69 0;
#P connect 38 0 5 3;
#P connect 18 0 17 0;
#P connect 70 0 35 0;
#P connect 54 0 35 0;
#P connect 37 0 5 4;
#P connect 53 0 34 0;
#P connect 71 0 34 0;
#P connect 39 0 5 5;
#P connect 52 0 36 0;
#P connect 41 0 5 6;
#P connect 61 0 28 0;
#P connect 33 0 27 0;
#P connect 30 0 27 0;
#P connect 29 0 27 0;
#P connect 28 0 27 0;
#P connect 31 0 27 0;
#P connect 45 0 27 0;
#P connect 26 0 32 0;
#P connect 27 0 32 0;
#P connect 63 0 29 0;
#P connect 43 0 38 0;
#P connect 51 0 38 0;
#P connect 65 0 31 0;
#P connect 40 0 5 7;
#P connect 44 0 37 0;
#P connect 50 0 37 0;
#P connect 73 0 30 0;
#P connect 42 0 5 8;
#P connect 49 0 39 0;
#P connect 62 0 61 0;
#P connect 48 0 41 0;
#P connect 60 0 41 0;
#P connect 47 0 40 0;
#P connect 64 0 63 0;
#P connect 46 0 42 0;
#P connect 66 0 65 0;
#P pop;

and

max v2;
#N vpatcher 545 184 1480 825;
#P origin 30 -40;
#P window setfont "Sans Serif" 9.;
#P flonum 85 176 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 47 176 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 12 196 107 196617 pak color 0. 0. 0.;
#P flonum 11 176 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 348 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 304 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N in 9;
#P newobj 349 56 25 196617 in 9;
#N in 8;
#P newobj 308 56 25 196617 in 8;
#P flonum 259 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N in 7;
#P newobj 260 56 25 196617 in 7;
#P flonum 218 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 174 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N in 6;
#P newobj 219 56 25 196617 in 6;
#N in 5;
#P newobj 177 56 25 196617 in 5;
#P flonum 134 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 90 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N in 4;
#P newobj 135 56 25 196617 in 4;
#N in 3;
#P newobj 93 56 25 196617 in 3;
#P flonum 45 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 372 172 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 334 172 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 294 172 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 266 196 95 196617 pak position 0. 0. 0.;
#P flonum 233 167 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 195 167 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 155 167 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 130 194 85 196617 pak scale 1. 1. 1.;
#P flonum 1 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N in 2;
#P newobj 46 56 25 196617 in 2;
#N in 1;
#P newobj 4 56 25 196617 in 1;
#P message 841 545 75 196617 scale $1 $1 1.;
#P newex 841 521 111 196617 scale 0 100 0.05 0.15;
#P newex 841 496 64 196617 random 101;
#P newex 699 384 48 196617 loadbang;
#P newex 713 545 99 196617 pak position 0. 0. 0.;
#P newex 742 497 27 196617 – 1.;
#P newex 742 423 40 196617 uzi 2;
#P newex 742 521 55 196617 zl group 2;
#P newex 742 473 40 196617 / 100.;
#P newex 742 448 64 196617 random 201;
#P newex 635 445 40 196617 uzi 3;
#P newex 635 545 71 196617 prepend color;
#P newex 635 520 55 196617 zl group 3;
#P newex 635 495 40 196617 / 255.;
#P newex 635 470 64 196617 random 256;
#P window linecount 2;
#P newex 12 249 226 196617 jit.gl.gridshape mosaic @shape plane @cull_face 1 @dim 2 2 @scale 0.1 0.1 1. @blend_mode 6 1;
#P connect 16 0 18 0;
#P connect 18 0 42 0;
#P connect 43 0 0 0;
#P fasten 15 0 0 0 846 569 17 569;
#P connect 4 0 0 0;
#P fasten 11 0 0 0 718 569 17 569;
#P connect 19 0 0 0;
#P connect 23 0 0 0;
#P fasten 42 0 43 1 16 193 49 193;
#P connect 17 0 27 0;
#P connect 27 0 44 0;
#P fasten 44 0 43 2 52 193 81 193;
#P connect 30 0 45 0;
#P connect 28 0 30 0;
#P fasten 45 0 43 3 90 193 113 193;
#P connect 29 0 31 0;
#P connect 31 0 20 0;
#P connect 20 0 19 1;
#P connect 32 0 34 0;
#P fasten 21 0 19 2 200 188 185 188;
#P connect 34 0 21 0;
#P fasten 22 0 19 3 238 188 210 188;
#P connect 33 0 35 0;
#P connect 35 0 22 0;
#P connect 36 0 37 0;
#P connect 37 0 24 0;
#P connect 24 0 23 1;
#P connect 38 0 40 0;
#P fasten 25 0 23 2 339 191 327 191;
#P connect 40 0 25 0;
#P connect 39 0 41 0;
#P fasten 26 0 23 3 377 191 355 191;
#P connect 41 0 26 0;
#P fasten 12 0 5 0 704 423 640 423;
#P connect 5 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P fasten 12 0 9 0 704 412 747 412;
#P connect 9 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 10 0;
#P connect 10 0 8 0;
#P connect 8 0 11 1;
#P fasten 12 0 13 0 704 407 846 407;
#P connect 13 0 14 0;
#P connect 14 0 15 0;
#P pop;


March 26, 2009 | 1:45 pm
petahertz wrote on Thu, 26 March 2009 09:12
Hello
My second is how to make two different variation for two different square in real time. I m using the message target to assign a preset on one square but how to do it if I want a different variation on the two squares???

To make different variations for the different squares, you can either talk to different poly voices, using "target" message, or change the poly sub-patch to make it variable. For instance, if you incorporate some random process inside the poly voice, you will have different results for each voice.
By the way, whether you have a similar or a different process for each voice shouldn’t influence the rate (fps).
Also, do you have a multicore? You could take advantage of running the poly~ voices on different cores (Max 5 only).
Jean-François.


March 26, 2009 | 1:58 pm

You could probably do something with this?

#P toggle 815 452 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 815 472 47 196617 gate 1 1;
#P newex 852 448 43 196617 r banng;
#B color 5;
#P newex 791 500 55 196617 jit.matrix;
#P newex 791 530 172 196617 jit.slide @slide_up 7 @slide_down 7;
#P newex 616 370 76 196617 speedlim 3000;
#P newex 791 372 76 196617 speedlim 1000;
#P toggle 716 319 15 0;
#P newex 716 339 47 196617 gate 1 1;
#P newex 753 315 43 196617 r banng;
#B color 5;
#P window setfont "Sans Serif" 18.;
#P comment 808 387 128 196626 < - alea colors;
#P button 791 394 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 791 415 128 196617 jit.noise 3 float32 256 64;
#P window setfont "Sans Serif" 18.;
#P comment 634 385 106 196626 < - alea xyz;
#P window setfont "Sans Serif" 9.;
#P window linecount 4;
#P message 62 26 304 196617 ; max launchbrowser http://www.cycling74.com/forums/index.php?t=msg&th=38757&start=0&rid=3975&S=90fca72f2667e9cc42ab8f32cd8a96ce;
#P window linecount 1;
#P message 142 156 34 196617 reset;
#P newex 142 175 199 196617 jit.gl.handle mosaic @inherit_transform 1;
#N vpatcher 460 63 588 255;
#P outlet 32 74 15 0;
#P inlet 36 41 15 0;
#P connect 0 0 1 0;
#P pop;
#P newobj 416 241 13 196617 p;
#P button 616 392 15 0;
#P newex 616 417 122 196617 jit.noise 3 float32 64 64;
#P comment 548 251 80 196617 quad generation;
#P number 113 90 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 66 89 15 0;
#P newex 66 110 57 196617 qmetro 80;
#P newex 90 178 43 196617 s banng;
#B color 5;
#P message 62 263 194 196617 name mosaic , size 320 240 , idlemouse 1;
#P user jit.pwindow 61 282 322 242 0 1 1 0 1 0;
#X name mosaic;
#P newex 66 205 212 196617 jit.gl.render mosaic @erase_color 0. 0. 0. 0.;
#P newex 66 143 58 196617 t b b erase;
#P newex 416 476 172 196617 jit.slide @slide_up 7 @slide_down 7;
#P newex 426 267 383 196617 jit.expr @expr "(cell[0]%4.>0.)*(cell[0]%4.<3.)*0.1" "(cell[0]%4>1)* 0.1" "0.";
#P newex 416 452 98 196617 jit.op @op * * pass;
#P newex 463 146 199 196617 jit.expr @expr "snorm[0]" "snorm[1]" 0.;
#P newex 463 124 130 196617 jit.matrix 5 float32 64 64;
#P newex 416 323 64 196617 jit.op @op +;
#P newex 463 170 136 196617 jit.matrix 3 float32 256 64;
#P newex 402 62 43 196617 r banng;
#B color 5;
#P newex 402 583 250 196617 jit.gl.mesh mosaic @draw_mode quads @automatic 0;
#P connect 12 0 11 0;
#P connect 15 0 14 0;
#P connect 14 0 9 0;
#P connect 9 2 10 0;
#P connect 9 0 10 0;
#P fasten 21 0 10 0 147 198 71 198;
#P connect 9 1 13 0;
#P connect 16 0 14 1;
#P connect 22 0 21 0;
#P fasten 1 0 0 0 407 130 407 130;
#P fasten 8 0 0 0 421 538 407 538;
#P fasten 2 0 20 0 468 214 421 214;
#P connect 20 0 3 0;
#P connect 3 0 6 0;
#P connect 6 0 8 0;
#P fasten 20 0 7 0 421 262 431 262;
#P fasten 1 0 4 0 407 93 468 93;
#P connect 4 0 5 0;
#P connect 5 0 2 0;
#P fasten 7 0 3 1 431 310 475 310;
#P fasten 33 0 0 3 796 568 497 568;
#P fasten 18 0 6 1 621 443 509 443;
#P connect 29 0 32 0;
#P connect 32 0 19 0;
#P connect 19 0 18 0;
#P connect 30 0 29 0;
#P connect 28 0 29 1;
#P connect 29 0 31 0;
#P connect 31 0 26 0;
#P connect 26 0 25 0;
#P connect 36 0 34 0;
#P connect 25 0 34 0;
#P connect 34 0 33 0;
#P connect 37 0 36 0;
#P connect 35 0 36 1;
#P window clipboard copycount 38;


March 26, 2009 | 2:48 pm

Thank you
The second patch is much too complicated for me with all the expressions of Jitter… So I will not be able to organize my grid as I need…
I need a simple grid (see the attached file)
And then I just downloaded the max 5 maybe to buy it : to work with two cores is it parallel procesing in the info windows?
thanx


March 26, 2009 | 7:23 pm

Don’t know if I should do that, but just for fun. See the patch below. You have to set the colors …

> I just downloaded the max 5 maybe to buy it

Yes! of course, own it!


March 27, 2009 | 10:08 am

You can’t imagine how much you helped me!
i made a lot of bad testing!! and you did it and it’s perfect…. Thanx now I can study the bases of jitter expression because I understand what is doing what…

Thanx a lot
retake7
Petahertz


March 27, 2009 | 10:17 pm

Folk here helped me so many times when I was reaching a stalemate.
Great is this forum … and this software Wink


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