aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/beattracker.pd123
-rw-r--r--examples/normalizer.pd94
-rw-r--r--examples/resonate-beat.pd239
3 files changed, 456 insertions, 0 deletions
diff --git a/examples/beattracker.pd b/examples/beattracker.pd
new file mode 100644
index 0000000..44c4749
--- /dev/null
+++ b/examples/beattracker.pd
@@ -0,0 +1,123 @@
+#N canvas 145 39 541 656 12;
+#X obj 28 22 adc~;
+#X obj 20 330 vmin;
+#X floatatom 69 348 5 0 0;
+#X obj 10 127 bang;
+#X obj 58 473 /;
+#X floatatom 59 526 5 0 0;
+#X floatatom 1 361 5 0 0;
+#N canvas 0 0 450 300 graph2 0;
+#X array arrayP 140 float 1;
+#A 0 12.745 12.6021 12.4917 12.4624 12.4428 12.4083 12.357 12.3169
+12.2838 12.3642 12.4992 12.6125 12.8334 13.1195 13.2091 13.3636 13.427
+13.3262 13.1274 13.0323 12.8959 12.4778 12.1279 11.7467 11.1084 10.6082
+10.4762 10.5106 10.7249 11.0192 11.4685 11.8969 12.1991 12.4113 12.6745
+12.9505 13.0786 13.2169 13.2771 13.2021 12.9841 12.5133 12.0669 11.549
+11.0624 10.5936 10.3689 10.1306 10.1064 10.2099 10.1462 10.0187 10.1388
+10.2314 10.366 10.447 10.7786 11.1631 11.4977 11.6852 11.9644 12.0264
+11.8789 11.6583 11.5462 11.2125 10.9489 10.555 10.1705 9.70149 9.28413
+9.1935 9.21485 9.45742 9.79504 10.2243 10.7402 11.2532 11.698 12.1547
+12.5026 12.7131 12.8981 12.8903 12.784 12.7157 12.6072 12.4176 12.101
+11.7283 11.4631 11.1951 10.8678 10.6743 10.553 10.5304 10.5276 10.6795
+10.932 11.0555 11.1699 11.4492 11.7819 12.0798 12.2656 12.2123 12.1171
+11.9876 11.7143 11.5564 11.2613 10.9105 10.6654 10.5599 10.4874 10.6588
+10.8811 11.2697 11.5855 12.0241 12.4281 12.8351 13.1598 13.4953 13.6783
+13.6874 13.5532 13.2183 12.8892 12.5378 12.0966 11.7289 11.3947 11.0228
+10.7229 10.5954 10.4147 10.2329 10.1179 10.0109;
+#X coords 0 100 139 0 200 140 1;
+#X restore 324 155 graph;
+#X obj 292 486 tabset arrayP;
+#X obj 291 454 spigot;
+#X msg 347 454 0;
+#X msg 330 427 1;
+#X obj 292 380 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+1;
+#X obj 109 208 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 194 189 loadbang;
+#X obj 133 281 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 107 252 vpow 2;
+#X obj 129 321 vpow 2;
+#X obj 69 315 vv+;
+#X msg 85 102 0;
+#X obj 26 56 ear~ 256;
+#X obj 107 228 linspace 1 0.1 140;
+#X obj 130 299 linspace 0.1 1 140;
+#X obj 20 171 deltas 60 200 200;
+#X obj 56 421 + 60;
+#X obj 20 196 vabs;
+#X obj 121 49 env~ 256;
+#X floatatom 206 55 5 0 0;
+#X obj 57 375 moses 2;
+#X obj 55 400 moses 138;
+#X obj 324 297 hsl 200 15 0 140 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 10376 1;
+#X text 11 75 samplerate = 44100/256 = 172.26 Hz = 0.348 BPM resolution
+;
+#X obj 57 500 * 172.26;
+#X obj 291 398 metro 200;
+#X obj 19 245 vlavg 100;
+#X text 102 122 172.26Hz/60 = 172 BPM;
+#X text 103 138 172.26Hz/200 = 51.6 BPM;
+#X obj 39 95 vsum;
+#X obj 20 300 vv+;
+#X obj 55 138 * 0.1;
+#X obj 59 572 ftom;
+#X floatatom 169 574 5 0 0;
+#X obj 96 573 vfmod 12;
+#X text 109 524 BPM;
+#X msg 56 451 60;
+#X text 3 -31 beattracker based on average mean difference funtion
+(amdf);
+#X obj 1 395 vmax;
+#X obj 1 431 -;
+#X obj 1 470 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 493 1;
+#X text 441 593 j#|@2002;
+#X connect 0 0 20 0;
+#X connect 0 0 26 0;
+#X connect 1 0 6 0;
+#X connect 1 0 47 1;
+#X connect 1 1 2 0;
+#X connect 1 1 28 0;
+#X connect 2 0 30 0;
+#X connect 3 0 23 0;
+#X connect 4 0 32 0;
+#X connect 5 0 40 0;
+#X connect 9 0 10 0;
+#X connect 9 0 8 0;
+#X connect 10 0 9 1;
+#X connect 11 0 9 1;
+#X connect 12 0 33 0;
+#X connect 13 0 21 0;
+#X connect 14 0 22 0;
+#X connect 14 0 21 0;
+#X connect 15 0 22 0;
+#X connect 16 0 18 0;
+#X connect 17 0 18 1;
+#X connect 20 0 37 0;
+#X connect 21 0 16 0;
+#X connect 22 0 17 0;
+#X connect 23 0 25 0;
+#X connect 24 0 4 1;
+#X connect 24 0 44 0;
+#X connect 25 0 34 0;
+#X connect 26 0 27 0;
+#X connect 28 1 29 0;
+#X connect 29 0 24 0;
+#X connect 32 0 5 0;
+#X connect 33 0 11 0;
+#X connect 34 0 38 0;
+#X connect 37 0 3 0;
+#X connect 37 0 19 0;
+#X connect 37 0 39 0;
+#X connect 38 0 1 0;
+#X connect 38 0 9 0;
+#X connect 38 0 46 0;
+#X connect 39 0 23 0;
+#X connect 40 0 42 0;
+#X connect 42 0 41 0;
+#X connect 44 0 4 0;
+#X connect 46 0 47 0;
+#X connect 47 0 48 0;
diff --git a/examples/normalizer.pd b/examples/normalizer.pd
new file mode 100644
index 0000000..71cd102
--- /dev/null
+++ b/examples/normalizer.pd
@@ -0,0 +1,94 @@
+#N canvas 161 407 512 338 12;
+#X obj 410 270 SMLib;
+#X obj -14 54 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X obj -14 94 random 10;
+#X obj -14 72 metro 10;
+#X obj 13 272 hsl 128 15 -3 3 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 7495 1;
+#X floatatom 34 224 5 0 0;
+#X obj 60 143 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X obj 126 143 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 34 202 lstd 50;
+#X obj -14 117 + 7;
+#X floatatom 21 250 5 0 0;
+#X text 45 121 adapt;
+#X text 119 123 store;
+#N canvas 0 0 456 343 normalizer 0;
+#X obj 83 171 -;
+#X obj 37 2 inlet;
+#X obj 101 81 spigot;
+#X obj 131 0 inlet;
+#X msg 256 108 set \$1;
+#X obj 167 108 spigot;
+#X msg 220 108 0;
+#X msg 255 132 11.0646;
+#X msg 222 39 1;
+#X text 253 39 set;
+#X msg 294 42 bang;
+#X text 335 42 recall;
+#X obj 294 18 loadbang;
+#X obj 139 190 spigot;
+#X msg 294 217 set \$1;
+#X obj 205 217 spigot;
+#X msg 258 217 0;
+#X msg 293 241 3.10129;
+#X obj 90 292 outlet;
+#X text 178 0 learn;
+#X obj 231 -1 inlet;
+#X obj 102 107 lavg 500;
+#X obj 140 216 lstd 500;
+#X obj 92 261 *;
+#X obj 135 241 pow -1;
+#X connect 0 0 13 0;
+#X connect 0 0 23 0;
+#X connect 1 0 0 0;
+#X connect 1 0 2 0;
+#X connect 2 0 21 0;
+#X connect 3 0 2 1;
+#X connect 3 0 13 1;
+#X connect 4 0 7 0;
+#X connect 5 0 4 0;
+#X connect 5 0 6 0;
+#X connect 6 0 5 1;
+#X connect 7 0 0 1;
+#X connect 8 0 5 1;
+#X connect 8 0 15 1;
+#X connect 10 0 7 0;
+#X connect 10 0 17 0;
+#X connect 12 0 10 0;
+#X connect 13 0 22 0;
+#X connect 14 0 17 0;
+#X connect 15 0 14 0;
+#X connect 15 0 16 0;
+#X connect 16 0 15 1;
+#X connect 20 0 8 0;
+#X connect 21 0 0 1;
+#X connect 21 0 5 0;
+#X connect 22 0 15 0;
+#X connect 22 0 24 0;
+#X connect 23 0 18 0;
+#X connect 24 0 23 1;
+#X restore 14 173 pd normalizer;
+#X text -17 -8 normalizer : rescales a float stream so that its average
+approximates zero \, and its standard deviation approximates unity.
+;
+#X text 153 143 using store changes the patch;
+#X text 153 160 not usefull for use in an abstraction;
+#X text 389 290 j#|@2002;
+#X floatatom 96 223 5 0 0;
+#X obj 96 201 lavg 50;
+#X connect 1 0 3 0;
+#X connect 2 0 9 0;
+#X connect 3 0 2 0;
+#X connect 6 0 13 1;
+#X connect 7 0 13 2;
+#X connect 8 0 5 0;
+#X connect 9 0 13 0;
+#X connect 13 0 4 0;
+#X connect 13 0 8 0;
+#X connect 13 0 10 0;
+#X connect 13 0 19 0;
+#X connect 19 0 18 0;
diff --git a/examples/resonate-beat.pd b/examples/resonate-beat.pd
new file mode 100644
index 0000000..00b2043
--- /dev/null
+++ b/examples/resonate-beat.pd
@@ -0,0 +1,239 @@
+#N canvas 35 57 1126 761 12;
+#X floatatom 35 282 5 0 0;
+#X obj 35 259 float;
+#X obj 35 195 loadbang;
+#X obj 35 219 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X floatatom 161 312 0 0 0;
+#X msg 129 289 clear;
+#X text 179 288 <-- reinitialize internal state;
+#X text 193 313 <-- center frequency;
+#X floatatom 210 334 0 0 0;
+#X text 242 335 <-- Q;
+#X obj 111 412 hsl 128 15 -256 256 0 0 empty empty empty -2 -6 0 8
+-262144 -1 -1 6350 1;
+#X floatatom 108 430 5 0 0;
+#X obj 35 7 key;
+#X obj 35 30 select 32;
+#X msg 80 260 0;
+#X obj 40 527 line~;
+#X obj 40 549 osc~;
+#X obj 40 571 hip~ 30;
+#X msg 40 505 200 \, 0 100;
+#X obj 40 597 *~;
+#X obj 163 508 lrange 30;
+#X floatatom 164 533 5 0 0;
+#X obj 41 453 threshold 1 1 -1 1;
+#X floatatom 478 314 0 0 0;
+#X msg 446 291 clear;
+#X floatatom 527 336 0 0 0;
+#X obj 428 414 hsl 128 15 -256 256 0 0 empty empty empty -2 -6 0 8
+-262144 -1 -1 6350 1;
+#X floatatom 425 432 5 0 0;
+#X obj 357 529 line~;
+#X obj 357 551 osc~;
+#X obj 357 573 hip~ 30;
+#X obj 350 600 *~;
+#X obj 480 503 lrange 30;
+#X floatatom 481 535 5 0 0;
+#X obj 358 455 threshold 1 1 -1 1;
+#X obj 354 383 bp 0.02 10;
+#X obj 35 236 metro 20;
+#X obj 164 553 * 0.01;
+#X obj 481 554 * 0.01;
+#X obj 37 381 bp 0.04 10;
+#X text 74 9 rock your spacebar!;
+#X floatatom 786 308 0 0 0;
+#X msg 754 285 clear;
+#X floatatom 835 330 0 0 0;
+#X obj 736 408 hsl 128 15 -256 256 0 0 empty empty empty -2 -6 0 8
+-262144 -1 -1 6350 1;
+#X floatatom 733 426 5 0 0;
+#X obj 706 523 line~;
+#X obj 706 545 osc~;
+#X obj 649 663 hip~ 30;
+#X obj 658 694 *~;
+#X obj 812 499 lrange 30;
+#X floatatom 813 531 5 0 0;
+#X obj 666 449 threshold 1 1 -1 1;
+#X msg 356 503 10000 \, 0 20;
+#X obj 648 587 *~;
+#X obj 583 561 clip~ -0.1 0.1;
+#X msg 702 499 0 \, 110 200;
+#X obj 582 539 osc~ 55;
+#X text 112 237 generate sampled stream;
+#X text 122 380 resonate;
+#X text 192 454 detect;
+#X text 46 486 bass drum synth;
+#X text 364 483 electro clap synth;
+#X obj 583 517 line~;
+#X obj 663 378 bp 0.01 10;
+#X obj 649 638 clip~ -0.2 0.1;
+#X obj 649 611 *~ 5;
+#X obj 1018 527 line~;
+#X obj 1018 549 osc~;
+#X obj 961 667 hip~ 30;
+#X obj 970 698 *~;
+#X obj 1103 503 lrange 30;
+#X floatatom 1104 535 5 0 0;
+#X obj 960 591 *~;
+#X obj 894 543 osc~ 55;
+#X obj 895 521 line~;
+#X obj 961 642 clip~ -0.2 0.1;
+#X obj 961 615 *~ 5;
+#X msg 1012 503 0 \, 175 200;
+#X obj 1103 554 * 0.02;
+#X obj 812 550 * 0.02;
+#X obj 362 110 delay;
+#X floatatom 339 43 5 0 0;
+#X obj 306 87 moses 50;
+#X obj 537 164 line~;
+#X obj 537 186 osc~;
+#X obj 536 230 *~ 0.2;
+#X obj 536 208 hip~ 300;
+#X text 528 120 electro tom synth;
+#X msg 536 141 2000 \, 0 10;
+#X obj 306 65 float;
+#X obj 423 67 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X msg 342 16 753;
+#X msg 386 16 520;
+#X obj 536 254 throw~ mix;
+#X obj 39 623 throw~ mix;
+#X obj 348 626 throw~ mix;
+#X obj 655 718 throw~ mix;
+#X obj 969 723 throw~ mix;
+#X text 750 377 resonate;
+#X text 510 452 detect;
+#X text 821 450 detect;
+#X obj 810 143 catch~ mix;
+#X obj 802 171 dac~;
+#X text 282 -8 or use this metronome;
+#X text 992 8 j#|@2002;
+#X text 395 44 pulse period in ms;
+#X text 444 66 start;
+#X obj 488 24 line 100;
+#X msg 489 1 2000 \, 200 240000;
+#X text 664 474 electro bass synths;
+#X text 948 476 electro bass synths;
+#X obj 895 565 clip~ -0.1 0.2;
+#X msg 896 497 87 \, 86 2000;
+#X msg 583 493 55 \, 54 2000;
+#X msg 35 164 1000;
+#X obj 165 577 moses 0.3;
+#X obj 482 579 moses 0.3;
+#X obj 1105 579 moses 0.4;
+#X obj 814 575 moses 0.4;
+#X text 443 385 resonate;
+#X msg 421 87 0;
+#X text 453 88 stop;
+#X connect 1 0 0 0;
+#X connect 1 0 14 0;
+#X connect 1 0 35 0;
+#X connect 1 0 39 0;
+#X connect 1 0 64 0;
+#X connect 2 0 3 0;
+#X connect 3 0 36 0;
+#X connect 4 0 39 1;
+#X connect 5 0 39 0;
+#X connect 8 0 39 2;
+#X connect 10 0 11 0;
+#X connect 12 0 13 0;
+#X connect 13 0 115 0;
+#X connect 13 0 89 0;
+#X connect 14 0 1 1;
+#X connect 15 0 16 0;
+#X connect 16 0 17 0;
+#X connect 17 0 19 0;
+#X connect 18 0 15 0;
+#X connect 19 0 95 0;
+#X connect 20 0 21 0;
+#X connect 21 0 37 0;
+#X connect 22 0 18 0;
+#X connect 23 0 35 1;
+#X connect 24 0 35 0;
+#X connect 25 0 35 2;
+#X connect 26 0 27 0;
+#X connect 28 0 29 0;
+#X connect 29 0 30 0;
+#X connect 30 0 31 0;
+#X connect 31 0 96 0;
+#X connect 32 0 33 0;
+#X connect 33 0 38 0;
+#X connect 34 0 53 0;
+#X connect 35 0 26 0;
+#X connect 35 0 32 0;
+#X connect 35 0 34 0;
+#X connect 36 0 1 0;
+#X connect 37 0 116 0;
+#X connect 38 0 117 0;
+#X connect 39 0 10 0;
+#X connect 39 0 20 0;
+#X connect 39 0 22 0;
+#X connect 41 0 64 1;
+#X connect 42 0 64 0;
+#X connect 43 0 64 2;
+#X connect 44 0 45 0;
+#X connect 46 0 47 0;
+#X connect 47 0 54 1;
+#X connect 48 0 49 0;
+#X connect 49 0 97 0;
+#X connect 50 0 51 0;
+#X connect 51 0 80 0;
+#X connect 52 0 56 0;
+#X connect 52 0 114 0;
+#X connect 52 1 113 0;
+#X connect 52 1 78 0;
+#X connect 53 0 28 0;
+#X connect 54 0 66 0;
+#X connect 55 0 54 0;
+#X connect 56 0 46 0;
+#X connect 57 0 55 0;
+#X connect 63 0 57 0;
+#X connect 64 0 44 0;
+#X connect 64 0 50 0;
+#X connect 64 0 52 0;
+#X connect 64 0 71 0;
+#X connect 65 0 48 0;
+#X connect 66 0 65 0;
+#X connect 67 0 68 0;
+#X connect 68 0 73 1;
+#X connect 69 0 70 0;
+#X connect 70 0 98 0;
+#X connect 71 0 72 0;
+#X connect 72 0 79 0;
+#X connect 73 0 77 0;
+#X connect 74 0 112 0;
+#X connect 75 0 74 0;
+#X connect 76 0 69 0;
+#X connect 77 0 76 0;
+#X connect 78 0 67 0;
+#X connect 79 0 118 0;
+#X connect 80 0 119 0;
+#X connect 81 0 115 0;
+#X connect 81 0 89 0;
+#X connect 81 0 90 0;
+#X connect 82 0 90 1;
+#X connect 83 1 81 0;
+#X connect 84 0 85 0;
+#X connect 85 0 87 0;
+#X connect 86 0 94 0;
+#X connect 87 0 86 0;
+#X connect 89 0 84 0;
+#X connect 90 0 83 0;
+#X connect 91 0 90 0;
+#X connect 92 0 82 0;
+#X connect 93 0 82 0;
+#X connect 102 0 103 0;
+#X connect 102 0 103 1;
+#X connect 108 0 82 0;
+#X connect 109 0 108 0;
+#X connect 112 0 73 0;
+#X connect 113 0 75 0;
+#X connect 114 0 63 0;
+#X connect 115 0 1 1;
+#X connect 116 0 19 1;
+#X connect 117 0 31 1;
+#X connect 118 0 70 1;
+#X connect 119 0 49 1;
+#X connect 121 0 108 0;