diff examples/08-PureData/envelopeTrigger/_main.pd @ 531:ddb86944e138 prerelease

cleaned up all pd examples (and removed some). added polysynth and vangelisiser to instruments examples
author chnrx <chris.heinrichs@gmail.com>
date Thu, 23 Jun 2016 20:40:05 +0100
parents 8fcfbfb32aa0
children
line wrap: on
line diff
--- a/examples/08-PureData/envelopeTrigger/_main.pd	Thu Jun 23 13:22:59 2016 +0100
+++ b/examples/08-PureData/envelopeTrigger/_main.pd	Thu Jun 23 20:40:05 2016 +0100
@@ -1,71 +1,25 @@
-#N canvas 646 209 359 287 10;
-#X obj 28 207 dac~;
-#N canvas 324 380 556 621 env 0;
-#N canvas 886 1001 131 207 >~ 0;
-#X obj 19 -37 -~;
-#X obj 19 -58 min~;
-#X obj 19 26 *~ 1e+37;
-#X obj 19 5 +~ 1e-37;
-#X obj 19 -16 clip~ -1e-37 0;
-#X obj 19 -83 inlet~;
-#X obj 62 -83 inlet~;
-#X obj 19 48 outlet~;
-#X connect 0 0 4 0;
-#X connect 1 0 0 0;
-#X connect 2 0 7 0;
-#X connect 3 0 2 0;
-#X connect 4 0 3 0;
-#X connect 5 0 1 0;
-#X connect 6 0 0 1;
-#X connect 6 0 1 1;
-#X restore 199 106 pd >~;
-#X obj 23 173 /~ 44100;
-#X obj 68 153 samplerate~;
-#X obj 68 133 loadbang;
-#X obj 199 128 biquad~ 0 0 -1 1 0;
-#X obj 23 209 rpole~;
-#X obj 23 153 sig~ 1;
-#X obj 226 171 sig~ 0.5;
-#N canvas 0 22 110 231 <~ 0;
-#X obj 11 -41 -~;
-#X obj 11 29 +~ 1e-37;
-#X obj 11 8 clip~ -1e-37 0;
-#X obj 11 -86 inlet~;
-#X obj 55 -85 inlet~;
-#X obj 11 -62 max~;
-#X obj 11 -17 *~ -1;
-#X obj 11 81 outlet~;
-#X obj 11 50 *~ 1e+37;
-#X connect 0 0 6 0;
-#X connect 1 0 8 0;
-#X connect 2 0 1 0;
-#X connect 3 0 5 0;
-#X connect 4 0 0 1;
-#X connect 4 0 5 1;
-#X connect 5 0 0 0;
-#X connect 6 0 2 0;
-#X connect 8 0 7 0;
-#X restore 199 192 pd <~;
-#X text 237 193 (x != x);
-#X obj 23 467 *~;
-#X obj 199 150 *~ -1;
-#X obj 23 331 *~ 512;
-#X obj 23 229 clip~ 0 1;
-#X obj 23 352 tabread4~ env1;
-#X obj 23 310 *~;
-#X obj 199 64 abs~;
-#X obj 199 43 hip~ 1;
-#X obj 199 22 inlet~ excitationSignal;
-#X obj 218 269 sig~ 1;
-#X obj 218 292 /~;
-#X obj 226 86 inlet~ threshold;
-#X obj 262 229 inlet~ envDuration;
-#X obj 38 445 osc~ 220;
-#X obj 38 425 +~ 50;
-#X obj 38 385 *~;
-#X obj 38 405 *~ 1000;
-#X obj 262 269 clip~ 1e-05 100000;
-#X obj 23 487 outlet~;
+#N canvas 646 209 853 1174 10;
+#X text 29 17 SAMPLE-ACCURATE ENVELOPE TRIGGER;
+#X text 29 27 ================================;
+#X obj 33 543 /~ 44100;
+#X obj 78 523 samplerate~;
+#X obj 78 503 loadbang;
+#X obj 33 619 rpole~;
+#X obj 33 477 sig~ 1;
+#X obj 438 571 sig~ 0.5;
+#X obj 33 937 *~;
+#X obj 399 550 *~ -1;
+#X obj 33 801 *~ 512;
+#X obj 33 639 clip~ 0 1;
+#X obj 33 822 tabread4~ env1;
+#X obj 33 780 *~;
+#X obj 399 424 abs~;
+#X obj 48 736 sig~ 1;
+#X obj 48 759 /~;
+#X obj 48 915 osc~ 220;
+#X obj 48 895 +~ 50;
+#X obj 48 855 *~;
+#X obj 112 736 clip~ 1e-05 100000;
 #N canvas 0 22 450 278 (subpatch) 0;
 #X array env1 512 float 3;
 #A 0 0 0.0625 0.0883883 0.108253 0.125 0.139754 0.153093 0.165359 0.176777
@@ -134,63 +88,98 @@
 0.00186082 0.00153787 0.00124567 0.000984237 0.000753556 0.000553633
 0.000384467 0.000246059 0.000138408 6.15148e-05 1.53787e-05 0;
 #X coords 0 1 512 0 512 64 1 0 0;
-#X restore 24 536 graph;
-#X text 244 55 centre signal around zero and take abs value;
-#X text 243 107 if greater than threshold output 1;
-#X text 313 129 differentiator;
-#X text 238 150 (generates impulse on positive trigger (0->1);
-#X text 67 210 signal-rate counter;
-#X text 296 193 -> resets counter by briefly setting;
-#X text 314 204 rpole~ coeff to 0;
-#X text 96 416 kickdrum 101 :P;
-#X text 400 514 pre-generated envelope;
-#X obj 262 249 *~;
-#X text 127 352 << use envelope value for volume and frequency;
-#X connect 0 0 4 0;
-#X connect 1 0 5 0;
-#X connect 2 0 1 1;
-#X connect 3 0 2 0;
-#X connect 4 0 11 0;
-#X connect 5 0 13 0;
-#X connect 6 0 1 0;
-#X connect 7 0 8 1;
-#X connect 8 0 5 1;
-#X connect 10 0 28 0;
-#X connect 11 0 8 0;
-#X connect 12 0 14 0;
-#X connect 13 0 15 0;
-#X connect 14 0 10 0;
-#X connect 14 0 25 0;
-#X connect 14 0 25 1;
-#X connect 15 0 12 0;
-#X connect 16 0 0 0;
-#X connect 17 0 16 0;
+#X restore 34 1026 graph;
+#X text 475 477 if greater than threshold output 1;
+#X text 513 521 differentiator;
+#X text 512 539 (generates impulse on positive trigger (0->1);
+#X text 107 620 signal-rate counter;
+#X text 497 618 rpole~ coeff to 0;
+#X text 410 1004 pre-generated envelope;
+#X obj 112 692 *~;
+#X obj 399 476 hv_gte~;
+#X obj 399 592 hv_lte~;
+#X text 116 891 kickdrum 101 :);
+#X obj 399 392 receive~ excitationSignal;
+#X obj 438 456 receive~ threshold;
+#X obj 112 672 receive~ envDuration;
+#X obj 38 311 send~ excitationSignal;
+#X obj 198 311 send~ threshold;
+#X obj 318 311 send~ envDuration;
+#X obj 33 967 dac~;
+#X text 29 57 Sample-accurate signal processing can often be hard to
+;
+#X text 29 71 do in puredata \, which generally works on a per-block
+;
+#X text 29 85 basis. In this example we use a combination of;
+#X text 95 102 and;
+#X obj 125 102 rpole~;
+#X obj 48 875 *~ 1000;
+#X obj 112 714 *~ 0.25;
+#X obj 444 507 sig~ 1;
+#X obj 399 528 rzero~ 1;
+#X text 187 102 objects to perform;
+#X text 29 120 sample-accurate envelope triggering based on the;
+#X text 29 134 signal fed into the first audio channel.;
+#X obj 38 210 adc~ 1;
+#X obj 198 240 adc~ 3;
+#X obj 318 280 adc~ 4;
+#X text 252 240 use a potentiometer on first analog in to set;
+#X text 252 253 triggering threshold...;
+#X text 382 280 ...second analog in sets envelope duration;
+#X obj 32 102 rzero~;
+#X text 605 12 ............................;
+#X text 605 22 . ____ ._____ _ .......___ .;
+#X text 605 32 .| __ )| ____| |....../ _ |.;
+#X text 605 52 .| |_) | |___| |___ / ___ |.;
+#X text 605 62 .|____/|_____|_____/_/..._|.io;
+#X text 605 72 ............................;
+#X text 605 42 .| __ || __|.| |...../ _| |.;
+#X text 475 424 take absolute value of signal;
+#X text 497 630 (coefficient of 1 causes rpole~ to;
+#X text 497 643 accumulate input samples);
+#X text 108 542 setting input to (1/sampleRate) means;
+#X text 108 555 rpole~ counts seconds when its coefficient;
+#X text 108 569 is set to 1 (resets when 0);
+#X text 147 822 use envelope value for volume and frequency;
+#X text 479 594 -> boolean (x != x);
+#X text 92 210 Left audio input for excitation (a piezo disk works
+well);
+#X text 111 767 multiplies counter output allowing to alter;
+#X text 111 781 playback speed of envelope;
+#X text 497 607 resets counter by briefly setting;
+#X connect 2 0 5 0;
+#X connect 3 0 2 1;
+#X connect 4 0 3 0;
+#X connect 5 0 11 0;
+#X connect 6 0 2 0;
+#X connect 7 0 30 1;
+#X connect 8 0 38 0;
+#X connect 8 0 38 1;
+#X connect 9 0 30 0;
+#X connect 10 0 12 0;
+#X connect 11 0 13 0;
+#X connect 12 0 8 0;
+#X connect 12 0 19 0;
+#X connect 12 0 19 1;
+#X connect 13 0 10 0;
+#X connect 14 0 29 0;
+#X connect 15 0 16 0;
+#X connect 16 0 13 1;
+#X connect 17 0 8 1;
 #X connect 18 0 17 0;
-#X connect 19 0 20 0;
-#X connect 20 0 15 1;
-#X connect 21 0 0 1;
-#X connect 22 0 39 0;
-#X connect 22 0 39 1;
-#X connect 23 0 10 1;
-#X connect 24 0 23 0;
-#X connect 25 0 26 0;
-#X connect 26 0 24 0;
-#X connect 27 0 20 1;
-#X connect 39 0 27 0;
-#X restore 28 174 pd env;
-#X obj 79 110 adc~ 9;
-#X obj 129 130 adc~ 10;
-#X text 72 90 piezo input for excitation;
-#X text 123 110 fader 1 sets threshold;
-#X text 183 130 fader 2 sets duration;
-#X text 29 17 SAMPLE-ACCURATE ENVELOPE TRIGGER;
-#X text 29 27 ================================;
-#X obj 28 90 adc~ 8;
-#X text 141 236 ---------------------------------;
-#X text 141 226 @krighxz / BELA / heavy / 12/2015;
-#X text 165 245 beaglert.cc / enzienaudio.com;
-#X connect 1 0 0 0;
-#X connect 1 0 0 1;
-#X connect 2 0 1 1;
-#X connect 3 0 1 2;
-#X connect 9 0 1 0;
+#X connect 19 0 44 0;
+#X connect 20 0 16 1;
+#X connect 28 0 45 0;
+#X connect 29 0 47 0;
+#X connect 30 0 5 1;
+#X connect 32 0 14 0;
+#X connect 33 0 29 1;
+#X connect 34 0 28 0;
+#X connect 34 0 28 1;
+#X connect 44 0 18 0;
+#X connect 45 0 20 0;
+#X connect 46 0 47 1;
+#X connect 47 0 9 0;
+#X connect 51 0 35 0;
+#X connect 52 0 36 0;
+#X connect 53 0 37 0;