Update of /cvsroot/pure-data/abstractions/purepd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17039
Modified Files: float_argument.pd symbol_argument.pd Added Files: any_argument-help.pd any_argument.pd symbol_argument-help.pd Log Message: after much discussion with Frank and IO, I think these objecst are properly vetted. But they belong somewhere else, not purepd. We just need a name for such a library
--- NEW FILE: any_argument.pd --- #N canvas 160 301 515 350 10; #X obj 189 234 outlet; #X text 13 259 If the argument is not equal to 0 , use it. Pd init arguments to 0 so unused arguments will be 0; #X obj 73 116 select 0; #X text 12 296 This is useful to have internals inited , but not reset if there is no argument specified.; #X obj 73 190 select 0; #X text 205 172 if 2nd arg , then use as default value; #X obj 73 13 inlet; #X obj 189 13 inlet; #X text 227 14 convenience inlet; #X obj 73 96 list append $1; #X obj 73 169 list append $2; #X obj 73 55 bang; #X obj 188 56 list; #X text 194 74 arguments output symbols so this should too; #X connect 2 0 10 0; #X connect 2 1 0 0; #X connect 4 1 0 0; #X connect 6 0 11 0; #X connect 7 0 12 0; #X connect 9 0 2 0; #X connect 10 0 4 0; #X connect 11 0 9 0; #X connect 12 0 0 0;
Index: symbol_argument.pd =================================================================== RCS file: /cvsroot/pure-data/abstractions/purepd/symbol_argument.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** symbol_argument.pd 19 Nov 2005 21:13:03 -0000 1.1 --- symbol_argument.pd 7 Feb 2006 03:55:12 -0000 1.2 *************** *** 1,13 **** ! #N canvas 0 22 454 304 10; ! #X obj 142 28 loadbang; ! #X obj 141 63 trigger bang bang; ! #X obj 256 92 symbol; ! #X obj 141 129 select symbol; ! #X obj 141 91 symbol $1; ! #X obj 227 261 outlet; ! #X connect 0 0 1 0; ! #X connect 1 0 4 0; ! #X connect 1 1 2 0; ! #X connect 2 0 3 1; ! #X connect 3 1 5 0; ! #X connect 4 0 3 0; --- 1,37 ---- ! #N canvas 63 319 466 316 10; ! #X obj 37 48 trigger bang bang; ! #X obj 151 68 symbol; ! #X obj 37 94 select symbol; ! #X obj 37 68 symbol $1; ! #X obj 201 274 outlet; ! #X obj 226 11 inlet; ! #X text 264 12 convenience inlet; ! #X obj 38 13 inlet; ! #X text 275 56 keep things consistent; ! #X obj 226 57 list; ! #X obj 226 78 route symbol; ! #X obj 228 108 bang; ! #X msg 228 130 wrong data type on right inlet; ! #X obj 229 154 purepd_error symbol_argument; ! #X obj 17 158 trigger bang bang; ! #X obj 131 178 symbol; ! #X obj 17 204 select symbol; ! #X obj 17 178 symbol $2; ! #X connect 0 0 3 0; ! #X connect 0 1 1 0; ! #X connect 1 0 2 1; ! #X connect 2 0 14 0; ! #X connect 2 1 4 0; ! #X connect 3 0 2 0; ! #X connect 5 0 9 0; ! #X connect 7 0 0 0; ! #X connect 9 0 10 0; ! #X connect 10 0 4 0; ! #X connect 10 1 11 0; ! #X connect 11 0 12 0; ! #X connect 12 0 13 0; ! #X connect 14 0 17 0; ! #X connect 14 1 15 0; ! #X connect 15 0 16 1; ! #X connect 16 1 4 0; ! #X connect 17 0 16 0;
Index: float_argument.pd =================================================================== RCS file: /cvsroot/pure-data/abstractions/purepd/float_argument.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** float_argument.pd 19 Nov 2005 21:13:03 -0000 1.1 --- float_argument.pd 7 Feb 2006 03:55:12 -0000 1.2 *************** *** 1,14 **** ! #N canvas 390 291 482 332 10; ! #X obj 143 96 f $1; ! #X obj 244 203 outlet; ! #X obj 143 14 loadbang; #X text 40 248 If the argument is not equal to 0 , use it. Pd init arguments to 0 so unused arguments will be 0; ! #X obj 194 153 select 0; ! #X obj 142 51 trigger bang bang; #X text 39 285 This is useful to have internals inited , but not reset if there is no argument specified.; ! #X connect 0 0 4 0; #X connect 2 0 5 0; ! #X connect 4 1 1 0; ! #X connect 5 0 0 0; --- 1,33 ---- ! #N canvas 554 317 498 348 10; ! #X obj 214 233 outlet; #X text 40 248 If the argument is not equal to 0 , use it. Pd init arguments to 0 so unused arguments will be 0; ! #X obj 113 116 select 0; #X text 39 285 This is useful to have internals inited , but not reset if there is no argument specified.; ! #X obj 113 190 select 0; ! #X obj 113 169 float $2; ! #X obj 113 96 float $1; ! #X text 176 181 if 2nd arg , then use as default value; ! #X obj 113 14 inlet; ! #X obj 259 13 inlet; ! #X text 297 14 convenience inlet; ! #X obj 229 59 route float; ! #X text 316 56 just in case; ! #X obj 261 138 purepd_error float_argument; ! #X obj 261 92 bang; ! #X obj 114 49 bang; ! #X text 5 14 loadbang inlet; ! #X msg 261 114 wrong data type on right inlet; #X connect 2 0 5 0; ! #X connect 2 1 0 0; ! #X connect 4 1 0 0; ! #X connect 5 0 4 0; ! #X connect 6 0 2 0; ! #X connect 8 0 15 0; ! #X connect 9 0 11 0; ! #X connect 11 0 0 0; ! #X connect 11 1 14 0; ! #X connect 14 0 17 0; ! #X connect 15 0 6 0; ! #X connect 17 0 13 0;
--- NEW FILE: any_argument-help.pd --- #N canvas 373 226 558 485 10; #X msg 195 93 bang; #X msg 49 93 bang; #X msg 51 209 bang; #X obj 50 266 print blank; #X msg 46 345 bang; #X msg 241 346 bang; #X obj 49 119 any_argument word; #X obj 51 241 any_argument; #X obj 195 119 any_argument 5; #X obj 46 381 any_argument $1 default; #X obj 241 382 any_argument $1 256; #X msg 204 207 bang; #X obj 203 264 print blank; #X obj 204 239 any_argument $1; #X text 15 12 [any_argument]; #X obj 32 265 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 185 265 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 194 145 5 0 0 1 float - -; #X symbolatom 48 146 6 0 0 1 symbol - -; #X text 26 37 This object can take any kind of argument and outputs either a symbol or a float , depending on whether the argument is numeric or not.; #X text 32 295 If you set a second argument , it will be used as the default when the argument is blank. An argument of 0 is also ignored. ; #X floatatom 241 412 5 0 0 0 - - -; #X msg 386 346 bang; #X floatatom 386 412 5 0 0 0 - - -; #X obj 386 382 any_argument 0 256; #X symbolatom 46 408 10 0 0 0 - - -; #X msg 322 92 bang; #X obj 322 118 any_argument 255.255.255.255; #X symbolatom 322 144 15 0 0 1 symbol - -; #X msg 362 207 bang; #X obj 361 264 print blank; #X obj 343 265 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 362 239 any_argument 0; #X text 24 173 If the first argument is blank or 0 , there is no output (Pd initializes all variables to 0):; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 7 0; #X connect 4 0 9 0; #X connect 5 0 10 0; #X connect 6 0 18 0; #X connect 7 0 3 0; #X connect 7 0 15 0; #X connect 8 0 17 0; #X connect 9 0 25 0; #X connect 10 0 21 0; #X connect 11 0 13 0; #X connect 13 0 12 0; #X connect 13 0 16 0; #X connect 22 0 24 0; #X connect 24 0 23 0; #X connect 26 0 27 0; #X connect 27 0 28 0; #X connect 29 0 32 0; #X connect 32 0 30 0; #X connect 32 0 31 0;
--- NEW FILE: symbol_argument-help.pd --- #N canvas 661 259 509 458 10; #X msg 49 93 bang; #X msg 51 209 bang; #X obj 50 266 print blank; #X msg 36 346 bang; #X msg 241 346 bang; #X msg 204 207 bang; #X obj 203 264 print blank; #X obj 32 265 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 185 265 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X symbolatom 48 146 6 0 0 1 symbol - -; #X text 26 37 This object can take any kind of argument and outputs either a symbol or a float , depending on whether the argument is numeric or not.; #X symbolatom 36 409 10 0 0 0 - - -; #X msg 202 92 bang; #X symbolatom 202 144 15 0 0 1 symbol - -; #X msg 362 207 bang; #X obj 361 264 print blank; #X obj 343 265 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 24 173 If the first argument is blank or 0 , there is no output (Pd initializes all variables to 0):; #X symbolatom 241 411 10 0 0 0 - - -; #X obj 202 118 symbol_argument 255.255.255.255; #X obj 49 119 symbol_argument word; #X obj 51 241 symbol_argument; #X obj 362 239 symbol_argument 0; #X obj 36 382 symbol_argument $1 default; #X obj 204 239 symbol_argument $1; #X text 32 295 If you set a second argument , it will be used as the default when the first argument is blank. Also if the first argument is numeric , the default will be used.; #X obj 242 382 symbol_argument 44 default; #X connect 0 0 20 0; #X connect 1 0 21 0; #X connect 3 0 23 0; #X connect 4 0 26 0; #X connect 5 0 24 0; #X connect 12 0 19 0; #X connect 14 0 22 0; #X connect 19 0 13 0; #X connect 20 0 9 0; #X connect 21 0 2 0; #X connect 21 0 7 0; #X connect 22 0 15 0; #X connect 22 0 16 0; #X connect 23 0 11 0; #X connect 24 0 6 0; #X connect 24 0 8 0; #X connect 26 0 18 0;