Update of /cvsroot/pure-data/abstractions/footils/foo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27055
Added Files: polypoly-help.pd polypoly-wrap.pd polypoly.pd Log Message: added polypoly abstractions
--- NEW FILE: polypoly.pd --- #N canvas 211 82 939 654 10; #X obj 36 31 inlet; #X obj 292 200 moses 1; #X text 495 67 your abstraction is ultimately called with the parameters: <index> <number of objects> <arg1> <arg2> <arg3> <arg4>; #N canvas 7 455 362 318 $0-poly 0; #X restore 36 254 pd $0-poly; #X obj 36 227 s $0-in1; #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 obj 103 206 s $0-subname; #X obj 197 92 b; #X obj 197 69 r $0-init; #X msg 197 230 ; $1 clear ; $1 obj 50 60 r $2-in1 ; $1 obj 199 60 r $2-in2 ; $1 obj 50 200 throw~ $2-out0 ; $1 obj 199 200 throw~ $2-out1 ;; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 0 5 0; #X connect 2 0 8 0; #X connect 3 0 0 0; #X connect 6 0 0 0; #X connect 7 0 6 0; #X restore 343 108 pd init; #X obj 139 31 inlet; #X obj 256 63 loadbang; #X obj 256 108 f $1; #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 386 521 pd last-two; #X obj 386 562 list prepend; #X msg 386 589 ; $1 connect $3 0 $2 0 ;; #X obj 434 359 r $0-subname; #X obj 465 541 r $0-subname; #N canvas 183 178 858 457 finish 0; #X obj 121 185 until; #X obj 156 212 + 1; #X obj 121 284 list prepend; #X obj 121 162 t a b; #X obj 200 255 r $0-subname; #X obj 452 126 r $0-subname; #X obj 77 31 inlet; #X obj 77 67 moses 1; #X text 412 238 Connect [r $0-in1] to first object's first inlet; #X obj 168 185 4; #X obj 121 211 f 4; #X text 167 163 first 4 objects are xlets; #X msg 415 196 ; $1 connect 0 0 4 0 ;; #X msg 121 318 ; $1 connect 1 0 $2 1 ; $1 connect $2 1 2 0 ; $1 connect $2 2 3 0 ;; #X obj 415 165 symbol; #X obj 121 98 t a b; #X text 276 344 Connect all wrapper's middle signal outlet to [s~ $0-out0] ; #X text 276 330 Connect all wrapper's right inlet to [r $0-in2]; #X text 276 359 Connect all wrapper's left signal outlet to [s~ $0-out1] ; #X connect 0 0 10 0; #X connect 1 0 10 1; #X connect 2 0 13 0; #X connect 3 0 0 0; #X connect 3 1 9 0; #X connect 4 0 2 1; #X connect 5 0 14 1; #X connect 6 0 7 0; #X connect 7 1 15 0; #X connect 9 0 10 1; #X connect 10 0 1 0; #X connect 10 0 2 0; #X connect 14 0 12 0; #X connect 15 0 3 0; #X connect 15 1 14 0; #X restore 274 260 pd finish; #X text 540 134 based on: nqpoly (v4) - pix.test.at; #X obj 343 135 s $0-init; #X obj 458 494 r $0-init; #X text 540 158 changes: fbar at footils.org 2006; #X obj 408 390 pack f s s f; #X msg 408 444 ; $2 obj 50 100 polypoly-wrap $3 $1 $4 $5 $6 $7 $8 ;; #X obj 256 135 t b a a a b; #X obj 386 273 t a a b; #X obj 395 31 inlet; #X obj 36 167 pack 0 0 0; #X obj 36 140 - 1; #X obj 36 344 outlet~; #X obj 460 332 symbol $3; #X obj 408 417 list append $4 $5 $6 $7; #X obj 386 494 + 4; #X obj 139 344 outlet~; #X obj 36 287 catch~ $0-out0; #X obj 139 287 catch~ $0-out1; #X text 495 30 usage: polypoly <number of objects> <voice stealing: 0/1> <abstraction name> <up to 4 creation args>; #X obj 36 113 poly $1 $2; #N canvas 0 0 382 282 loadbang 0; #X obj 130 64 inlet; #X obj 130 86 b; #X msg 130 141 ; $1 loadbang; #X obj 167 86 r $0-subname; #X obj 130 113 symbol; #X connect 0 0 1 0; #X connect 1 0 4 0; #X connect 3 0 4 1; #X connect 4 0 2 0; #X restore 256 287 pd loadbang; #X obj 139 227 s $0-in2; #X obj 395 58 unpack f s; #N canvas 0 0 227 234 countto 0; #X obj 60 97 until; #X obj 95 124 + 1; #X obj 60 124 f; #X obj 107 97 0; #X obj 60 77 t a b; #X obj 60 54 inlet; #X obj 60 145 outlet; #X connect 0 0 2 0; #X connect 1 0 2 1; #X connect 2 0 1 0; #X connect 2 0 6 0; #X connect 3 0 2 1; #X connect 4 0 0 0; #X connect 4 1 3 0; #X connect 5 0 4 0; #X restore 386 246 pd countto; #X obj 487 216 f; #X connect 0 0 34 0; #X connect 1 1 38 0; #X connect 6 0 36 0; #X connect 7 0 8 0; #X connect 8 0 21 0; #X connect 9 0 10 0; #X connect 10 0 11 0; #X connect 12 0 19 1; #X connect 13 0 10 1; #X connect 17 0 9 1; #X connect 19 0 28 0; #X connect 21 0 35 0; #X connect 21 1 14 0; #X connect 21 2 1 0; #X connect 21 3 39 0; #X connect 21 4 16 0; #X connect 22 0 29 0; #X connect 22 1 19 0; #X connect 22 2 27 0; #X connect 23 0 37 0; #X connect 24 0 4 0; #X connect 25 0 24 0; #X connect 27 0 19 2; #X connect 28 0 20 0; #X connect 29 0 9 0; #X connect 31 0 26 0; #X connect 32 0 30 0; #X connect 34 0 25 0; #X connect 34 1 24 1; #X connect 34 2 24 2; #X connect 37 0 8 0; #X connect 37 1 27 0; #X connect 38 0 22 0; #X connect 39 0 19 3;
--- NEW FILE: polypoly-wrap.pd --- #N canvas 366 494 450 300 10; #X obj 45 26 inlet; #X obj 45 204 $1 $2 $3 $4 $5 $6 $7 $8 $9; #X obj 96 166 outlet; #X obj 222 22 inlet; #X text 12 5 nqpwrap (v4) - pix.test.at; #X text 252 126 this object is used by nqpoly; #X obj 45 137 route $2; #X obj 129 237 outlet~; #X obj 223 235 outlet~; #X connect 0 0 6 0; #X connect 1 0 7 0; #X connect 1 1 8 0; #X connect 3 0 1 1; #X connect 6 0 1 0; #X connect 6 1 2 0;
--- NEW FILE: polypoly-help.pd --- #N canvas 306 63 695 747 10; #X msg 179 185 bang; #X obj 179 263 makenote 80 1000; #X obj 179 298 pack 0 0; #X obj 179 208 random 30; #X obj 179 237 + 40; #X msg 301 211 40 , 44 , 56 , 60; #X obj 232 167 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 232 187 metro 100; #X obj 364 380 dbtorms; #X obj 367 360 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X obj 180 402 *~ 0; #X obj 341 405 *~ 0; #X obj 249 443 dac~; #X msg 529 235 ; pd dsp $1; #X obj 529 217 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 82 559 inlet for (note , velocity) pairs; #X text 119 600 dsp-out left; #X text 428 600 dsp-out right; #X text 87 85 Arguments: <max polyphony> <voice stealing 0/1> <poly-abstraction name> <arg1> <arg2> <arg3> <arg4>; #X text 128 635 Thanks to Cesare Marilungo for inspiration.; #X text 87 44 [poly]-clone which automatically creates abstractions to be played.; #X text 49 20 [polypoly]; #X text 87 669 Also see:; #X obj 159 668 poly; #X obj 179 361 polypoly 12 1 voice-poly; #X floatatom 260 315 5 0 0 2 decay - -; #X floatatom 315 264 5 0 0 0 - - -; #X text 450 321 recreate all abstractions; #X text 427 560 extra inlet to customize freely; #X msg 342 323 12 voice-poly; #X text 218 339 custom inlet; #X text 85 157 Example:; #X text 128 470 Your [polypoly] abstraction needs two inlets and two outlet~s. First argument will be the voice index number starting from 0 , second argument will be the total number of voices. Four more arguments can be passed as arguments to [polypoly] and will be passed on to the custom abstraction.; #X text 86 121 Inlets: <pair: note velocity> <custom> <pair: num abstraction_name> ; #X obj 161 578 voice-poly 1 8 four more arguments possible; #X msg 128 318 clear; #X msg 92 318 stop; #X connect 0 0 3 0; #X connect 1 0 2 0; #X connect 1 1 2 1; #X connect 2 0 24 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 7 0; #X connect 7 0 3 0; #X connect 8 0 10 1; #X connect 8 0 11 1; #X connect 9 0 8 0; #X connect 10 0 12 0; #X connect 11 0 12 1; #X connect 14 0 13 0; #X connect 24 0 10 0; #X connect 24 1 11 0; #X connect 25 0 24 1; #X connect 26 0 1 2; #X connect 29 0 24 2; #X connect 35 0 24 0; #X connect 36 0 24 0;