aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-11-22 17:25:17 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-11-22 17:25:17 +0000
commit01ff170032c4f5124c814635daa5e8f954e59260 (patch)
treeb32c712a30f51fe3826451a7d2f276f30cf11ff9
parent8b6c844d0e71a845d40de76be549a520e42fcd75 (diff)
made example instrument that has 200 voices
svn path=/trunk/externals/manypoly/; revision=14479
-rw-r--r--examples/aw.wavbin0 -> 133166 bytes
-rw-r--r--examples/run-voicetest.pd119
-rw-r--r--examples/voicetest.pd73
3 files changed, 139 insertions, 53 deletions
diff --git a/examples/aw.wav b/examples/aw.wav
new file mode 100644
index 0000000..1ad142e
--- /dev/null
+++ b/examples/aw.wav
Binary files differ
diff --git a/examples/run-voicetest.pd b/examples/run-voicetest.pd
index 199988e..1e34b7e 100644
--- a/examples/run-voicetest.pd
+++ b/examples/run-voicetest.pd
@@ -1,22 +1,107 @@
-#N canvas 466 360 450 300 10;
+#N canvas 506 162 588 537 10;
#X declare -path ..;
-#X obj 97 147 voicepoly 5 voicetest;
-#X obj 109 228 dac~;
-#X obj 225 108 hsl 128 15 0 10 0 0 empty empty empty -2 -8 0 10 -262144
--1 -1 0 1;
-#X floatatom 237 130 5 0 0 0 - - -;
-#X msg 96 98 bang;
-#X obj 337 16 pddp/dsp;
-#X obj 220 170 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+#X obj 132 207 hsl 60 18 0 1 0 1 empty empty pan 15 9 0 10 -204800
+-1 -1 2300 0;
+#X floatatom 135 229 5 0 0 0 - - -;
+#X obj 402 41 pddp/dsp;
+#X obj 213 320 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
-#X text 48 261 three outlets are needed: 2 audio and one message outlet
+#X text 35 410 three outlets are needed: 2 audio and one message outlet
that is banged when the voice is finished.;
-#X text 23 57 two inlets are needed: the first for voice-managed messages
+#X text 15 20 two inlets are needed: the first for voice-managed messages
\, and the second for messages that are send to all instances;
-#X obj 318 45 declare -path ..;
-#X connect 0 0 1 0;
-#X connect 0 1 1 1;
-#X connect 0 2 6 0;
-#X connect 2 0 0 1;
-#X connect 2 0 3 0;
+#X obj 386 9 declare -path ..;
+#X obj 63 207 hsl 60 18 0.1 10 1 1 empty empty stretch 10 9 0 10 -204786
+-1 -1 4600 0;
+#X floatatom 70 228 5 0 0 0 - - -;
+#X text 231 319 out of voices;
+#X text 26 169 factor by which to stretch sample;
+#X text 26 183 (i.e. 2 means twice as long);
+#X text 33 459 this is the patch of a single voice \, it has the same
+inlets and outlets as voicepoly above:;
+#X obj 335 214 table \$0-sample;
+#X text 221 298 (you can send \$0 for localizing things);
+#X obj 336 165 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#N canvas 0 22 482 301 load 0;
+#X obj 48 10 inlet;
+#X obj 138 251 outlet;
+#X obj 138 167 soundfiler;
+#X obj 138 50 loadbang;
+#X msg 138 146 read -resize \$1 \$2;
+#X obj 138 113 list append \$0-sample;
+#X msg 138 72 aw.wav;
+#X obj 49 61 openpanel;
+#X obj 309 21 inlet;
+#X obj 309 48 trigger bang bang;
+#X obj 320 174 tabwrite~ \$0-sample;
+#X obj 322 145 adc~;
+#X obj 354 146 send \$0-sample;
+#X msg 354 122 resize \$1;
+#X msg 354 82 100000;
+#X connect 0 0 7 0;
+#X connect 2 0 1 0;
+#X connect 3 0 6 0;
+#X connect 4 0 2 0;
+#X connect 5 0 4 0;
+#X connect 6 0 5 0;
+#X connect 7 0 5 0;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X connect 9 1 14 0;
+#X connect 11 0 10 0;
+#X connect 11 1 10 0;
+#X connect 13 0 12 0;
+#X connect 14 0 13 0;
+#X connect 14 0 1 0;
+#X restore 336 184 pd load sample;
+#X text 248 263 <-- send the size of the sample table to all instances
+;
+#X obj 67 349 output~;
+#X obj 135 505 voicetest 0 0 \$0;
+#X obj 60 272 pack 0 0;
+#X obj 78 250 t b f;
+#X text 253 164 soundfile -->;
+#X obj 417 165 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 435 163 <-- record from mic;
+#X text 160 104 <-- play your voice like an instrument \, click and
+drag;
+#X obj 60 297 voicepoly 200 voicetest \$0;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X obj 106 259 outlet;
+#X obj 106 80 inlet;
+#X obj 160 79 inlet;
+#X obj 106 101 / 80;
+#X obj 106 234 pack float float;
+#X obj 106 214 * 10;
+#X obj 160 101 / 90;
+#X obj 160 125 + 0.1;
+#X obj 106 186 mapping/exponential_curve 0.75;
+#X connect 1 0 3 0;
+#X connect 2 0 6 0;
+#X connect 3 0 4 1;
#X connect 4 0 0 0;
+#X connect 5 0 4 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 8 0 5 0;
+#X coords 0 0 1 1 90 90 0;
+#X restore 2 175 pd;
+#X obj 64 76 gcanvas 80 80;
+#X connect 0 0 1 0;
+#X connect 0 0 21 0;
+#X connect 7 0 8 0;
+#X connect 7 0 20 0;
+#X connect 15 0 16 0;
+#X connect 16 0 26 1;
+#X connect 20 0 26 0;
+#X connect 21 0 20 0;
+#X connect 21 1 20 1;
+#X connect 23 0 16 1;
+#X connect 26 0 18 0;
+#X connect 26 1 18 1;
+#X connect 26 2 3 0;
+#X connect 27 0 26 0;
+#X connect 28 0 27 0;
+#X connect 28 1 27 1;
diff --git a/examples/voicetest.pd b/examples/voicetest.pd
index d189cef..06a8a5d 100644
--- a/examples/voicetest.pd
+++ b/examples/voicetest.pd
@@ -1,39 +1,40 @@
-#N canvas 210 166 495 383 10;
-#X obj 115 24 inlet;
-#X obj 122 353 outlet~;
-#X obj 305 24 inlet;
-#X obj 202 353 outlet~;
-#X obj 250 169 osc~;
-#X obj 122 227 *~;
-#X obj 202 227 *~;
-#X obj 122 170 tabplay~ \$0-sample;
-#X obj 323 88 table \$0-sample;
-#X obj 171 103 print \$1;
-#X obj 51 141 loadbang;
-#X msg 61 162 1;
-#X obj 137 205 -~;
-#X obj -12 322 soundfiler;
-#X obj -12 272 symbol \$0-sample;
-#X msg -12 297 read -resize test.wav \$1;
-#X msg -36 217 bang;
-#X msg 143 145 bang;
-#X obj 310 352 outlet;
-#X text 357 352 bang when done;
+#N canvas 393 160 577 494 10;
+#X obj 122 11 inlet;
+#X obj 122 463 outlet~;
+#X obj 267 11 inlet;
+#X obj 239 463 outlet~;
+#X obj 320 463 outlet;
+#X text 367 463 bang when done;
+#X obj 122 337 line~;
+#X obj -15 88 print voicetest_\$1;
+#X obj 282 76 samplerate~;
+#X obj 267 97 /;
+#X obj 320 435 delay;
+#X obj 267 124 * 1000;
+#X text 306 125 ms;
+#X obj 122 241 pack float float;
+#X msg 122 313 0 \, \$2 \$1;
+#X obj 122 179 *;
+#X obj 112 365 tabread4~ \$3-sample;
+#X obj 122 397 pan/equal_power_pan~;
+#X obj 122 60 unpack float float;
+#X obj 282 56 loadbang;
#X connect 0 0 7 0;
+#X connect 0 0 18 0;
#X connect 2 0 9 0;
-#X connect 2 0 4 0;
-#X connect 4 0 12 1;
-#X connect 4 0 6 1;
-#X connect 5 0 1 0;
-#X connect 6 0 3 0;
-#X connect 7 0 5 0;
-#X connect 7 0 6 0;
-#X connect 7 1 18 0;
-#X connect 10 0 11 0;
-#X connect 10 0 14 0;
-#X connect 11 0 12 0;
-#X connect 12 0 5 1;
-#X connect 14 0 15 0;
+#X connect 2 0 13 1;
+#X connect 6 0 16 0;
+#X connect 8 0 9 1;
+#X connect 9 0 11 0;
+#X connect 10 0 4 0;
+#X connect 11 0 15 1;
+#X connect 13 0 14 0;
+#X connect 14 0 6 0;
#X connect 15 0 13 0;
-#X connect 16 0 14 0;
-#X connect 17 0 7 0;
+#X connect 15 0 10 0;
+#X connect 16 0 17 0;
+#X connect 17 0 1 0;
+#X connect 17 1 3 0;
+#X connect 18 0 15 0;
+#X connect 18 1 17 1;
+#X connect 19 0 8 0;