Revision: 10419 http://pure-data.svn.sourceforge.net/pure-data/?rev=10419&view=rev Author: fbar Date: 2008-12-03 21:16:24 +0000 (Wed, 03 Dec 2008)
Log Message: ----------- added list-nth
Added Paths: ----------- trunk/abstractions/footils/list-abs/list-nth-help.pd trunk/abstractions/footils/list-abs/list-nth.pd
Added: trunk/abstractions/footils/list-abs/list-nth-help.pd =================================================================== --- trunk/abstractions/footils/list-abs/list-nth-help.pd (rev 0) +++ trunk/abstractions/footils/list-abs/list-nth-help.pd 2008-12-03 21:16:24 UTC (rev 10419) @@ -0,0 +1,33 @@ +#N canvas 257 127 694 569 10; +#X floatatom 268 339 5 0 0 1 n - -; +#X text 136 110 Inlets: 1) list to look up in; +#X text 134 38 look up the nth element in a list. n has to be positive +and is zero-based!; +#X obj 56 493 list-idx; +#X text 53 472 Also see:; +#X obj 215 392 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 56 38 list-nth; +#X text 193 129 2) number giving position to filter. Zero-based , +positive.; +#X msg 201 238 0 1 2 3 4 5 6; +#X text 138 83 Argument: <n , default: 0==first element>; +#X msg 223 300 a b c d e; +#X obj 201 425 prepent set; +#X msg 201 448; +#X msg 149 395 bang; +#X msg 218 266 list x y z; +#X obj 201 364 list-nth 2; +#X text 310 301 non-lists get converted to proper lists.; +#X text 134 162 Note: negative postion numbers give no output , lists +longer than the index give a spurious 0 as result , but also an error +in the console: "$x: argument out of range".; +#X text 53 520 [list-idx] is more flexible , but a bit slower.; +#X connect 0 0 15 1; +#X connect 8 0 15 0; +#X connect 10 0 15 0; +#X connect 11 0 12 0; +#X connect 13 0 11 0; +#X connect 14 0 15 0; +#X connect 15 0 5 0; +#X connect 15 0 11 0;
Added: trunk/abstractions/footils/list-abs/list-nth.pd =================================================================== --- trunk/abstractions/footils/list-abs/list-nth.pd (rev 0) +++ trunk/abstractions/footils/list-abs/list-nth.pd 2008-12-03 21:16:24 UTC (rev 10419) @@ -0,0 +1,23 @@ +#N canvas 0 0 570 388 10; +#X obj 116 86 list; +#X msg 203 167 set , adddollar $1; +#X obj 116 259 outlet; +#X obj 116 57 inlet; +#X obj 171 88 f $1; +#X obj 217 58 loadbang; +#X obj 171 57 inlet; +#X obj 171 111 moses; +#X obj 203 133 + 1; +#X msg 171 145 set; +#X msg 116 227; +#X connect 0 0 10 0; +#X connect 1 0 10 0; +#X connect 3 0 0 0; +#X connect 4 0 7 0; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 9 0; +#X connect 7 1 8 0; +#X connect 8 0 1 0; +#X connect 9 0 10 0; +#X connect 10 0 2 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.