Update of /cvsroot/pure-data/abstractions/nqpoly/nqpoly4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31540
Modified Files: nqpoly4.pd nqpwrap4.pd Log Message: Refactored nqpoly4 to use subpatch instead of namecanvas, big cleanup, added inlets for number of objects and object name. This version requires [list] now, for older versions of Pd please check out an older revision.
Index: nqpwrap4.pd =================================================================== RCS file: /cvsroot/pure-data/abstractions/nqpoly/nqpoly4/nqpwrap4.pd,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** nqpwrap4.pd 16 Nov 2005 05:57:17 -0000 1.1.1.1 --- nqpwrap4.pd 12 Jul 2006 08:19:38 -0000 1.2 *************** *** 1,32 **** ! #N canvas 71 272 450 300 10; #X obj 45 26 inlet; ! #X obj 49 123 spigot; ! #X obj 135 129 spigot; ! #X obj 42 204 $1 $2 $3 $4 $5 $6 $7 $8 $9; ! #X obj 181 253 outlet; ! #X obj 288 15 inlet; ! #X obj 99 63 0; ! #X obj 128 63 1; ! #X obj 201 58 1; ! #X obj 234 58 0; #X text 12 5 nqpwrap (v4) - pix.test.at; #X text 252 126 this object is used by nqpoly; ! #X obj 42 67 t a a; ! #X obj 47 157 t a b; ! #X connect 0 0 12 0; ! #X connect 1 0 13 0; #X connect 2 0 4 0; ! #X connect 3 0 8 0; ! #X connect 3 0 9 0; ! #X connect 5 0 8 0; ! #X connect 5 0 9 0; #X connect 5 0 3 1; ! #X connect 6 0 1 1; ! #X connect 7 0 2 1; ! #X connect 8 0 1 1; ! #X connect 9 0 2 1; ! #X connect 12 0 1 0; ! #X connect 12 1 2 0; ! #X connect 13 0 3 0; ! #X connect 13 1 6 0; ! #X connect 13 1 7 0; --- 1,28 ---- ! #N canvas 366 494 450 300 10; #X obj 45 26 inlet; ! #X obj 45 117 spigot; ! #X obj 75 244 spigot; ! #X obj 45 204 $1 $2 $3 $4 $5 $6 $7 $8 $9; ! #X obj 75 271 outlet; ! #X obj 260 23 inlet; #X text 12 5 nqpwrap (v4) - pix.test.at; #X text 252 126 this object is used by nqpoly; ! #X obj 45 64 t a a; ! #X obj 45 157 t a b; ! #X obj 82 93 unpack 0 0; ! #X msg 96 64 0 1; ! #X msg 134 65 1 0; ! #X connect 0 0 8 0; ! #X connect 1 0 9 0; #X connect 2 0 4 0; ! #X connect 3 0 12 0; #X connect 5 0 3 1; ! #X connect 5 0 12 0; ! #X connect 8 0 1 0; ! #X connect 8 1 2 0; ! #X connect 9 0 3 0; ! #X connect 9 1 11 0; ! #X connect 10 0 1 1; ! #X connect 10 1 2 1; ! #X connect 11 0 10 0; ! #X connect 12 0 10 0;
Index: nqpoly4.pd =================================================================== RCS file: /cvsroot/pure-data/abstractions/nqpoly/nqpoly4/nqpoly4.pd,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** nqpoly4.pd 16 Nov 2005 05:57:17 -0000 1.1.1.1 --- nqpoly4.pd 12 Jul 2006 08:19:38 -0000 1.2 *************** *** 1,95 **** ! #N canvas 30 116 975 454 10; ! #X obj 16 20 inlet; ! #X obj 114 321 outlet; ! #X obj 290 198 symbol $0-poly; ! #X obj 93 13 namecanvas $0-poly; ! #X obj 255 167 t b b; ! #X obj 289 248 t f f; ! #X obj 314 271 + 1; ! #X obj 256 143 until; ! #X obj 147 234 symbol $0-poly; ! #X obj 172 293 pack s f; ! #X msg 169 336 ; $1 connect $2 0 1 0; ! #X obj 451 197 symbol $2; ! #X obj 547 197 symbol $3; ! #X obj 607 198 symbol $4; ! #X obj 671 197 symbol $5; ! #X obj 736 198 symbol $6; ! #X obj 260 101 - 1; ! #X obj 255 123 moses 1; ! #X obj 214 20 loadbang; ! #X obj 255 77 $1; ! #X obj 415 199 + 1; ! #X obj 286 227 f; ! #X obj 392 199 f 1; ! #X text 294 9 usage: nqpoly <number of objects> <abstraction name> <up to 4 creation args>; ! #X text 680 24 - don't edit a version of this patch that has been instantiated ! with any arguments (best to just open the nqpoly.pd file directly) ! ; ! #X text 680 91 - recreate the "t b b b b" object and the nqpwrap object ! (in that order) by clicking in them and adding a space at the end. ! ; ! #X text 297 38 don't save this patch unless you follow the instructions ! to the right.; ! #X text 673 4 editing:; ! #X text 684 137 - increment the indicated numbers if you add any objects ; ! #X text 176 188 obj index of nqpwrap; ! #X text 212 209 increment; ! #X text 350 221 index of "t b b b b" (increment); ! #X text 336 390 the first argument to the last connect message must ! be the index of the "t b b b b" object (increment); ! #X text 679 70 - delete the connection coming from nqpwrap's outlet ; ! #X text 313 88 your abstraction is ultimately called with the parameters: ! <index> <number of objects> <arg1> <arg2> <arg3> <arg4>; ! #X obj 294 295 pack f f s s f f s s s s; ! #X text 18 410 nqpoly (v4) - pix.test.at; ! #X obj 517 198 $1; ! #X obj 188 209 42; ! #X obj 316 220 + 41; ! #X msg 302 327 ; $3 obj 5 100 nqpwrap4 $4 $5 $6 $7 $8 $9 $10 ! ; $3 connect $1 0 $2 0 ; $3 connect 41 0 $2 1; ! #X obj 216 48 t b b b b; ! #X obj 19 117 nqpwrap4 $2 0 $1 $3 $4 $5 $6; ! #X connect 0 0 42 0; ! #X connect 2 0 35 2; ! #X connect 4 0 21 0; ! #X connect 4 1 11 0; ! #X connect 4 1 12 0; ! #X connect 4 1 13 0; ! #X connect 4 1 14 0; ! #X connect 4 1 2 0; ! #X connect 4 1 15 0; ! #X connect 4 1 22 0; ! #X connect 4 1 37 0; ! #X connect 5 0 35 0; ! #X connect 5 1 6 0; ! #X connect 6 0 9 1; ! #X connect 6 0 35 1; ! #X connect 7 0 4 0; ! #X connect 8 0 9 0; ! #X connect 9 0 10 0; ! #X connect 11 0 35 3; ! #X connect 12 0 35 6; ! #X connect 13 0 35 7; ! #X connect 14 0 35 8; ! #X connect 15 0 35 9; ! #X connect 16 0 17 0; ! #X connect 17 1 7 0; ! #X connect 18 0 41 0; ! #X connect 19 0 16 0; ! #X connect 20 0 22 1; ! #X connect 21 0 5 0; ! #X connect 22 0 20 0; ! #X connect 22 0 35 4; ! #X connect 22 0 39 0; ! #X connect 35 0 40 0; ! #X connect 37 0 35 5; ! #X connect 38 0 9 1; ! #X connect 39 0 21 1; ! #X connect 41 0 42 1; ! #X connect 41 1 8 0; ! #X connect 41 2 19 0; ! #X connect 41 3 38 0; --- 1,152 ---- ! #N canvas 293 125 864 653 10; ! #X obj 36 31 inlet; ! #X obj 36 338 outlet; ! #X obj 276 208 until; ! #X obj 350 335 symbol $2; ! #X obj 157 130 moses 1; ! #X obj 311 235 + 1; ! #X text 425 27 usage: nqpoly <number of objects> <abstraction name> <up to 4 creation args>; ! #X text 427 68 your abstraction is ultimately called with the parameters: ! <index> <number of objects> <arg1> <arg2> <arg3> <arg4>; ! #N canvas 7 455 362 318 1002-poly 0; ! #X restore 36 256 pd $0-poly; ! #X obj 36 227 s $0-in1; ! #X obj 121 228 s $0-in2; ! #X obj 36 283 r $0-out; ! #N canvas 220 112 751 428 init 0; ! #X obj 197 139 symbol $0-poly; ! #X obj 197 163 makefilename pd-%s; ! #X obj 197 187 pack s $0; ! #X msg 204 118 bang; ! #X text 154 317 This will clear the subpatch and create fake "in/outlets" ! as senders and receivers.; ! #X msg 197 230 ; $1 clear ; $1 obj 50 60 r $2-in1 ; $1 obj 199 ! 60 r $2-in2 ; $1 obj 50 200 s $2-out; ! #X obj 103 206 s $0-subname; ! #X obj 197 92 b; ! #X obj 197 69 r $0-init; ! #X connect 0 0 1 0; ! #X connect 1 0 2 0; ! #X connect 1 0 6 0; ! #X connect 2 0 5 0; ! #X connect 3 0 0 0; ! #X connect 7 0 0 0; ! #X connect 8 0 7 0; ! #X restore 238 37 pd init; ! #X obj 276 235 f; ! #X obj 121 26 inlet; ! #X obj 173 37 loadbang; ! #X obj 121 60 f $1; ! #X obj 377 216 f $1; ! #X obj 323 208 0; ! #X obj 276 494 + 3; ! #N canvas 0 0 692 559 last-two 0; ! #X obj 153 175 cnv 15 150 80 empty empty empty 20 12 0 14 -233017 -66577 ! 0; ! #X text 378 110 first reset (b) , then set new length (f).; ! #X text 311 195 Right outlet is responsible to first fill the list ; ! #X text 312 211 Left outlet then only lets the smaller list pass.; ! #X obj 180 183 list; ! #X obj 228 113 inlet; ! #X obj 180 149 inlet; ! #X obj 180 302 outlet; ! #X obj 180 228 list split 2; ! #X obj 228 149 b; ! #X connect 4 0 8 0; ! #X connect 5 0 9 0; ! #X connect 6 0 4 0; ! #X connect 8 0 4 1; ! #X connect 8 0 7 0; ! #X connect 8 2 4 1; ! #X connect 9 0 4 1; ! #X restore 276 516 pd last-two; ! #X obj 276 562 list prepend; ! #X msg 276 590 ; $1 connect $3 0 $2 0 ;; ! #X obj 324 359 r $0-subname; ! #X obj 355 541 r $0-subname; ! #N canvas 0 0 1005 687 finish 0; ! #X obj 432 273 list prepend; ! #X obj 432 235 + 2; ! #X msg 432 304 ; $1 connect 0 0 3 0 ; $1 connect $2 0 2 0 ;; ! #X obj 136 256 until; ! #X obj 171 283 + 1; ! #X obj 136 355 list prepend; ! #X obj 136 233 t a b; ! #X msg 136 389 ; $1 connect 1 0 $2 1 ;; ! #X obj 136 282 f 3; ! #X obj 183 256 3; ! #X obj 215 326 r $0-subname; ! #X obj 513 249 r $0-subname; ! #X text 182 234 first 3 objects are xlets; ! #X obj 92 102 inlet; ! #X obj 92 138 moses 1; ! #X obj 136 169 t a a; ! #X text 419 358 Connect final object to [s $0-out]; ! #X text 69 439 Connect all wrapper object's right inlet to [r $0-in2] ; ! #X connect 0 0 2 0; ! #X connect 1 0 0 0; ! #X connect 3 0 8 0; ! #X connect 4 0 8 1; ! #X connect 5 0 7 0; ! #X connect 6 0 3 0; ! #X connect 6 1 9 0; ! #X connect 8 0 4 0; ! #X connect 8 0 5 0; ! #X connect 9 0 8 1; ! #X connect 10 0 5 1; ! #X connect 11 0 0 1; ! #X connect 13 0 14 0; ! #X connect 14 1 15 0; ! #X connect 15 0 6 0; ! #X connect 15 1 1 0; ! #X restore 139 198 pd finish; ! #X text 568 154 based on: nqpoly (v4) - pix.test.at; ! #X obj 276 188 t a b; ! #X obj 231 116 s $0-init; ! #X obj 348 494 r $0-init; ! #X text 567 178 changes: fbar at footils.org 2006; ! #X obj 298 390 pack f s s f; ! #X msg 298 441 ; $2 obj 50 100 nqpwrap4 $3 $1 $4 $5 $6 $7 $8 ! ;; ! #X obj 298 414 list append $3 $4 $5 $6; ! #X obj 121 85 t b a a a b; ! #X obj 276 271 t a a b; ! #X obj 320 28 inlet; ! #X obj 320 55 t b a; ! #X connect 0 0 9 0; ! #X connect 2 0 13 0; ! #X connect 3 0 31 2; ! #X connect 4 1 27 0; ! #X connect 5 0 13 1; ! #X connect 11 0 1 0; ! #X connect 13 0 5 0; ! #X connect 13 0 35 0; ! #X connect 14 0 16 0; ! #X connect 15 0 16 0; ! #X connect 16 0 34 0; ! #X connect 17 0 31 3; ! #X connect 18 0 13 1; ! #X connect 19 0 20 0; ! #X connect 20 0 21 0; ! #X connect 21 0 22 0; ! #X connect 23 0 31 1; ! #X connect 24 0 21 1; ! #X connect 27 0 2 0; ! #X connect 27 1 18 0; ! #X connect 29 0 20 1; ! #X connect 31 0 33 0; ! #X connect 33 0 32 0; ! #X connect 34 0 10 0; ! #X connect 34 1 25 0; ! #X connect 34 2 4 0; ! #X connect 34 3 17 0; ! #X connect 34 4 28 0; ! #X connect 35 0 19 0; ! #X connect 35 1 31 0; ! #X connect 35 2 3 0; ! #X connect 36 0 37 0; ! #X connect 37 0 16 0; ! #X connect 37 1 3 0;