Forums > MaxMSP

cellular automata

December 30, 2009 | 7:19 pm

hi board

does anyone have good ideas on how to make a clever conway’s game of life patch using just max objects?

i’m thinking coll + matrix, but i’m not so good at managing data within coll…

how would you make each cell in a matrix check the states of surrounding cells?
i’m sure this can be solved in a brilliant way!

.klive


December 30, 2009 | 9:28 pm

um, have you tried jit.conway?


December 31, 2009 | 2:03 pm

yeah, but that’s a jitter object.

any thoughts on this?


December 31, 2009 | 2:43 pm

not sure it’s a clever way, but I would use two [lcd]s, and getpixel to retrieve the cells states
aa


January 4, 2010 | 3:31 am

here’s my idea towards a working patch;

max v2;
#N vpatcher 453 44 1278 863;
#P origin 4 31;
#P window setfont "Sans Serif" 9.;
#P message 569 577 48 196617 nth 0 $1;
#N coll ;
#P newobj 569 595 53 196617 coll;
#P window linecount 3;
#P newex 515 671 110 196617 expr $i1 + $i2 + $i3 + $i4 + $i5 + $i6 + $i7 + $i8;
#P window linecount 1;
#P newex 515 643 112 196617 unpack 0 0 0 0 0 0 0 0;
#P newex 515 620 55 196617 zl group 9;
#P newex 660 528 27 196617 + 9;
#P newex 631 528 27 196617 + 8;
#P newex 602 528 27 196617 + 7;
#P newex 660 508 27 196617 + 1;
#P newex 602 508 27 196617 – 1;
#P newex 660 487 27 196617 – 7;
#P newex 631 487 27 196617 – 8;
#P newex 602 487 27 196617 – 9;
#P message 390 744 14 196617 0;
#P message 371 716 14 196617 1;
#P message 333 684 14 196617 1;
#P message 296 605 14 196617 0;
#P button 390 726 15 0;
#P button 371 698 15 0;
#P button 333 665 15 0;
#P button 295 587 15 0;
#P newex 333 643 32 196617 sel 1;
#P newex 333 595 29 196617 t b f;
#P newex 390 701 32 196617 sel 1;
#P newex 371 670 32 196617 sel 1;
#P newex 333 619 29 196617 &&;
#P newex 295 563 32 196617 sel 1;
#P newex 390 610 30 196617 >= 4;
#P newex 371 587 31 196617 == 3;
#P newex 352 566 31 196617 == 2;
#P newex 333 518 67 196617 t i i i i;
#P newex 333 545 27 196617 < 2;
#P window linecount 3;
#P newex 81 595 85 196617 expr $i1 + $i2 + $i3 + $i4 + $i5 + $i6 + $i7 + $i8;
#P window linecount 1;
#P newex 139 574 27 196617 + 9;
#P newex 110 574 27 196617 + 8;
#P newex 81 574 27 196617 + 7;
#P newex 139 554 27 196617 + 1;
#P newex 81 554 27 196617 – 1;
#P newex 139 533 27 196617 – 7;
#P newex 110 533 27 196617 – 8;
#P newex 81 533 27 196617 – 9;
#P newex 559 66 91 196617 expr $i1 * -1 + 8;
#P newex 495 444 40 196617 uzi 64;
#P message 515 578 48 196617 nth 0 $1;
#P button 495 422 15 0;
#N coll ;
#P newobj 515 596 53 196617 coll;
#P newex 495 402 54 196617 prepend 0;
#P newex 185 472 61 196617 zl group 64;
#P newex 495 254 57 196617 zl slice 64;
#P toggle 344 28 15 0;
#P newex 344 47 64 196617 metro 1000;
#P newex 185 492 62 196617 prepend set;
#P window linecount 8;
#P message 185 515 77 196617 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#B color 5;
#P window linecount 1;
#P newex 209 417 40 196617 unpack;
#P message 537 139 14 196617 0;
#P window linecount 8;
#P message 495 298 77 196617 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#P window linecount 1;
#P newex 495 274 62 196617 prepend set;
#P newex 495 234 38 196617 zl join;
#P button 529 23 15 0;
#P message 444 122 57 196617 getrow $1;
#P newex 529 43 40 196617 uzi 8;
#P user matrixctrl 423 146 82 82 "lulu II:/max_msp/monome_base_4.4/matrix.png" MatrixDefaultBkgnd.pct 82 82 10 10 8 8 10 10 1 1 0 2 5120 0;
#P button 441 98 15 0;
#P message 0 102 33 196617 clear;
#P message 55 254 91 196617 /sys/prefix /cell;
#P newex 54 272 115 196617 udpsend localhost 8080;
#P user matrixctrl 54 143 82 82 "lulu II:/max_msp/monome_base_4.4/matrix.png" MatrixDefaultBkgnd.pct 82 82 10 10 8 8 10 10 1 1 0 2 5120 0;
#P newex 54 232 89 196617 prepend /cell/led;
#B color 5;
#P newex 53 53 182 196617 route /cell/press /cell/adc /cell/enc;
#P newex 53 33 86 196617 udpreceive 8000;
#N vpatcher 764 44 1364 444;
#P window setfont "Sans Serif" 9.;
#P message 168 277 50 196617 4 3 inc;
#P newex 156 249 62 196617 prepend set;
#P newex 119 216 63 196617 pack 0 0 inc;
#P newex 102 248 27 196617 gate;
#P newex 119 190 65 196617 unpack 0 0 0;
#P inlet 132 73 15 0;
#P outlet 85 333 15 0;
#P connect 3 0 0 0;
#P connect 2 2 3 0;
#P connect 1 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 3 1;
#P connect 2 1 4 1;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P pop;
#P newobj 54 73 48 196617 p pairing;
#P hidden connect 1 0 2 0;
#P connect 2 0 0 0;
#P connect 7 0 4 0;
#P connect 0 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 5 0;
#P connect 6 0 5 0;
#P connect 30 0 38 0;
#P connect 31 0 38 1;
#P connect 32 0 38 2;
#P connect 33 0 38 3;
#P connect 34 0 38 4;
#P connect 35 0 38 5;
#P connect 36 0 38 6;
#P connect 37 0 38 7;
#P connect 57 0 23 0;
#P connect 56 0 23 0;
#P connect 55 0 23 0;
#P connect 54 0 23 0;
#P connect 23 0 19 0;
#P connect 12 0 18 0;
#P connect 19 0 18 0;
#P connect 39 0 44 0;
#P connect 44 0 50 0;
#P connect 50 0 54 0;
#P connect 68 0 40 0;
#P connect 40 0 39 0;
#P connect 48 0 45 0;
#P fasten 41 0 45 0 357 590 338 590;
#P connect 45 0 49 0;
#P connect 49 0 51 0;
#P connect 51 0 55 0;
#P connect 21 0 20 0;
#P connect 40 1 41 0;
#P connect 69 0 45 1;
#P connect 48 1 45 1;
#P connect 40 2 42 0;
#P connect 42 0 46 0;
#P connect 46 0 52 0;
#P connect 52 0 56 0;
#P connect 40 3 43 0;
#P connect 43 0 47 0;
#P connect 47 0 53 0;
#P connect 53 0 57 0;
#P connect 11 0 9 0;
#P connect 8 0 9 0;
#P connect 4 0 9 0;
#P connect 29 0 11 0;
#P connect 9 1 13 0;
#P connect 13 0 22 0;
#P connect 22 0 14 0;
#P connect 10 0 15 0;
#P connect 14 0 15 0;
#P connect 15 0 24 0;
#P connect 24 0 26 0;
#P connect 26 0 28 0;
#P connect 28 0 27 0;
#P connect 65 0 27 0;
#P connect 64 0 27 0;
#P connect 63 0 27 0;
#P connect 62 0 27 0;
#P connect 61 0 27 0;
#P connect 60 0 27 0;
#P connect 59 0 27 0;
#P connect 58 0 27 0;
#P connect 24 0 25 0;
#P connect 27 0 25 0;
#P connect 25 0 66 0;
#P connect 66 0 67 0;
#P connect 67 0 68 0;
#P connect 15 0 13 1;
#P connect 16 0 13 1;
#P connect 20 0 12 0;
#P connect 12 0 10 0;
#P connect 67 1 68 1;
#P connect 10 1 16 0;
#P connect 67 2 68 2;
#P connect 67 3 68 3;
#P connect 10 2 29 0;
#P connect 28 2 70 0;
#P connect 28 0 70 0;
#P connect 26 0 69 0;
#P connect 24 0 69 0;
#P connect 70 0 69 0;
#P connect 67 4 68 4;
#P connect 67 5 68 5;
#P connect 67 6 68 6;
#P connect 28 2 58 0;
#P connect 28 2 61 0;
#P connect 28 2 63 0;
#P connect 67 7 68 7;
#P connect 28 2 59 0;
#P connect 28 2 64 0;
#P connect 28 2 60 0;
#P connect 28 2 62 0;
#P connect 28 2 65 0;
#P pop;

the result is somewhat strange, the array of numbers seems to make something a lot different from conway’s game of life… any thoughts on the error here?

also, how would you translate an array of 64 numbers back into the matrix to create a loop?

the osc objects connect to a monome… i know there are some working cellular automata patches out there – but i prefer building this one from scratch.

any help would be greatly appreciated!!!
thanks!

.klive


January 4, 2010 | 6:50 pm

anyone?


January 8, 2010 | 2:25 pm

It looks like the problem is the stage where you query the cell neighbours. When you are looking at cells on the side colums the offsets end up wrong. For example: -9 from any cell in the left row will not be a neighbour. You need to map these values properly, either wrapping the edges around or not.

This isn’t the easiest thing to do in max, it’s probably better suited to a text based language (perhaps javascript which you can use in max) where creating loops is simpler, or jitter where [jit.conway] does all the hard work for you. That’s not to say it isn’t possible. Here is one example ready for use with the monome and below is a non-wrapping example which probably isn’t as cleanly written. In max5 format currently I’m afraid.

lh

– Pasted Max Patch, click to expand. –

January 8, 2010 | 4:49 pm

thanks luke! that is the most straightforward approach to this problem i’ve seen.

there seems to be a problem with the coll’s in the neighbours subpatch… they aren’t storing anything.

they need initial values?

.klive


January 8, 2010 | 5:15 pm

Oh right, sorry I thought I had them embedded. They’re just the offsets needed normally (like in your patch) and for the side columns. There’s probably a much easier way to go about patching this anyway. I’m waiting for my monome to arrive so I’ve been looking into something similar anyway. I might try doing it in javascript and see how that goes, I’ll post back here if I have any success.

lh

Mid:
0, -9;
1, -8;
2, -7;
3, -1;
4, 1;
5, 7;
6, 8;
7, 9;

Left:
0, -8;
1, -7;
2, 1;
3, 8;
4, 9;

Right:
0, -9;
1, -8;
2, -1;
3, 7;
4, 8;


January 8, 2010 | 5:36 pm

thanks! this is awesome!


January 8, 2010 | 6:19 pm

here is your patch in max v.4

max v2;
#N vpatcher 293 281 1048 804;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 764 44 1364 444;
#P window setfont "Sans Serif" 9.;
#P message 168 277 50 196617 5 3 inc;
#P newex 156 249 62 196617 prepend set;
#P newex 119 216 63 196617 pack 0 0 inc;
#P newex 102 248 27 196617 gate;
#P newex 119 190 65 196617 unpack 0 0 0;
#P inlet 132 73 15 0;
#P outlet 85 333 15 0;
#P connect 3 0 0 0;
#P connect 2 2 3 0;
#P connect 1 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 3 1;
#P connect 2 1 4 1;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P pop;
#P newobj 308 249 48 196617 p pairing;
#P button 213 137 15 0;
#P newex 293 174 80 196617 prepend getrow;
#P newex 237 156 41 196617 uzi 8 0;
#P toggle 237 115 15 0;
#P newex 237 136 58 196617 metro 250;
#P window linecount 2;
#N vpatcher 361 205 961 605;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 82 173 67 196617 zl group 192;
#P newex 82 152 79 196617 pack 0 0 0;
#P newex 116 131 27 196617 / 8;
#P newex 82 131 27 196617 % 8;
#P newex 82 108 27 196617 t i i;
#N counter 0 63;
#X flags 0 0;
#P newobj 82 86 68 196617 counter 0 63;
#P outlet 41 257 15 0;
#P window linecount 0;
#P newex 41 234 36 196617 zl reg;
#P inlet 25 20 15 0;
#P newex 82 64 78 196617 t b i;
#P inlet 83 26 15 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 10 0 3 1;
#P connect 0 0 1 0;
#P connect 1 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 9 0;
#P connect 9 0 10 0;
#P connect 6 1 8 0;
#P connect 8 0 9 1;
#P connect 1 1 9 2;
#P pop;
#P newobj 389 461 29 196617 p send;
#N vpatcher 616 489 1216 889;
#P outlet 13 164 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 54 136 21 196617 t 0;
#P newex 14 136 21 196617 t 1;
#P newex 54 109 41 196617 sel 2 3;
#P newex 14 109 32 196617 sel 3;
#P window linecount 0;
#P newex 14 82 38 196617 gate 2;
#P inlet 42 43 15 0;
#P inlet 14 43 15 0;
#P connect 6 0 7 0;
#P connect 5 0 7 0;
#P connect 0 0 2 0;
#P connect 2 0 3 0;
#P connect 4 1 5 0;
#P connect 4 0 5 0;
#P connect 3 0 5 0;
#P connect 1 0 2 1;
#P connect 2 1 4 0;
#P connect 3 1 6 0;
#P connect 4 2 6 0;
#P pop;
#P newobj 408 427 34 196617 p rules;
#P window linecount 1;
#N vpatcher 878 268 1478 668;
#P outlet 120 329 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 120 307 39 196617 zl sum;
#P newex 120 287 49 196617 zl lookup;
#P inlet 434 48 15 0;
#P newex 120 262 50 196617 zl group;
#P newex 120 241 54 196617 split 0 63;
#P newex 120 219 27 196617 +;
#N coll right;
#P newobj 237 166 53 196617 coll right;
#N coll left;
#P newobj 179 166 53 196617 coll left;
#P window linecount 0;
#N coll mid;
#P newobj 121 166 53 196617 coll mid;
#P window linecount 1;
#P newex 121 139 126 196617 gate 3;
#P newex 72 116 41 196617 uzi 8 0;
#P newex 135 115 148 196617 if ($i1-7)%8==0 then 3 else 1;
#P window linecount 0;
#P newex 121 92 161 196617 if $i1%8==0 then 2 else out2 $i1;
#P newex 23 68 157 196617 t b b i i;
#P inlet 23 48 15 0;
#P connect 0 0 1 0;
#P connect 1 1 4 0;
#P connect 8 0 9 0;
#P connect 7 0 9 0;
#P connect 6 0 9 0;
#P connect 9 0 10 0;
#P connect 1 0 11 0;
#P connect 10 0 11 0;
#P connect 11 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 15 0;
#P connect 1 2 2 0;
#P connect 2 0 5 0;
#P connect 3 0 5 0;
#P connect 5 0 6 0;
#P connect 2 1 3 0;
#P connect 1 3 9 1;
#P connect 12 0 13 1;
#P connect 5 1 7 0;
#P connect 4 2 5 1;
#P connect 5 2 8 0;
#P pop;
#P newobj 419 407 70 196617 p neighbours;
#N vpatcher 161 297 761 697;
#P outlet 69 154 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 69 131 27 196617 + 1;
#P inlet 77 39 15 0;
#P window linecount 0;
#P newex 69 109 49 196617 zl lookup;
#P outlet 18 157 15 0;
#P newex 21 60 27 196617 t i i;
#P inlet 21 40 15 0;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P connect 1 1 3 0;
#P connect 3 0 5 0;
#P connect 5 0 6 0;
#P connect 4 0 3 1;
#P pop;
#P newobj 419 383 40 196617 p state;
#N vpatcher 637 297 1237 697;
#P outlet 150 150 15 0;
#P outlet 116 151 15 0;
#P outlet 81 151 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 45 120 47 196617 uzi 64 0;
#P outlet 25 149 15 0;
#P newex 28 95 121 196617 t b b l l;
#P window linecount 0;
#P newex 28 72 61 196617 zl group 64;
#P inlet 28 52 15 0;
#P connect 2 0 3 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 1 4 0;
#P connect 4 2 5 0;
#P connect 2 2 6 0;
#P connect 2 3 7 0;
#P pop;
#P newobj 389 357 102 196617 p receive;
#P message 230 218 33 196617 clear;
#P message 269 385 91 196617 /sys/prefix /cell;
#P newex 268 403 115 196617 udpsend localhost 8080;
#P user matrixctrl 268 274 82 82 "lulu II:/max_msp/monome_base_4.4/matrix.png" MatrixDefaultBkgnd.pct 82 82 10 10 8 8 10 10 1 1 0 2 5120 0;
#P newex 268 363 89 196617 prepend /cell/led;
#B color 5;
#P newex 311 220 182 196617 route /cell/press /cell/adc /cell/enc;
#P newex 312 200 86 196617 udpreceive 8000;
#P connect 13 0 16 0;
#P connect 13 0 12 0;
#P connect 12 0 14 0;
#P connect 6 0 3 0;
#P connect 15 0 3 0;
#P connect 11 0 3 0;
#P connect 17 0 3 0;
#P connect 3 0 2 0;
#P connect 5 0 4 0;
#P connect 2 0 4 0;
#P connect 14 2 15 0;
#P connect 1 0 17 0;
#P hidden connect 0 0 1 0;
#P connect 3 1 7 0;
#P connect 7 0 11 0;
#P connect 8 1 10 0;
#P connect 10 0 11 1;
#P connect 7 1 8 0;
#P connect 8 0 9 0;
#P connect 9 0 10 1;
#P connect 7 2 8 1;
#P connect 7 3 9 1;
#P pop;

this patch doesnt work in maxv4 but suddenly does when opened in max5…
does max 5 behave differently with some of the objects in this patch?


January 8, 2010 | 6:40 pm

aha, zl lookup and sum dont work in version 4.


January 8, 2010 | 7:46 pm

heres a max v.4 patch with zl object replacements….

max v2;
#N vpatcher 604 67 1371 688;
#P window setfont "Sans Serif" 9.;
#N vpatcher 764 44 1364 444;
#P window setfont "Sans Serif" 9.;
#P message 168 277 50 196617 5 4 inc;
#P newex 156 249 62 196617 prepend set;
#P newex 119 216 63 196617 pack 0 0 inc;
#P newex 102 248 27 196617 gate;
#P newex 119 190 65 196617 unpack 0 0 0;
#P inlet 132 73 15 0;
#P outlet 85 333 15 0;
#P connect 3 0 0 0;
#P connect 2 2 3 0;
#P connect 1 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 3 1;
#P connect 2 1 4 1;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P pop;
#P newobj 308 249 48 196617 p pairing;
#P button 182 174 15 0;
#P newex 293 174 80 196617 prepend getrow;
#P newex 237 156 41 196617 uzi 8 0;
#P toggle 237 115 15 0;
#P newex 237 136 58 196617 metro 250;
#P window linecount 2;
#N vpatcher 280 44 880 444;
#P window setfont "Sans Serif" 9.;
#P newex 82 173 67 196617 zl group 192;
#P newex 82 152 79 196617 pack 0 0 0;
#P newex 116 131 27 196617 / 8;
#P newex 82 131 27 196617 % 8;
#P newex 82 108 27 196617 t i i;
#N counter 0 63;
#X flags 0 0;
#P newobj 82 86 68 196617 counter 0 63;
#P outlet 41 257 15 0;
#P newex 41 234 36 196617 zl reg;
#P inlet 25 20 15 0;
#P newex 82 64 78 196617 t b i;
#P inlet 83 26 15 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 10 0 3 1;
#P connect 0 0 1 0;
#P connect 1 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 9 0;
#P connect 9 0 10 0;
#P connect 6 1 8 0;
#P connect 8 0 9 1;
#P connect 1 1 9 2;
#P pop;
#P newobj 389 461 29 196617 p send;
#N vpatcher 616 489 1216 889;
#P outlet 13 164 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 54 136 21 196617 t 0;
#P newex 14 136 21 196617 t 1;
#P newex 54 109 41 196617 sel 2 3;
#P newex 14 109 32 196617 sel 3;
#P window linecount 0;
#P newex 14 82 38 196617 gate 2;
#P inlet 42 43 15 0;
#P inlet 14 43 15 0;
#P connect 6 0 7 0;
#P connect 5 0 7 0;
#P connect 0 0 2 0;
#P connect 2 0 3 0;
#P connect 4 1 5 0;
#P connect 4 0 5 0;
#P connect 3 0 5 0;
#P connect 1 0 2 1;
#P connect 2 1 4 0;
#P connect 3 1 6 0;
#P connect 4 2 6 0;
#P pop;
#P newobj 408 427 34 196617 p rules;
#P window linecount 1;
#N vpatcher 742 244 1342 720;
#P origin 0 27;
#P window setfont "Sans Serif" 9.;
#P newex 214 401 32 196617 print;
#P window linecount 1;
#N vpatcher 10 59 610 459;
#P outlet 204 358 15 0;
#P inlet 199 33 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 202 95 25 196617 iter;
#P newex 202 67 27 196617 t l b;
#P button 271 171 15 0;
#P newex 212 277 27 196617 t i i;
#P number 202 171 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 271 240 14 196617 0;
#P number 202 327 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 202 304 37 196617 +;
#P comment 288 174 35 196617 Reset;
#P connect 9 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 4 0;
#P connect 4 0 1 0;
#P connect 5 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 10 0;
#P connect 3 0 5 0;
#P fasten 2 0 1 1 207 347 243 347 243 299 234 299;
#P connect 5 1 1 1;
#P fasten 7 1 6 0 224 89 276 89;
#P connect 6 0 3 0;
#P pop;
#P newobj 164 353 36 196617 p sum;
#P newex 120 303 34 196617 zl len;
#P newex 164 327 46 196617 zl group;
#P newex 164 303 38 196617 zl mth;
#P newex 164 279 29 196617 t b f;
#P newex 164 258 25 196617 iter;
#P outlet 164 385 15 0;
#P inlet 434 21 15 0;
#P window linecount 0;
#P newex 120 235 50 196617 zl group;
#P newex 120 214 54 196617 split 0 63;
#P newex 120 192 27 196617 +;
#N coll right;
#P newobj 237 139 53 196617 coll right;
#N coll left;
#P newobj 179 139 53 196617 coll left;
#N coll mid;
#P newobj 121 139 53 196617 coll mid;
#P newex 121 112 126 196617 gate 3;
#P newex 72 89 41 196617 uzi 8 0;
#P newex 135 88 166 196617 if ($i1 – 7) % 8 == 0 then 3 else 1;
#P newex 121 65 173 196617 if $i1 % 8 == 0 then 2 else out2 $i1;
#P newex 23 41 157 196617 t b b i i;
#P inlet 23 21 15 0;
#P connect 0 0 1 0;
#P connect 1 1 4 0;
#P connect 8 0 9 0;
#P connect 7 0 9 0;
#P connect 6 0 9 0;
#P connect 9 0 10 0;
#P connect 1 0 11 0;
#P connect 10 0 11 0;
#P connect 11 0 18 0;
#P connect 1 2 2 0;
#P connect 3 0 5 0;
#P connect 2 0 5 0;
#P connect 5 0 6 0;
#P connect 2 1 3 0;
#P connect 1 3 9 1;
#P connect 11 0 14 0;
#P connect 14 0 15 0;
#P connect 12 0 16 0;
#P connect 15 0 16 0;
#P connect 16 0 17 0;
#P connect 17 0 19 0;
#P connect 19 0 13 0;
#P connect 5 1 7 0;
#P connect 15 1 16 1;
#P connect 18 0 17 1;
#P connect 19 0 20 0;
#P connect 4 2 5 1;
#P connect 5 2 8 0;
#P pop;
#P newobj 419 407 70 196617 p neighbours;
#N vpatcher 705 184 1305 584;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 156 126 34 196617 zl len;
#P newex 200 150 46 196617 zl group;
#P newex 200 126 38 196617 zl mth;
#P newex 200 102 29 196617 t b f;
#P window linecount 0;
#P newex 200 81 25 196617 iter;
#P outlet 69 154 15 0;
#P window linecount 1;
#P newex 69 131 27 196617 + 1;
#P inlet 77 39 15 0;
#P window linecount 0;
#P newex 69 98 49 196617 zl lookup;
#P outlet 18 157 15 0;
#P newex 20 62 27 196617 t i i;
#P inlet 21 40 15 0;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P connect 1 1 3 0;
#P connect 10 0 5 0;
#P connect 5 0 6 0;
#P connect 4 0 3 1;
#P connect 1 1 11 0;
#P connect 1 1 7 0;
#P connect 7 0 8 0;
#P connect 4 0 9 0;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P connect 8 1 9 1;
#P connect 11 0 10 1;
#P pop;
#P newobj 419 383 40 196617 p state;
#N vpatcher 637 297 1237 697;
#P outlet 150 150 15 0;
#P outlet 116 151 15 0;
#P outlet 81 151 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 45 120 47 196617 uzi 64 0;
#P outlet 25 149 15 0;
#P newex 28 95 121 196617 t b b l l;
#P window linecount 0;
#P newex 28 72 61 196617 zl group 64;
#P inlet 28 52 15 0;
#P connect 2 0 3 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 1 4 0;
#P connect 4 2 5 0;
#P connect 2 2 6 0;
#P connect 2 3 7 0;
#P pop;
#P newobj 389 357 102 196617 p receive;
#P message 230 218 33 196617 clear;
#P message 269 385 91 196617 /sys/prefix /cell;
#P newex 268 403 115 196617 udpsend localhost 8080;
#P user matrixctrl 268 274 82 82 "lulu II:/max_msp/monome_base_4.4/matrix.png" MatrixDefaultBkgnd.pct 82 82 10 10 8 8 10 10 1 1 0 2 5120 0;
#P newex 268 363 89 196617 prepend /cell/led;
#B color 5;
#P newex 311 220 182 196617 route /cell/press /cell/adc /cell/enc;
#P newex 312 200 86 196617 udpreceive 8000;
#P connect 12 0 16 0;
#P connect 13 0 12 0;
#P connect 12 0 14 0;
#P connect 6 0 3 0;
#P connect 15 0 3 0;
#P connect 11 0 3 0;
#P connect 17 0 3 0;
#P connect 3 0 2 0;
#P connect 5 0 4 0;
#P connect 2 0 4 0;
#P connect 14 2 15 0;
#P connect 1 0 17 0;
#P hidden connect 0 0 1 0;
#P connect 3 1 7 0;
#P connect 7 0 11 0;
#P connect 8 1 10 0;
#P connect 10 0 11 1;
#P connect 7 1 8 0;
#P connect 8 0 9 0;
#P connect 9 0 10 1;
#P connect 7 2 8 1;
#P connect 7 3 9 1;
#P pop;

any thoughts on why it’s acting strange?
the results are cool though…

.klive


January 8, 2010 | 8:04 pm

i am soooo close! please help!


January 8, 2010 | 10:21 pm

Here’s some replacements, haven’t checked if [zl iter] or [iter] were around in max4 but these should do the job for you.

lh

– Pasted Max Patch, click to expand. –

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