#N canvas 344 116 618 692 10;
#X obj 67 310 u_listmap;
#X text 65 32 [u_listmap] - the swiss army knife of list-operations
;
#X obj 155 310 spigot;
#X obj 191 293 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 67 266 0 1 2 3;
#X obj 127 347 print SERIALIZED;
#X obj 67 376 print MAIN;
#X msg 313 268 0 1 2 3;
#X obj 373 349 print SERIALIZED;
#X obj 313 378 print MAIN;
#X floatatom 424 292 5 0 0 0 - - -;
#X msg 67 245 bang;
#X msg 145 265 a b c;
#X msg 145 245 bang;
#X obj 401 312 * 10;
#X msg 313 244 bang;
#X msg 72 447 0 1 2 3;
#X obj 72 536 list trim;
#X obj 72 516 list prepend set;
#X msg 72 558;
#X obj 148 471 list append -|-;
#X msg 227 541 set;
#X text 304 564 A more complex example:;
#N canvas 164 99 846 438 filters 0;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-in 64 float 0;
#X coords 0 1 63 -1 128 60 1;
#X restore 503 222 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-out 64 float 0;
#X coords 0 1 63 -1 128 60 1;
#X restore 645 222 graph;
#X obj 110 316 s \$0-out;
#N canvas 414 307 437 371 tabdump-in 0;
#X obj 147 152 tabread \$0-in;
#X obj 147 205 list prepend;
#X obj 238 205 t a;
#X obj 125 254 list;
#X obj 125 23 inlet;
#X obj 125 279 outlet;
#X obj 125 46 t b b b;
#X msg 147 104 64;
#N canvas 0 0 450 300 countto 0;
#X obj 163 151 f 0;
#X obj 190 151 + 1;
#X obj 163 109 until;
#X msg 205 111 0;
#X obj 163 180 outlet;
#X obj 163 39 inlet;
#X obj 163 87 t a b;
#X connect 0 0 1 0;
#X connect 0 0 4 0;
#X connect 1 0 0 1;
#X connect 2 0 0 0;
#X connect 3 0 0 1;
#X connect 5 0 6 0;
#X connect 6 0 2 0;
#X connect 6 1 3 0;
#X restore 147 126 pd countto;
#X connect 0 0 1 0;
#X connect 1 0 3 1;
#X connect 1 0 2 0;
#X connect 2 0 1 1;
#X connect 3 0 5 0;
#X connect 4 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 7 0;
#X connect 6 2 1 1;
#X connect 7 0 8 0;
#X connect 8 0 0 0;
#X restore 110 206 pd tabdump-in;
#X msg 110 155 bang;
#X obj 110 294 list prepend 0;
#N canvas 0 0 297 272 pole 0;
#X obj 71 140 +;
#X obj 71 172 t a a;
#X obj 117 173 * 0.9;
#X obj 71 54 inlet;
#X obj 147 51 inlet;
#X obj 71 230 outlet;
#X text 72 17 one-pole filter;
#X obj 147 74 t b a;
#X msg 87 118 0;
#X connect 0 0 1 0;
#X connect 1 0 5 0;
#X connect 1 1 2 0;
#X connect 2 0 0 1;
#X connect 3 0 0 0;
#X connect 4 0 7 0;
#X connect 7 0 8 0;
#X connect 7 1 2 1;
#X connect 8 0 0 1;
#X restore 297 269 pd pole;
#X obj 269 117 hsl 64 15 0 0.99 0 0 empty empty filter-coeff -2 -8
1 10 -262144 -1 -1 0 1;
#N canvas 0 0 297 272 zero 0;
#X obj 71 142 t a a;
#X obj 71 44 inlet;
#X obj 124 41 inlet;
#X obj 71 230 outlet;
#X text 71 20 one-zero filter;
#X obj 71 204 +;
#X obj 154 112 * -1;
#X obj 71 168 * -0.5;
#X obj 124 66 t b a;
#X msg 87 113 0;
#X connect 0 0 7 0;
#X connect 0 1 5 0;
#X connect 1 0 0 0;
#X connect 2 0 8 0;
#X connect 5 0 3 0;
#X connect 6 0 7 1;
#X connect 7 0 5 1;
#X connect 8 0 9 0;
#X connect 8 1 6 0;
#X connect 9 0 5 1;
#X restore 244 269 pd zero;
#N canvas 0 0 341 267 split 0;
#X obj 11 193 outlet;
#X obj 68 194 outlet;
#X obj 11 143 list prepend 0;
#X obj 11 169 route 0 1;
#X obj 104 110 hradio 12 1 0 2 empty empty zero 28 3 1 10 -262144 -1
-1 0;
#X obj 11 68 inlet;
#X obj 180 33 select 0 1;
#X msg 180 62 label zero;
#X msg 211 87 label pole;
#X obj 104 38 loadbang;
#X msg 104 64 0;
#X connect 2 0 3 0;
#X connect 3 0 0 0;
#X connect 3 1 1 0;
#X connect 4 0 2 1;
#X connect 4 0 6 0;
#X connect 5 0 2 0;
#X connect 6 0 7 0;
#X connect 6 1 8 0;
#X connect 7 0 4 0;
#X connect 8 0 4 0;
#X connect 9 0 10 0;
#X connect 10 0 4 0;
#X coords 0 -1 1 1 60 30 2 100 100;
#X restore 244 217 pd split;
#X floatatom 266 139 5 0 0 0 - - -;
#N canvas 0 0 297 280 noise 0;
#X obj 33 115 random 1000;
#X obj 33 88 t b a;
#X obj 33 194 tabwrite \$0-in;
#X obj 33 143 / 500;
#X obj 33 163 - 1;
#X msg 33 44 64;
#N canvas 0 0 450 300 countto 0;
#X obj 163 151 f 0;
#X obj 190 151 + 1;
#X obj 163 109 until;
#X msg 205 111 0;
#X obj 163 180 outlet;
#X obj 163 39 inlet;
#X obj 163 87 t a b;
#X connect 0 0 1 0;
#X connect 0 0 4 0;
#X connect 1 0 0 1;
#X connect 2 0 0 0;
#X connect 3 0 0 1;
#X connect 5 0 6 0;
#X connect 6 0 2 0;
#X connect 6 1 3 0;
#X restore 33 66 pd countto;
#X obj 33 21 inlet;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X connect 1 1 2 1;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 6 0 1 0;
#X connect 7 0 5 0;
#X restore 504 184 pd noise;
#X msg 504 160 make noise;
#X obj 266 158 t b a a;
#X msg 439 324 const 0;
#X obj 439 365 s \$0-in;
#X obj 440 390 s \$0-out;
#X msg 500 324 const 0 \, 16 1;
#X text 498 308 impulse;
#X text 112 34 This is a more complex example showing how to apply
a set of elementary filters on a list of floats. Try playing with the
coeff-slider and switch between pole and zero operation.;
#X obj 110 236 u_listmap;
#X connect 3 0 20 0;
#X connect 4 0 3 0;
#X connect 5 0 2 0;
#X connect 6 0 20 1;
#X connect 7 0 10 0;
#X connect 8 0 20 1;
#X connect 9 0 8 0;
#X connect 9 1 6 0;
#X connect 10 0 13 0;
#X connect 12 0 11 0;
#X connect 13 0 3 0;
#X connect 13 1 8 1;
#X connect 13 2 6 1;
#X connect 14 0 15 0;
#X connect 14 0 16 0;
#X connect 17 0 15 0;
#X connect 20 0 5 0;
#X connect 20 1 9 0;
#X restore 330 586 pd filters;
#X text 67 626 2007 Frank Barknecht \, original idea by IOhannes m
zmoelnig and Thomas Musil.;
#X msg 71 421 bang;
#X text 64 72 Calls a user-defined operation for each of the incoming
list's items and returns a list of the return values.;
#X text 64 120 [u_listmap] is a helper abstraction to make element-wise
operations on lists easy to patch. The basic idea is to bundle a list-serializer
and a list-repacker into one object. Then you connect whatever operation
should be applied on every list item to the right outlet and send the
modified items back to the right inlet. Here the modified elements
get packed into a list again and sent to the left outlet of [u_listmap].
;
#X obj 315 502 list trim;
#X obj 315 482 list prepend set;
#X obj 387 460 pow 3;
#X floatatom 417 437 5 0 0 0 - - -;
#X msg 315 435 1 2 3 4 5;
#X msg 315 524;
#X obj 313 312 u_listmap;
#X obj 72 471 u_listmap;
#X obj 315 460 u_listmap;
#X connect 0 0 6 0;
#X connect 0 1 2 0;
#X connect 0 1 5 0;
#X connect 2 0 0 1;
#X connect 3 0 2 1;
#X connect 4 0 0 0;
#X connect 7 0 34 0;
#X connect 10 0 14 1;
#X connect 11 0 0 0;
#X connect 12 0 0 1;
#X connect 13 0 0 1;
#X connect 14 0 34 1;
#X connect 15 0 34 0;
#X connect 16 0 35 0;
#X connect 17 0 19 0;
#X connect 18 0 17 0;
#X connect 20 0 35 1;
#X connect 21 0 19 0;
#X connect 25 0 35 0;
#X connect 28 0 33 0;
#X connect 29 0 28 0;
#X connect 30 0 36 1;
#X connect 31 0 30 1;
#X connect 32 0 36 0;
#X connect 34 0 9 0;
#X connect 34 1 8 0;
#X connect 34 1 14 0;
#X connect 35 0 18 0;
#X connect 35 1 20 0;
#X connect 36 0 29 0;
#X connect 36 1 30 0;
