Use prepend and/or lister from iemlib/zexy respectively. Or you could
look at the attached patch which does something similar. Under [pd
guts]->[pd random_list] is a patch that in part creates dynamincally
sized lists, which you could alter to your purposes.
I've also heard say that gridflow and other libraries have some useful
list kludges.
Hope that helps
-Ian
nicob wrote:
hi all
i've [1(, [2( and [3( message
when i hit 3 times [1(, i would like to have 111 resulting
when i hit 2 times [1(, i would like to have 11 resulting
when i hit [2( [2( [3(, i woul like to have 223 resulting
but i don't succeed.
has anybody got i idea please
nicolas
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management ->
http://iem.at/cgi-bin/mailman/listinfo/pd-list
--
http://www.0x09.com
#N canvas 567 523 245 135 10;
#N canvas 202 174 891 453 guts 0;
#N canvas 519 278 484 383 random_list 0;
#X obj 16 12 inlet bang;
#X obj 352 12 inlet length;
#X obj 202 64 f 1;
#X floatatom 268 36 5 0 0 0 - - -;
#X obj 157 66 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 232 222 random 3;
#X obj 202 108 until;
#X obj 202 131 f;
#X obj 229 131 + 1;
#X obj 168 198 random 3;
#X obj 232 198 bang;
#X msg 168 222 set $1;
#X obj 313 247 prepend set;
#X obj 202 174 sel 0;
#X obj 246 342 l;
#X obj 209 295 length;
#X obj 232 273 t a a;
#X obj 209 317 sel;
#X obj 246 363 outlet;
#X obj 229 152 mod;
#X obj 202 86 t f f;
#X obj 179 33 $1;
#X obj 179 7 loadbang;
#N canvas 0 0 450 300 seed 0;
#X obj 31 74 time ---;
#X obj 32 110 +;
#X obj 49 144 +;
#X obj 66 173 +;
#X obj 15 17 inlet bang;
#X msg 67 235 seed $1;
#X obj 63 266 outlet;
#X connect 0 0 1 0;
#X connect 0 1 1 1;
#X connect 0 2 2 1;
#X connect 0 3 3 1;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 0 0;
#X connect 5 0 6 0;
#X restore 54 120 pd seed;
#X obj 232 247 prepend foo;
#X connect 0 0 2 0;
#X connect 0 0 23 0;
#X connect 1 0 3 0;
#X connect 2 0 17 1;
#X connect 2 0 20 0;
#X connect 3 0 2 1;
#X connect 4 0 2 0;
#X connect 5 0 24 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 7 0 13 0;
#X connect 8 0 19 0;
#X connect 9 0 11 0;
#X connect 10 0 5 0;
#X connect 11 0 24 0;
#X connect 12 0 24 0;
#X connect 13 0 9 0;
#X connect 13 1 10 0;
#X connect 14 0 18 0;
#X connect 15 0 17 0;
#X connect 16 0 15 0;
#X connect 16 1 14 1;
#X connect 17 0 14 0;
#X connect 19 0 7 1;
#X connect 20 0 6 0;
#X connect 20 1 19 1;
#X connect 21 0 3 0;
#X connect 22 0 21 0;
#X connect 23 0 9 0;
#X connect 24 0 12 0;
#X connect 24 0 16 0;
#X restore 43 57 pd random_list;
#X obj 11 389 monorhythm;
#X obj 11 264 r $0-s_ctrl_exclusive;
#X obj 186 264 r $0-s_ctrl_start;
#X obj 136 29 r $0-s_ctrl_length;
#X obj 7 262 cnv 1 1 20 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 181 262 cnv 1 1 20 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 131 27 cnv 1 1 20 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 71 347 cnv 1 1 20 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 76 349 r $0-s_ctrl_interval;
#X obj 11 292 sel 0 1;
#X msg 11 317 nonexclusive;
#X msg 108 317 exclusive;
#X obj 186 289 sel 0 1;
#X msg 186 317 stop;
#X obj 38 4 cnv 1 1 20 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 43 5 r $0-s_ctrl_create;
#X obj 2 79 cnv 15 400 1 empty empty empty 20 12 0 14 -260818 -66577
0;
#X obj 11 430 outlet;
#X obj 57 430 outlet;
#X obj 103 430 outlet;
#X msg 224 317 start;
#X obj 4 258 cnv 15 400 1 empty empty empty 20 12 0 14 -260818 -66577
0;
#X obj 8 87 r $0-s_ctrl_b1;
#X obj 113 87 r $0-s_ctrl_b3;
#X obj 8 106 r $0-s_ctrl_b2;
#X obj 113 106 r $0-s_ctrl_b4;
#X obj 218 87 r $0-s_ctrl_b5;
#X obj 218 106 r $0-s_ctrl_b6;
#X obj 323 87 r $0-s_ctrl_b7;
#X obj 323 106 r $0-s_ctrl_b8;
#X obj 428 87 r $0-s_ctrl_b9;
#X obj 428 106 r $0-s_ctrl_b10;
#X obj 540 87 r $0-s_ctrl_b11;
#X obj 540 106 r $0-s_ctrl_b12;
#X obj 652 87 r $0-s_ctrl_b13;
#X obj 652 106 r $0-s_ctrl_b14;
#X obj 764 87 r $0-s_ctrl_b15;
#X obj 764 106 r $0-s_ctrl_b16;
#X obj 8 186 pack f f f f f f f f f f f f f f f f;
#X obj 8 133 r $0-s_ctrl_set;
#X obj 5 85 cnv 1 1 40 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 110 85 cnv 1 1 40 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 215 85 cnv 1 1 40 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 320 85 cnv 1 1 40 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 425 85 cnv 1 1 40 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 537 85 cnv 1 1 40 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 649 85 cnv 1 1 40 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 761 85 cnv 1 1 40 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 5 131 cnv 1 1 20 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 8 158 f;
#X obj 37 233 niagara;
#X obj 183 207 cnv 1 1 20 empty empty empty 20 12 0 14 -258699 -66577
0;
#X obj 186 209 r $0-s_ctrl_seqlength;
#X obj 134 227 + 1;
#X connect 0 0 1 1;
#X connect 1 0 18 0;
#X connect 1 1 19 0;
#X connect 1 2 20 0;
#X connect 2 0 10 0;
#X connect 3 0 13 0;
#X connect 4 0 0 1;
#X connect 9 0 1 2;
#X connect 10 0 11 0;
#X connect 10 1 12 0;
#X connect 11 0 1 0;
#X connect 12 0 1 0;
#X connect 13 0 14 0;
#X connect 13 1 21 0;
#X connect 14 0 1 0;
#X connect 16 0 0 0;
#X connect 21 0 1 0;
#X connect 23 0 50 1;
#X connect 24 0 39 2;
#X connect 25 0 39 1;
#X connect 26 0 39 3;
#X connect 27 0 39 4;
#X connect 28 0 39 5;
#X connect 29 0 39 6;
#X connect 30 0 39 7;
#X connect 31 0 39 8;
#X connect 32 0 39 9;
#X connect 33 0 39 10;
#X connect 34 0 39 11;
#X connect 35 0 39 12;
#X connect 36 0 39 13;
#X connect 37 0 39 14;
#X connect 38 0 39 15;
#X connect 39 0 51 0;
#X connect 40 0 50 0;
#X connect 50 0 39 0;
#X connect 51 0 1 1;
#X connect 53 0 54 0;
#X connect 54 0 51 1;
#X restore 41 1 pd guts;
#X obj 1 1 inlet;
#X obj 97 2 outlet;
#X obj 145 2 outlet;
#X obj 192 2 outlet;
#X obj 2 16 cnv 15 240 115 empty empty empty 20 12 0 14 -225280 -66577
0;
#X obj 157 81 cnv 15 75 45 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 159 93 bng 20 250 50 0 $0-s_ctrl_create empty create_pattern
0 -6 1 8 -166441 -24198 -1;
#X obj 188 108 nbx 5 14 1 1e+37 0 0 $0-s_ctrl_length empty beats 0
-6 1 8 -166441 -24198 -1 1 256;
#X obj 6 81 cnv 15 125 45 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 81 98 tgl 15 0 $0-s_ctrl_exclusive empty exclusive 0 -6 1 8
-166441 -62784 -1 1 1;
#X obj 14 93 tgl 20 0 $0-s_ctrl_start empty GO 3 10 1 8 -166441 -62784
-1 1 1;
#X obj 37 99 nbx 5 14 0 1e+37 0 0 $0-s_ctrl_interval empty interval
0 -6 1 8 -166441 -62784 -1 2000 256;
#X obj 6 20 cnv 15 230 50 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 8 37 vradio 10 1 0 3 $0-s_ctrl_b1 empty empty 0 -6 0 8 -166441
-24198 -1 1;
#X obj 20 37 vradio 10 1 0 3 $0-s_ctrl_b2 empty empty 0 -6 0 8 -166441
-24198 -1 1;
#X obj 32 37 vradio 10 1 0 3 $0-s_ctrl_b3 empty empty 0 -6 0 8 -166441
-24198 -1 2;
#X obj 44 37 vradio 10 1 0 3 $0-s_ctrl_b4 empty empty 0 -6 0 8 -166441
-24198 -1 2;
#X obj 56 37 vradio 10 1 0 3 $0-s_ctrl_b5 empty empty 0 -6 0 8 -166441
-24198 -1 0;
#X obj 68 37 vradio 10 1 0 3 $0-s_ctrl_b6 empty empty 0 -6 0 8 -166441
-24198 -1 2;
#X obj 80 37 vradio 10 1 0 3 $0-s_ctrl_b7 empty empty 0 -6 0 8 -166441
-24198 -1 1;
#X obj 92 37 vradio 10 1 0 3 $0-s_ctrl_b8 empty empty 0 -6 0 8 -166441
-24198 -1 0;
#X obj 104 37 vradio 10 1 0 3 $0-s_ctrl_b9 empty empty 0 -6 0 8 -166441
-24198 -1 1;
#X obj 116 37 vradio 10 1 0 3 $0-s_ctrl_b10 empty empty 0 -6 0 8 -166441
-24198 -1 0;
#X obj 128 37 vradio 10 1 0 3 $0-s_ctrl_b11 empty empty 0 -6 0 8 -166441
-24198 -1 0;
#X obj 140 37 vradio 10 1 0 3 $0-s_ctrl_b12 empty empty 0 -6 0 8 -166441
-24198 -1 1;
#X obj 152 37 vradio 10 1 0 3 $0-s_ctrl_b13 empty empty 0 -6 0 8 -166441
-24198 -1 0;
#X obj 164 37 vradio 10 1 0 3 $0-s_ctrl_b14 empty empty 0 -6 0 8 -166441
-24198 -1 2;
#X obj 176 37 vradio 10 1 0 3 $0-s_ctrl_b15 empty empty 0 -6 0 8 -166441
-24198 -1 2;
#X obj 188 37 vradio 10 1 0 3 $0-s_ctrl_b16 empty empty 0 -6 0 8 -166441
-24198 -1 2;
#X obj 207 42 bng 20 250 50 0 $0-s_ctrl_set empty set 3 10 1 8 -166441
-24198 -33289;
#X obj 7 23 hradio 12 1 0 16 $0-s_ctrl_seqlength empty length 195
6 1 8 -195568 -225271 -1 14;
#X connect 0 0 2 0;
#X connect 0 1 3 0;
#X connect 0 2 4 0;
#X connect 1 0 12 0;
#X coords 0 0 1 1 244 132 1;