Update of /cvsroot/pure-data/abstractions/footils/list-abs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4780
Modified Files: list-compare.pd list-len.pd list-reduce-help.pd Log Message: some 0.40-isms added again
Index: list-compare.pd =================================================================== RCS file: /cvsroot/pure-data/abstractions/footils/list-abs/list-compare.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** list-compare.pd 2 Jan 2007 12:13:10 -0000 1.1 --- list-compare.pd 1 Jul 2007 09:58:45 -0000 1.2 *************** *** 43,48 **** #X msg 216 167 0; #N canvas 446 369 450 300 compare-lengths 0; - #X obj 144 68 list length; - #X obj 45 67 list length; #X obj 45 102 ==; #X obj 45 123 select 1 0; --- 43,46 ---- *************** *** 55,68 **** #X text 39 237 if equal , send list out to first outlet , else bang second outlet; ! #X connect 0 0 2 1; ! #X connect 1 0 2 0; ! #X connect 2 0 3 0; ! #X connect 3 0 9 0; ! #X connect 3 1 7 0; ! #X connect 4 0 0 0; ! #X connect 5 0 8 0; ! #X connect 8 0 1 0; ! #X connect 8 1 9 1; ! #X connect 9 0 6 0; #X restore 94 93 pd compare-lengths; #X connect 0 0 5 1; --- 53,68 ---- #X text 39 237 if equal , send list out to first outlet , else bang second outlet; ! #X obj 144 68 list-len; ! #X obj 45 67 list-len; ! #X connect 0 0 1 0; ! #X connect 1 0 7 0; ! #X connect 1 1 5 0; ! #X connect 2 0 9 0; ! #X connect 3 0 6 0; ! #X connect 6 0 10 0; ! #X connect 6 1 7 1; ! #X connect 7 0 4 0; ! #X connect 9 0 0 1; ! #X connect 10 0 0 0; #X restore 94 93 pd compare-lengths; #X connect 0 0 5 1;
Index: list-reduce-help.pd =================================================================== RCS file: /cvsroot/pure-data/abstractions/footils/list-abs/list-reduce-help.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** list-reduce-help.pd 27 Mar 2007 23:13:50 -0000 1.1 --- list-reduce-help.pd 1 Jul 2007 09:58:45 -0000 1.2 *************** *** 1,3 **** ! #N canvas 407 86 648 705 10; #X floatatom 128 311 5 0 0 0 - - -; #X msg 137 151 bang; --- 1,3 ---- ! #N canvas 407 86 619 794 10; #X floatatom 128 311 5 0 0 0 - - -; #X msg 137 151 bang; *************** *** 8,12 **** #X msg 149 197 1 2; #X msg 155 244 1 2 3 4; - #X obj 196 273 *; #X text 182 152 redo last list; #X text 73 22 [list-reduce]; --- 8,11 ---- *************** *** 14,20 **** #X symbolatom 101 451 15 0 0 0 - - -; #X msg 196 420 $2-$1; ! #X obj 103 587 list-reduce; ! #X msg 103 560 1 2 3 4 5 6 7 8; ! #X msg 198 586 $2 $1; #N canvas 209 220 605 355 more-info 0; #X msg 84 101 bang; --- 13,19 ---- #X symbolatom 101 451 15 0 0 0 - - -; #X msg 196 420 $2-$1; ! #X obj 102 634 list-reduce; ! #X msg 102 607 1 2 3 4 5 6 7 8; ! #X msg 197 633 $2 $1; #N canvas 209 220 605 355 more-info 0; #X msg 84 101 bang; *************** *** 48,53 **** #X connect 14 0 9 0; #X connect 14 2 10 0; ! #X restore 354 422 pd more-info; ! #X obj 103 615 print REVERSE?; #X obj 101 421 list-reduce; #X text 93 64 [list-reduce] returns a single value constructed by calling --- 47,52 ---- #X connect 14 0 9 0; #X connect 14 2 10 0; ! #X restore 101 492 pd more-info; ! #X obj 102 662 print REVERSE?; #X obj 101 421 list-reduce; #X text 93 64 [list-reduce] returns a single value constructed by calling *************** *** 57,81 **** ; #X obj 107 273 list-reduce; ! #X text 100 485 It's important , that there will be only one element coming back in through the right inlet. Lists with more than one item will be shortened automatically to avoid stack overflows.; ! #X text 252 585 <-- two items == bad idea; #X msg 101 394 a b c d e; ! #X connect 1 0 21 0; ! #X connect 4 0 21 0; ! #X connect 5 0 21 0; ! #X connect 6 0 21 0; ! #X connect 7 0 21 0; ! #X connect 8 0 21 1; ! #X connect 13 0 19 1; ! #X connect 14 0 18 0; ! #X connect 14 1 16 0; ! #X connect 15 0 14 0; ! #X connect 16 0 14 1; ! #X connect 19 0 12 0; ! #X connect 19 1 13 0; ! #X connect 21 0 0 0; ! #X connect 21 0 3 0; ! #X connect 21 1 2 0; ! #X connect 21 1 8 0; ! #X connect 24 0 19 0; --- 56,168 ---- ; #X obj 107 273 list-reduce; ! #X text 99 532 It's important , that there will be only one element coming back in through the right inlet. Lists with more than one item will be shortened automatically to avoid stack overflows.; ! #X text 251 632 <-- two items == bad idea; #X msg 101 394 a b c d e; ! #X obj 329 275 list-reduce; ! #X obj 416 275 min; ! #N canvas 0 0 450 300 randlist 0; ! #X obj 254 138 random 100; ! #X obj 254 116 until; ! #X msg 366 138 set; ! #X msg 232 61 10; ! #X msg 254 160 add2 $1; ! #X obj 232 88 t b f b; ! #X obj 255 236 outlet; ! #X obj 232 38 inlet; ! #X connect 0 0 4 0; ! #X connect 1 0 0 0; ! #X connect 2 0 6 0; ! #X connect 3 0 5 0; ! #X connect 4 0 6 0; ! #X connect 5 0 6 0; ! #X connect 5 1 1 0; ! #X connect 5 2 2 0; ! #X connect 7 0 3 0; ! #X restore 329 222 pd randlist; ! #X msg 329 248 27 92 42 82 48 52 74 33 52 71; ! #X msg 329 202 bang; ! #X obj 382 301 list-reduce; ! #X floatatom 382 325 5 0 0 3 max - -; ! #X obj 469 301 max; ! #X floatatom 329 326 5 0 0 3 min - -; ! #X obj 196 273 +; ! #X obj 328 457 list-reduce; ! #X floatatom 328 480 5 0 0 0 - - -; ! #X msg 328 427 22 31 47 86; ! #N canvas 0 0 701 458 compare-two 0; ! #X obj 99 12 inlet; ! #X obj 99 318 outlet; ! #X obj 164 162 abs; ! #X obj 99 161 abs; ! #X obj 99 41 unpack f f; ! #X obj 99 90 t a a; ! #X obj 99 272 f; ! #X obj 164 90 t a a; ! #X obj 131 272 f; ! #X obj 99 247 select 1 0; ! #X text 178 276 send number with smaller distance back to reduce; ! #X text 215 151 calculate distances; ! #X obj 99 192 <; ! #X obj 217 91 inlet; ! #X obj 164 139 -; ! #X obj 99 138 -; ! #X connect 0 0 4 0; ! #X connect 2 0 12 1; ! #X connect 3 0 12 0; ! #X connect 4 0 5 0; ! #X connect 4 1 7 0; ! #X connect 5 0 15 0; ! #X connect 5 1 6 1; ! #X connect 6 0 1 0; ! #X connect 7 0 14 0; ! #X connect 7 1 8 1; ! #X connect 8 0 1 0; ! #X connect 9 0 6 0; ! #X connect 9 1 8 0; ! #X connect 12 0 9 0; ! #X connect 13 0 14 1; ! #X connect 13 0 15 1; ! #X connect 14 0 2 0; ! #X connect 15 0 3 0; ! #X restore 414 457 pd compare-two; ! #X floatatom 507 438 5 0 0 0 - - -; ! #X msg 507 415 45; ! #X obj 507 392 loadbang; ! #X text 325 390 Find closest element:; ! #X connect 1 0 20 0; ! #X connect 4 0 20 0; ! #X connect 5 0 20 0; ! #X connect 6 0 20 0; ! #X connect 7 0 20 0; ! #X connect 12 0 18 1; ! #X connect 13 0 17 0; ! #X connect 13 1 15 0; ! #X connect 14 0 13 0; ! #X connect 15 0 13 1; ! #X connect 18 0 11 0; ! #X connect 18 1 12 0; ! #X connect 20 0 0 0; ! #X connect 20 0 3 0; ! #X connect 20 1 2 0; ! #X connect 20 1 33 0; ! #X connect 23 0 18 0; ! #X connect 24 0 32 0; ! #X connect 24 1 25 0; ! #X connect 25 0 24 1; ! #X connect 26 0 27 0; ! #X connect 27 0 24 0; ! #X connect 27 0 29 0; ! #X connect 28 0 26 0; ! #X connect 29 0 30 0; ! #X connect 29 1 31 0; ! #X connect 31 0 29 1; ! #X connect 33 0 20 1; ! #X connect 34 0 35 0; ! #X connect 34 1 37 0; ! #X connect 36 0 34 0; ! #X connect 37 0 34 1; ! #X connect 38 0 37 1; ! #X connect 39 0 38 0; ! #X connect 40 0 39 0;
Index: list-len.pd =================================================================== RCS file: /cvsroot/pure-data/abstractions/footils/list-abs/list-len.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** list-len.pd 1 Nov 2005 12:41:16 -0000 1.1 --- list-len.pd 1 Jul 2007 09:58:45 -0000 1.2 *************** *** 1,25 **** #N canvas 0 0 534 321 10; #X obj 126 70 inlet; ! #X obj 82 144 list-drip; ! #X obj 161 209 + 1; ! #X obj 82 172 b; ! #X obj 116 249 f; ! #X obj 116 276 outlet; ! #X obj 148 183 1; ! #X obj 132 211 f 1; ! #X obj 206 213 0; ! #X obj 126 104 t a b b; #X text 37 37 list-len: calculate length of a list.; ! #X connect 0 0 9 0; ! #X connect 1 0 3 0; ! #X connect 1 1 4 0; ! #X connect 2 0 7 1; ! #X connect 3 0 7 0; ! #X connect 4 0 5 0; ! #X connect 6 0 7 1; ! #X connect 7 0 2 0; ! #X connect 7 0 4 1; ! #X connect 8 0 4 1; ! #X connect 9 0 1 0; ! #X connect 9 1 6 0; ! #X connect 9 2 8 0; --- 1,9 ---- #N canvas 0 0 534 321 10; #X obj 126 70 inlet; ! #X obj 126 271 outlet; #X text 37 37 list-len: calculate length of a list.; ! #X obj 126 149 list length; ! #X obj 126 125 list; ! #X connect 0 0 4 0; ! #X connect 3 0 1 0; ! #X connect 4 0 3 0;