aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-11-22 19:43:38 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-11-22 19:43:38 +0000
commit11ff4a156d6c6803869f9abc06cba1506806d990 (patch)
tree1871fbaf1553475886d48eba7d4146eac57da0f7
parent0a6fb5f7b9fb2dd548d1bc7e3e8de5c8bad2b5c1 (diff)
repackaged Frank's polypolybackups/externals/manypoly@14489
svn path=/trunk/externals/manypoly/; revision=14488
-rw-r--r--Makefile2
-rw-r--r--README.txt2
-rw-r--r--polypoly-voice~-help.pd14
-rw-r--r--polypoly-voice~.pd86
-rw-r--r--polypoly-wrap~-help.pd5
-rw-r--r--polypoly-wrap~.pd16
-rw-r--r--polypoly~-help.pd56
-rw-r--r--polypoly~.pd183
8 files changed, 362 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9809929..bc775cd 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ SOURCES =
# list all pd objects (i.e. myobject.pd) files here, and their helpfiles will
# be included automatically
-PDOBJECTS = instances.pd instances-template.pd instances~.pd instances-template~.pd polypoly.pd polypoly-wrap.pd polypoly-voice.pd voicepoly.pd voicepoly-wrap.pd
+PDOBJECTS = instances.pd instances-template.pd instances~.pd instances-template~.pd polypoly~.pd polypoly-wrap~.pd polypoly-voice~.pd voicepoly.pd voicepoly-wrap.pd
# example patches and related files, in the 'examples' subfolder
EXAMPLES = tick.wav ticker-voice.pd ticker.pd tock.wav aw.wav voicetest.pd run-200voicetest.pd
diff --git a/README.txt b/README.txt
index 0e5c9bf..28a5173 100644
--- a/README.txt
+++ b/README.txt
@@ -3,7 +3,7 @@
- instances: many instances that are both individually and globally addressable
- instances~: same as [instances] but with outlet~s
-- midivoices~: designed for MIDI polyphony, used with [poly] and based on [polypoly]
+- polypoly~: designed for MIDI polyphony, built upon [poly] and based on [polypoly]
- bundle: a bundle of instances all connected to the same inlets and outlets
Objects in the 'many' lib are based on code from Stephen Pickles' (aka pix) nqpoly4 and Frank Barknecht's polypoly. Thanks to pix's nqpoly4 because that was the real groundbreaking work that proved that a useful and reliable instance-managing object could be programmed in Pd.
diff --git a/polypoly-voice~-help.pd b/polypoly-voice~-help.pd
new file mode 100644
index 0000000..d8e1e2a
--- /dev/null
+++ b/polypoly-voice~-help.pd
@@ -0,0 +1,14 @@
+#N canvas 204 154 602 360 10;
+#X text 32 214 inlet for (note \, velocity) pairs;
+#X text 69 255 dsp-out left;
+#X text 378 255 dsp-out right;
+#X text 377 215 extra inlet to customize freely;
+#X text 96 131 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 obj 111 233 polypoly~-voice 1 8 four more arguments possible;
+#X text 98 36 polypoly~-voice is a basic patch here only to illustrate
+what a patch designed for [polypoly~] looks like. Feel free to use it
+as a template for your own voice patches.;
diff --git a/polypoly-voice~.pd b/polypoly-voice~.pd
new file mode 100644
index 0000000..d8e5e7a
--- /dev/null
+++ b/polypoly-voice~.pd
@@ -0,0 +1,86 @@
+#N canvas 403 268 423 406 10;
+#X obj 75 80 inlet;
+#X obj 147 100 inlet;
+#X obj 76 275 outlet~;
+#X obj 148 276 outlet~;
+#X text 62 54 inlet for (note \, velocity) pairs;
+#X text 74 303 left and right dsp outlet;
+#N canvas 0 0 621 566 \$0-instr 1;
+#X obj 75 80 inlet;
+#X obj 76 356 *~;
+#X obj 76 389 *~ 0.2;
+#X obj 75 247 mtof;
+#X obj 139 249 select 0;
+#X obj 75 224 unpack 0 0;
+#X obj 192 276 / 127;
+#X obj 76 295 osc~;
+#X obj 76 455 outlet~;
+#X obj 91 194 print \$1_NOTE;
+#X obj 151 456 outlet~;
+#X obj 383 237 random 100;
+#X obj 150 423 *~ 0.2;
+#X obj 77 424 *~ 0.2;
+#X text 447 286 * ~M_PI/2;
+#X obj 383 285 * 1.5708;
+#X obj 342 350 cos;
+#X obj 423 351 sin;
+#X obj 383 264 * 0.01;
+#X obj 280 349 pow -1;
+#X floatatom 280 410 5 0 0 0 - - -;
+#X floatatom 342 411 5 0 0 0 - - -;
+#X floatatom 423 411 5 0 0 0 - - -;
+#X obj 280 317 f \$2;
+#X msg 139 304 \$1 10;
+#X obj 134 362 *~;
+#X obj 134 381 *~;
+#X text 62 54 inlet for (note \, velocity) pairs;
+#X text 74 483 left and right dsp outlet;
+#X obj 383 172 loadbang;
+#X obj 257 91 inlet;
+#X obj 192 301 pack 0 500;
+#X floatatom 272 119 5 0 0 0 - - -;
+#X obj 139 340 vline~;
+#X text 382 79 loadbang can be used just fine.;
+#X obj 75 100 t a b;
+#X connect 0 0 35 0;
+#X connect 1 0 2 0;
+#X connect 2 0 13 0;
+#X connect 2 0 12 0;
+#X connect 3 0 7 0;
+#X connect 4 0 31 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 6 0 24 0;
+#X connect 7 0 1 0;
+#X connect 11 0 18 0;
+#X connect 12 0 10 0;
+#X connect 13 0 8 0;
+#X connect 15 0 16 0;
+#X connect 15 0 17 0;
+#X connect 16 0 13 1;
+#X connect 16 0 21 0;
+#X connect 17 0 12 1;
+#X connect 17 0 22 0;
+#X connect 18 0 15 0;
+#X connect 19 0 2 1;
+#X connect 19 0 20 0;
+#X connect 23 0 19 0;
+#X connect 24 0 33 0;
+#X connect 25 0 26 0;
+#X connect 25 0 26 1;
+#X connect 26 0 1 1;
+#X connect 29 0 11 0;
+#X connect 29 0 23 0;
+#X connect 30 0 31 1;
+#X connect 30 0 32 0;
+#X connect 31 0 33 0;
+#X connect 33 0 25 0;
+#X connect 33 0 25 1;
+#X connect 35 0 5 0;
+#X restore 75 223 pd \$0-instr;
+#X text 129 76 extra inlet;
+#X connect 0 0 6 0;
+#X connect 1 0 6 1;
+#X connect 6 0 2 0;
+#X connect 6 1 3 0;
diff --git a/polypoly-wrap~-help.pd b/polypoly-wrap~-help.pd
new file mode 100644
index 0000000..43330fd
--- /dev/null
+++ b/polypoly-wrap~-help.pd
@@ -0,0 +1,5 @@
+#N canvas 137 124 450 300 10;
+#X text 60 100 [polypoly~-wrap] is an object used by [polypoly~] to handle
+the voice allocation logic for each patch that [polypoly~] is instantiating.
+It is not a patch that has any use outside of how [polypoly~] uses it
+internally.;
diff --git a/polypoly-wrap~.pd b/polypoly-wrap~.pd
new file mode 100644
index 0000000..66c3fd4
--- /dev/null
+++ b/polypoly-wrap~.pd
@@ -0,0 +1,16 @@
+#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;
diff --git a/polypoly~-help.pd b/polypoly~-help.pd
new file mode 100644
index 0000000..d370d57
--- /dev/null
+++ b/polypoly~-help.pd
@@ -0,0 +1,56 @@
+#N canvas 587 22 616 708 10;
+#X msg 147 185 bang;
+#X obj 147 263 makenote 80 1000;
+#X obj 147 298 pack 0 0;
+#X obj 147 208 random 30;
+#X obj 147 237 + 40;
+#X msg 269 211 40 \, 44 \, 56 \, 60;
+#X obj 200 167 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 200 187 metro 100;
+#X text 50 559 inlet for (note \, velocity) pairs;
+#X text 87 600 dsp-out left;
+#X text 396 600 dsp-out right;
+#X text 55 85 Arguments: <max polyphony> <voice stealing 0/1> <poly-abstraction
+name> <arg1> <arg2> <arg3> <arg4>;
+#X text 96 635 Thanks to Cesare Marilungo for inspiration.;
+#X text 17 20 [polypoly~];
+#X text 55 669 Also see:;
+#X obj 127 668 poly;
+#X obj 147 361 polypoly~ 12 1 polypoly~-voice;
+#X floatatom 228 315 5 0 0 2 decay - -;
+#X floatatom 283 264 5 0 0 0 - - -;
+#X text 418 321 recreate all abstractions;
+#X text 395 560 extra inlet to customize freely;
+#X msg 310 323 12 polypoly~-voice;
+#X text 186 339 custom inlet;
+#X text 53 157 Example:;
+#X text 96 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 54 121 Inlets: <pair: note velocity> <custom> <pair: num abstraction_name>
+;
+#X obj 129 578 polypoly~-voice 1 8 four more arguments possible;
+#X msg 96 318 clear;
+#X msg 60 318 stop;
+#X text 55 44 [poly]-clone which automatically creates abstractions
+to be played based heavily on [polypoly] by Frank Barknecht.;
+#X obj 153 406 output~;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 1 1 2 1;
+#X connect 2 0 16 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 16 0 30 0;
+#X connect 16 1 30 1;
+#X connect 17 0 16 1;
+#X connect 18 0 1 2;
+#X connect 21 0 16 2;
+#X connect 27 0 16 0;
+#X connect 28 0 16 0;
diff --git a/polypoly~.pd b/polypoly~.pd
new file mode 100644
index 0000000..d97cfe3
--- /dev/null
+++ b/polypoly~.pd
@@ -0,0 +1,183 @@
+#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;