aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-11-22 18:40:34 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-11-22 18:40:34 +0000
commitc723d0c382d0f901ae302cb5c60cecaa2fbf2195 (patch)
tree78e5fff6ac1b245aa1acba3577d8ef6bbc56077a
parente13c080ea00836751efce187d516b3faa8a7040c (diff)
barebones working version of [instances]
svn path=/trunk/externals/manypoly/; revision=14484
-rw-r--r--instances-help.pd7
-rw-r--r--instances-template-help.pd14
-rw-r--r--instances-template.pd5
-rw-r--r--instances.pd154
4 files changed, 180 insertions, 0 deletions
diff --git a/instances-help.pd b/instances-help.pd
new file mode 100644
index 0000000..b672907
--- /dev/null
+++ b/instances-help.pd
@@ -0,0 +1,7 @@
+#N canvas 153 160 450 300 10;
+#X text 27 21 inlet0: routed to each instance based on instance number
+;
+#X text 27 41 inlet1: connected directly to each instance;
+#X text 27 101 outlet1: connected directly to each instance;
+#X obj 113 138 instances 50 instances-template;
+#X text 27 81 outlet0: connected directly to each instance;
diff --git a/instances-template-help.pd b/instances-template-help.pd
new file mode 100644
index 0000000..9111db7
--- /dev/null
+++ b/instances-template-help.pd
@@ -0,0 +1,14 @@
+#N canvas 204 154 602 360 10;
+#X text 79 120 Your [instances] abstraction needs two inlets and two
+outlets. 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 80 35 instances-template is a basic patch here only to illustrate what a
+patch designed for [instance] looks like. Feel free to use it as a
+template for your own patches for [instances].;
+#X obj 111 233 instances-template 1 8 four more arguments possible;
+#X text 48 255 message-out;
+#X text 52 212 message-in;
+#X text 328 255 message-out;
+#X text 332 212 message-in;
diff --git a/instances-template.pd b/instances-template.pd
new file mode 100644
index 0000000..085c53b
--- /dev/null
+++ b/instances-template.pd
@@ -0,0 +1,5 @@
+#N canvas 411 77 637 579 10;
+#X obj 29 30 inlet;
+#X obj 335 19 inlet;
+#X obj 345 508 outlet;
+#X obj 35 508 outlet;
diff --git a/instances.pd b/instances.pd
new file mode 100644
index 0000000..60630f2
--- /dev/null
+++ b/instances.pd
@@ -0,0 +1,154 @@
+#N canvas 287 129 622 492 10;
+#X obj 26 8 inlet;
+#X obj 99 306 until;
+#X obj 137 333 + 1;
+#X obj 99 333 float;
+#X msg 138 306 0;
+#X obj 26 32 send \$0-in1;
+#X obj 135 8 inlet;
+#X obj 135 32 send \$0-in2;
+#X obj 7 181 float \$1;
+#X obj 136 114 outlet;
+#X text 122 62 <-- open this subpatch to see the instances;
+#N canvas 90 404 490 437 make 0;
+#X obj 88 14 inlet;
+#X obj 210 83 until;
+#X obj 210 107 float;
+#X obj 248 107 + 1;
+#X msg 251 83 0;
+#X msg 281 113 route;
+#X obj 210 244 list trim;
+#X obj 210 223 list prepend obj 10 30;
+#X msg 85 225 connect 0 0 4 0;
+#X obj 88 57 trigger bang bang anything bang;
+#X obj 210 317 outlet;
+#N canvas 0 22 450 300 tolist 0;
+#X obj 90 40 inlet;
+#X obj 169 40 inlet;
+#X obj 67 215 outlet;
+#X obj 90 150 list;
+#X obj 67 171 list;
+#X obj 90 127 list prepend;
+#X connect 0 0 5 0;
+#X connect 1 0 5 1;
+#X connect 1 0 4 0;
+#X connect 3 0 4 1;
+#X connect 3 0 5 1;
+#X connect 4 0 2 0;
+#X connect 5 0 3 0;
+#X restore 210 193 pd tolist;
+#X connect 0 0 9 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 0 11 0;
+#X connect 3 0 2 1;
+#X connect 4 0 2 1;
+#X connect 5 0 11 0;
+#X connect 6 0 10 0;
+#X connect 7 0 6 0;
+#X connect 8 0 10 0;
+#X connect 9 0 8 0;
+#X connect 9 1 11 1;
+#X connect 9 2 1 0;
+#X connect 9 3 5 0;
+#X connect 9 3 4 0;
+#X connect 11 0 7 0;
+#X restore 292 363 pd make route;
+#N canvas 493 375 432 461 create 0;
+#X obj 29 10 inlet;
+#X obj 281 61 float \$1;
+#X obj 29 141 + 5;
+#X obj 155 83 + 50;
+#X obj 173 108 pack float symbol float float;
+#X obj 173 153 list trim;
+#X obj 218 61 symbol \$2;
+#X obj 155 61 * 20;
+#X obj 173 132 list append \$3 \$4 \$5 \$6 \$7;
+#X msg 45 282 connect 1 0 \$1 1;
+#X obj 29 37 trigger anything anything anything bang bang anything
+;
+#X obj 58 225 pack float float;
+#X msg 58 247 connect 4 \$2 \$1 0;
+#X msg 35 302 connect \$1 0 2 0;
+#X msg 18 326 connect \$1 1 3 0;
+#X obj 173 409 outlet;
+#X msg 173 176 obj 150 \$1 \$2 \$4 \$3 \$5 \$6 \$7 \$8 \$9;
+#X connect 0 0 10 0;
+#X connect 1 0 4 2;
+#X connect 2 0 9 0;
+#X connect 2 0 11 0;
+#X connect 2 0 13 0;
+#X connect 2 0 14 0;
+#X connect 3 0 4 0;
+#X connect 4 0 8 0;
+#X connect 5 0 16 0;
+#X connect 6 0 4 1;
+#X connect 7 0 3 0;
+#X connect 8 0 5 0;
+#X connect 9 0 15 0;
+#X connect 10 0 2 0;
+#X connect 10 1 11 1;
+#X connect 10 2 7 0;
+#X connect 10 3 6 0;
+#X connect 10 4 1 0;
+#X connect 10 5 4 3;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 15 0;
+#X connect 14 0 15 0;
+#X connect 16 0 15 0;
+#X restore 106 363 pd create and link instances;
+#X obj 466 464 send;
+#X obj 99 278 trigger 0 bang;
+#X obj 7 160 loadbang;
+#X msg 46 363 loadbang;
+#X obj 487 362 makefilename pd-%s;
+#X obj 46 227 trigger bang anything anything bang bang bang;
+#X msg 439 363 clear;
+#N canvas 268 410 566 361 xlets 0;
+#X obj 78 -165 inlet;
+#X obj 78 29 outlet;
+#X text 126 -137 This will create fake "in/outlets" as senders and
+receivers.;
+#X obj 78 -73 float \$0;
+#X msg 78 -47 obj 10 10 receive \$1-in1 \, obj 400 10 receive \$1-in2
+\, obj 10 560 send \$1-out1 \, obj 380 560 send \$1-out2;
+#X connect 0 0 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X restore 384 363 pd xlets;
+#X obj 7 205 moses 1;
+#X text 59 203 no need to generate anything for 0 instances;
+#X obj 487 338 symbol \$0-instances;
+#N canvas 48 22 633 512 \$0-instances 0;
+#X restore 26 61 pd \$0-instances;
+#X obj 26 113 outlet;
+#X obj 26 89 receive \$0-out1;
+#X obj 136 89 receive \$0-out2;
+#X connect 0 0 5 0;
+#X connect 1 0 3 0;
+#X connect 2 0 3 1;
+#X connect 3 0 2 0;
+#X connect 3 0 12 0;
+#X connect 4 0 3 1;
+#X connect 6 0 7 0;
+#X connect 8 0 21 0;
+#X connect 11 0 13 0;
+#X connect 12 0 13 0;
+#X connect 14 0 1 0;
+#X connect 14 1 4 0;
+#X connect 15 0 8 0;
+#X connect 16 0 13 0;
+#X connect 17 0 13 1;
+#X connect 18 0 16 0;
+#X connect 18 1 14 0;
+#X connect 18 2 11 0;
+#X connect 18 3 20 0;
+#X connect 18 4 19 0;
+#X connect 18 5 23 0;
+#X connect 19 0 13 0;
+#X connect 20 0 13 0;
+#X connect 21 1 18 0;
+#X connect 23 0 17 0;
+#X connect 26 0 25 0;
+#X connect 27 0 9 0;