Forums > MaxMSP

most efficient way to combine more than two list

March 14, 2006 | 11:08 pm

Hi list,

I have to combine some string lists. For the moment I use a pak combinaison (below patch). I would like to know if is exist a better way

Cheers,

Nico.

max v2;
#N vpatcher 194 54 1020 628;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N thispatcher;
#Q end;
#P newobj 607 116 54 9109513 thispatcher;
#P newex 607 95 144 9109513 sprintf script send num[%ld] %ld;
#P message 607 75 122 9109513 1 10 , 2 32 , 3 48 , 4 27 , 5 32;
#P newex 607 50 45 9109513 loadbang;
#P number 388 191 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num[5];
#P number 318 191 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num[4];
#P number 248 191 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num[3];
#P number 178 191 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num[2];
#P number 108 191 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num[1];
#P message 108 295 338 9109513 1 10 50 60 80 2 32 50 60 80 3 48 50 60 80 4 27 50 60 80 5 32 50 60 80;
#P newex 108 271 57 9109513 prepend set;
#P newex 108 246 360 9109513 pak 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 message 388 219 65 9109513 5 $1 50 60 80;
#P message 318 219 65 9109513 4 $1 50 60 80;
#P message 248 219 65 9109513 3 $1 50 60 80;
#P message 178 219 65 9109513 2 $1 50 60 80;
#P message 108 219 65 9109513 1 $1 50 60 80;
#P connect 8 0 0 0;
#P connect 0 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 9 0 1 0;
#P connect 1 0 5 5;
#P connect 10 0 2 0;
#P connect 2 0 5 10;
#P connect 11 0 3 0;
#P connect 3 0 5 15;
#P connect 12 0 4 0;
#P connect 4 0 5 20;
#P connect 13 0 14 0;
#P connect 14 0 15 0;
#P connect 15 0 16 0;
#P pop;


March 14, 2006 | 11:38 pm

check out the zl object "zl join" might help.

wes


March 14, 2006 | 11:49 pm

[zl join] only works with two list.


March 15, 2006 | 1:45 am

Nico wrote:

>[zl join] only works with two list.
>
>
>

for fun:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 392 199 36 196617 zl reg;
#P newex 330 200 36 196617 zl reg;
#P newex 259 199 36 196617 zl reg;
#P newex 179 193 36 196617 zl reg;
#P newex 106 189 36 196617 zl reg;
#P newex 270 301 14 196617 _;
#P message 270 320 354 196617 1 10 50 60 80 2 41 50 60 80 3 54 50 60 80
4 40 50 60 80 5 38 50 60 80;
#P newex 235 148 79 196617 t b b b b b b;
#P newex 337 262 18 196617 t l;
#P newex 270 282 36 196617 zl reg;
#P newex 296 262 38 196617 zl join;
#N thispatcher;
#Q end;
#P newobj 667 176 68 196617 thispatcher;
#P newex 667 155 168 196617 sprintf script send num[%ld] %ld;
#P message 667 135 151 196617 1 10 , 2 32 , 3 48 , 4 27 , 5 32;
#P newex 667 110 45 196617 loadbang;
#P number 412 81 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num[5];
#P number 342 81 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num[4];
#P number 272 81 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num[3];
#P number 202 81 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num[2];
#P number 132 81 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num[1];
#P message 412 109 84 196617 5 $1 50 60 80;
#P message 342 109 84 196617 4 $1 50 60 80;
#P message 272 109 84 196617 3 $1 50 60 80;
#P message 202 109 84 196617 2 $1 50 60 80;
#P message 132 109 84 196617 1 $1 50 60 80;
#P connect 14 0 15 1;
#P connect 14 0 16 0;
#P connect 9 0 17 0;
#P connect 9 0 4 0;
#P connect 8 0 17 0;
#P connect 8 0 3 0;
#P connect 7 0 17 0;
#P connect 7 0 2 0;
#P connect 6 0 1 0;
#P connect 6 0 17 0;
#P connect 5 0 0 0;
#P connect 5 0 17 0;
#P connect 17 0 15 0;
#P connect 24 0 14 1;
#P connect 23 0 14 0;
#P connect 22 0 14 0;
#P connect 21 0 14 0;
#P connect 20 0 14 0;
#P connect 17 5 24 0;
#P connect 17 4 23 0;
#P connect 17 3 22 0;
#P connect 17 2 21 0;
#P connect 17 1 20 0;
#P connect 3 0 23 1;
#P connect 4 0 24 1;
#P connect 2 0 22 1;
#P connect 1 0 21 1;
#P connect 0 0 20 1;
#P connect 19 0 18 0;
#P connect 15 0 19 0;
#P connect 16 0 14 1;
#P connect 12 0 13 0;
#P connect 11 0 12 0;
#P connect 10 0 11 0;
#P window clipboard copycount 25;


March 15, 2006 | 5:07 pm

or like this

#P window setfont "Sans Serif" 9.;
#P number 316 54 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 214 57 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 308 80 80 196617 124 51 $1 efsd;
#P flonum 262 83 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 169 83 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 211 83 43 196617 $1 245;
#N vpatcher 306 516 906 916;
#P button 50 294 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 68 329 67 196617 zl group 256;
#P newex 189 149 36 196617 t b l;
#P newex 189 258 36 196617 zl reg;
#P newex 148 149 36 196617 t b l;
#P newex 148 258 36 196617 zl reg;
#P newex 109 149 36 196617 t b l;
#P newex 109 258 36 196617 zl reg;
#P newex 67 149 36 196617 t b l;
#P newex 68 258 36 196617 zl reg;
#P inlet 189 57 15 0;
#P inlet 148 57 15 0;
#P inlet 109 57 15 0;
#P inlet 67 57 15 0;
#P outlet 68 351 15 0;
#P connect 5 0 14 0;
#P connect 4 0 6 0;
#P connect 12 0 5 0;
#P connect 10 0 5 0;
#P connect 8 0 5 0;
#P connect 6 0 5 0;
#P connect 5 0 13 0;
#P connect 14 0 13 0;
#P connect 7 0 13 0;
#P connect 9 0 13 0;
#P connect 11 0 13 0;
#P connect 13 0 0 0;
#P connect 6 1 5 1;
#P connect 3 0 8 0;
#P connect 12 0 7 0;
#P connect 10 0 7 0;
#P connect 8 0 7 0;
#P connect 6 0 7 0;
#P connect 8 1 7 1;
#P connect 2 0 10 0;
#P connect 12 0 9 0;
#P connect 10 0 9 0;
#P connect 8 0 9 0;
#P connect 6 0 9 0;
#P connect 10 1 9 1;
#P connect 1 0 12 0;
#P connect 12 0 11 0;
#P connect 10 0 11 0;
#P connect 8 0 11 0;
#P connect 6 0 11 0;
#P connect 12 1 11 1;
#P pop;
#P newobj 183 124 54 196617 p combine;
#P newex 183 161 62 196617 prepend set;
#P message 183 186 287 196617 84 79 245 3.62 124 51 42 efsd;
#P connect 8 0 6 0;
#P connect 7 0 3 0;
#P connect 6 0 2 3;
#P connect 5 0 2 2;
#P connect 4 0 2 0;
#P connect 3 0 2 1;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P window clipboard copycount 9;



f.e
March 16, 2006 | 7:30 am

? do like Wallace, create a forum !

f.e


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