aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/4.fft.examples/11.pianorev.pd
diff options
context:
space:
mode:
Diffstat (limited to 'pd/doc/4.fft.examples/11.pianorev.pd')
-rw-r--r--pd/doc/4.fft.examples/11.pianorev.pd378
1 files changed, 378 insertions, 0 deletions
diff --git a/pd/doc/4.fft.examples/11.pianorev.pd b/pd/doc/4.fft.examples/11.pianorev.pd
new file mode 100644
index 00000000..ad7f8e7f
--- /dev/null
+++ b/pd/doc/4.fft.examples/11.pianorev.pd
@@ -0,0 +1,378 @@
+#N canvas 48 26 570 543 12;
+#N canvas 52 71 774 520 previous-analysis 0;
+#X graph graph1 0 -1 2048 1 103 165 303 15;
+#X array last-real 2048 float;
+#X pop;
+#X graph graph2 0 -1 2048 1 497 156 697 6;
+#X array last-imag 2048 float;
+#X pop;
+#X graph graph1 0 -1 2048 1 105 335 305 185;
+#X array phase-real 2048 float;
+#X pop;
+#X graph graph2 0 -1 2048 1 501 328 701 178;
+#X array phase-imag 2048 float;
+#X pop;
+#X msg 106 541 \; last-real resize 2048 \; last-imag resize 2048 \; phase-real resize 2048 \; phase-imag resize 2048 \; inc-real resize 2048 \; inc-imag resize 2048;
+#X graph graph1 0 -1 2048 1 105 507 305 357;
+#X array inc-real 2048 float;
+#X pop;
+#X graph graph2 0 -1 2048 1 503 492 703 342;
+#X array inc-imag 2048 float;
+#X pop;
+#X restore 411 384 pd previous-analysis;
+#N canvas 29 2 866 679 fft 0;
+#X obj 14 640 *~;
+#X obj 422 576 *~;
+#X obj 396 576 *~;
+#X obj 480 576 *~;
+#X obj 455 576 *~;
+#X obj 455 598 +~;
+#X obj 395 601 -~;
+#X obj 138 480 *~;
+#X obj 531 332 -~;
+#X obj 505 528 +~;
+#X obj 531 528 *~;
+#X obj 458 330 -~;
+#X obj 431 526 +~;
+#X obj 458 526 *~;
+#X obj 159 336 -~;
+#X obj 133 373 +~;
+#X obj 159 373 *~;
+#X obj 201 138 *~;
+#X obj 172 138 *~;
+#X obj 172 159 +~;
+#X obj 351 288 *~;
+#X obj 325 288 *~;
+#X obj 404 115 *~;
+#X obj 379 115 *~;
+#X obj 336 116 *~;
+#X obj 311 116 *~;
+#X obj 181 408 *~;
+#X obj 154 409 *~;
+#X obj 198 37 *~;
+#X obj 14 662 outlet~;
+#X obj 14 615 *~;
+#X obj 18 16 tabreceive~ hanning-window;
+#X obj 537 561 block~ 2048 4;
+#X obj 214 12 inlet~;
+#X obj 198 58 rfft~;
+#X obj 30 591 rifft~;
+#X obj 30 99 tabsend~ last-real;
+#X obj 30 130 tabsend~ last-imag;
+#X obj 154 431 rsqrt~;
+#X obj 311 138 +~;
+#X obj 379 137 -~;
+#X obj 35 255 tabreceive~ inc-real;
+#X obj 69 278 tabreceive~ inc-imag;
+#X obj 430 202 tabreceive~ phase-real;
+#X obj 502 225 tabreceive~ phase-imag;
+#X obj 325 309 +~;
+#X obj 75 335 -~;
+#X obj 354 40 tabreceive~ last-real;
+#X obj 414 62 tabreceive~ last-imag;
+#X obj 48 372 +~;
+#X obj 75 372 *~;
+#X obj 51 479 *~;
+#X obj 191 454 r gain;
+#X obj 46 560 tabsend~ inc-real;
+#X obj 64 519 tabsend~ inc-imag;
+#X obj 391 649 tabsend~ phase-real;
+#X obj 453 620 tabsend~ phase-imag;
+#X obj 52 618 sig~ 0.0002;
+#X obj 60 217 *~ 0;
+#X obj 154 453 *~ 0;
+#N canvas 167 161 699 396 decision 0;
+#X obj 63 32 inlet~;
+#X obj 64 272 outlet~;
+#X obj 64 114 -~;
+#X obj 64 157 clip~ 0 1;
+#X obj 64 135 *~ 1e+20;
+#X obj 135 31 inlet~;
+#X text 139 136 1 if new sig;
+#X text 138 147 stronger than;
+#X text 140 159 old one;
+#X obj 245 130 -~;
+#X obj 259 105 ../../extra/lrshift~ 1;
+#X obj 245 178 clip~ 0 1;
+#X obj 245 156 *~ 1e+20;
+#X obj 421 130 -~;
+#X obj 421 178 clip~ 0 1;
+#X obj 421 156 *~ 1e+20;
+#X obj 435 105 ../../extra/lrshift~ -1;
+#X obj 64 214 *~;
+#X obj 64 243 *~;
+#X connect 0 0 2 0;
+#X connect 0 0 10 0;
+#X connect 0 0 9 0;
+#X connect 0 0 13 0;
+#X connect 0 0 16 0;
+#X connect 2 0 4 0;
+#X connect 3 0 17 0;
+#X connect 4 0 3 0;
+#X connect 5 0 2 1;
+#X connect 9 0 12 0;
+#X connect 10 0 9 1;
+#X connect 11 0 17 1;
+#X connect 12 0 11 0;
+#X connect 13 0 15 0;
+#X connect 14 0 18 1;
+#X connect 15 0 14 0;
+#X connect 16 0 13 1;
+#X connect 17 0 18 0;
+#X connect 18 0 1 0;
+#X restore 253 334 pd decision;
+#X obj 391 626 +~ 1e-15;
+#X obj 46 540 +~ 1e-15;
+#X connect 0 0 29 0;
+#X connect 1 0 6 1;
+#X connect 2 0 6 0;
+#X connect 3 0 5 1;
+#X connect 4 0 5 0;
+#X connect 5 0 56 0;
+#X connect 6 0 61 0;
+#X connect 7 0 54 0;
+#X connect 7 0 1 0;
+#X connect 7 0 3 0;
+#X connect 8 0 10 0;
+#X connect 9 0 35 1;
+#X connect 9 0 1 1;
+#X connect 9 0 4 1;
+#X connect 10 0 9 1;
+#X connect 11 0 13 0;
+#X connect 12 0 35 0;
+#X connect 12 0 2 1;
+#X connect 12 0 3 1;
+#X connect 13 0 12 1;
+#X connect 14 0 16 0;
+#X connect 15 0 26 0;
+#X connect 15 0 26 1;
+#X connect 15 0 7 0;
+#X connect 16 0 15 1;
+#X connect 17 0 19 1;
+#X connect 18 0 19 0;
+#X connect 19 0 60 0;
+#X connect 20 0 45 1;
+#X connect 21 0 45 0;
+#X connect 22 0 40 1;
+#X connect 23 0 40 0;
+#X connect 24 0 39 1;
+#X connect 25 0 39 0;
+#X connect 26 0 38 0;
+#X connect 27 0 38 0;
+#X connect 28 0 34 0;
+#X connect 30 0 0 0;
+#X connect 31 0 28 0;
+#X connect 31 0 30 0;
+#X connect 33 0 28 1;
+#X connect 34 0 25 0;
+#X connect 34 0 22 0;
+#X connect 34 0 18 0;
+#X connect 34 0 18 1;
+#X connect 34 0 11 0;
+#X connect 34 0 36 0;
+#X connect 34 1 24 0;
+#X connect 34 1 23 0;
+#X connect 34 1 17 0;
+#X connect 34 1 17 1;
+#X connect 34 1 8 0;
+#X connect 34 1 37 0;
+#X connect 35 0 30 1;
+#X connect 38 0 59 0;
+#X connect 39 0 46 0;
+#X connect 39 0 58 0;
+#X connect 40 0 14 0;
+#X connect 41 0 49 0;
+#X connect 41 0 46 1;
+#X connect 42 0 15 0;
+#X connect 42 0 14 1;
+#X connect 43 0 21 0;
+#X connect 43 0 21 1;
+#X connect 43 0 12 0;
+#X connect 43 0 11 1;
+#X connect 44 0 20 0;
+#X connect 44 0 20 1;
+#X connect 44 0 9 0;
+#X connect 44 0 8 1;
+#X connect 45 0 60 1;
+#X connect 46 0 50 0;
+#X connect 47 0 25 1;
+#X connect 47 0 23 1;
+#X connect 48 0 24 1;
+#X connect 48 0 22 1;
+#X connect 49 0 27 0;
+#X connect 49 0 27 1;
+#X connect 49 0 51 0;
+#X connect 50 0 49 1;
+#X connect 51 0 2 0;
+#X connect 51 0 4 0;
+#X connect 51 0 62 0;
+#X connect 52 0 59 1;
+#X connect 57 0 0 1;
+#X connect 58 0 37 0;
+#X connect 58 0 36 0;
+#X connect 59 0 51 1;
+#X connect 59 0 7 1;
+#X connect 60 0 50 1;
+#X connect 60 0 16 1;
+#X connect 60 0 13 1;
+#X connect 60 0 10 1;
+#X connect 61 0 55 0;
+#X connect 62 0 53 0;
+#X restore 203 438 pd fft;
+#X floatatom 47 260;
+#X obj 202 518 dac~;
+#N canvas 58 75 719 400 hanning-window 0;
+#X obj 99 231 phasor~;
+#X obj 99 267 cos~;
+#X obj 45 284 -~;
+#X obj 43 250 sig~ 1;
+#X msg 53 212 0;
+#X graph graph1 0 -1 2047 1 393 274 593 124;
+#X array hanning-window 2048 float;
+#X pop;
+#X obj 101 117 r sample-rate;
+#X obj 216 119 r window-size;
+#X obj 124 145 t b f;
+#X obj 101 167 /;
+#X obj 99 204 sig~;
+#X obj 39 71 r make-window;
+#X msg 38 145 bang;
+#X obj 31 349 tabwrite~ hanning-window;
+#X floatatom 184 204;
+#X obj 47 311 *~ 0.5;
+#X msg 371 303 \; hanning-window resize 2048;
+#X connect 0 0 1 0;
+#X connect 1 0 2 1;
+#X connect 2 0 15 0;
+#X connect 3 0 2 0;
+#X connect 4 0 0 1;
+#X connect 6 0 9 0;
+#X connect 7 0 8 0;
+#X connect 8 0 9 0;
+#X connect 8 1 9 1;
+#X connect 9 0 10 0;
+#X connect 10 0 0 0;
+#X connect 11 0 12 0;
+#X connect 12 0 4 0;
+#X connect 12 0 13 0;
+#X connect 15 0 13 0;
+#X restore 411 355 pd hanning-window;
+#X obj 410 419 loadbang;
+#X obj 202 487 *~;
+#X obj 262 464 line~;
+#X obj 47 464 s gain;
+#X msg 47 336 0;
+#X msg 410 445 \; sample-rate 44100 \; window-size 2048 \; make-window bang \; gain 0 \;;
+#X obj 92 341 t b b f;
+#X obj 119 394 /;
+#X msg 89 394 1;
+#X obj 89 417 -;
+#X floatatom 47 442;
+#X obj 47 288 * 0.1;
+#X floatatom 480 78;
+#N canvas 194 37 397 591 output 0;
+#X obj 62 191 t b;
+#X obj 62 144 f;
+#X obj 62 96 inlet;
+#X text 67 76 mute;
+#X obj 62 215 f;
+#X msg 127 230 0;
+#X msg 62 120 bang;
+#X obj 62 167 moses 1;
+#X obj 127 207 t b f;
+#X obj 91 417 outlet;
+#X msg 91 393 set \$1;
+#X obj 175 154 moses 1;
+#X obj 212 419 dbtorms;
+#X obj 212 443 pack 0 100;
+#X obj 175 130 r master-lvl;
+#X obj 91 360 r master-lvl;
+#X obj 78 269 s master-lvl;
+#X obj 212 467 s master-amp;
+#X connect 0 0 4 0;
+#X connect 1 0 7 0;
+#X connect 2 0 6 0;
+#X connect 4 0 16 0;
+#X connect 5 0 16 0;
+#X connect 6 0 1 0;
+#X connect 7 0 0 0;
+#X connect 7 1 8 0;
+#X connect 8 0 5 0;
+#X connect 10 0 9 0;
+#X connect 11 1 4 1;
+#X connect 12 0 13 0;
+#X connect 13 0 17 0;
+#X connect 14 0 1 1;
+#X connect 14 0 11 0;
+#X connect 15 0 10 0;
+#X connect 15 0 12 0;
+#X restore 480 54 pd output;
+#X msg 480 30 mute;
+#X text 517 70 MASTER;
+#X text 516 84 LEVEL;
+#X obj 480 102 s master-lvl;
+#X obj 262 437 r master-amp;
+#X obj 203 339 osc~;
+#X obj 282 394 line~;
+#X msg 270 268 bang;
+#X floatatom 203 316;
+#X obj 203 415 *~;
+#X obj 271 343 pack 1 0;
+#X obj 316 370 pack 0 0;
+#X obj 301 316 del;
+#X floatatom 338 283;
+#X obj 203 293 mtof;
+#X floatatom 203 269;
+#X obj 203 364 cos~;
+#X obj 202 461 hip~ 5;
+#X obj 203 388 hip~ 20;
+#X obj 48 313 moses 0.1;
+#X msg 114 366 0.005;
+#X text 131 9 PIANO REVERB;
+#X text 42 29 This is intended as an imitation of how the strings of a piano can act as a reverberator. The sound is more "pitched" and less "whispered" than a standard delay-based reverberator (or for that matter \, than a reverberant room.);
+#X text 41 88 Many pieces in the literature call for just this effect \, notably Boulez's Dialogue de l'ombre double.;
+#X text 40 118 This particular algorithm is actually TOO clean sounding and would have to be chorused to make a serviceable imitation. However \, it might be interesting in its own right.;
+#X text 39 173 The technique is to run a phase vocoder \, but only to "punch" the incoming sound into channels where (1) there's a peak \, and (2) the incoming sound drowns out whatever might already be there.;
+#X text 27 238 reverb time;
+#X text 179 248 test pitch;
+#X text 267 249 trigger;
+#X text 334 264 duration;
+#X connect 1 0 36 0;
+#X connect 2 0 16 0;
+#X connect 5 0 10 0;
+#X connect 6 0 3 0;
+#X connect 6 0 3 1;
+#X connect 7 0 6 1;
+#X connect 9 0 15 0;
+#X connect 11 0 13 0;
+#X connect 11 1 39 0;
+#X connect 11 2 12 1;
+#X connect 12 0 14 1;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 8 0;
+#X connect 16 0 38 0;
+#X connect 17 0 22 0;
+#X connect 18 0 17 0;
+#X connect 19 0 18 0;
+#X connect 23 0 7 0;
+#X connect 24 0 35 0;
+#X connect 25 0 28 1;
+#X connect 26 0 29 0;
+#X connect 26 0 31 0;
+#X connect 27 0 24 0;
+#X connect 28 0 1 0;
+#X connect 29 0 25 0;
+#X connect 30 0 25 0;
+#X connect 31 0 30 0;
+#X connect 32 0 31 1;
+#X connect 32 0 29 1;
+#X connect 32 0 30 1;
+#X connect 33 0 27 0;
+#X connect 34 0 33 0;
+#X connect 35 0 37 0;
+#X connect 36 0 6 0;
+#X connect 37 0 28 0;
+#X connect 38 0 9 0;
+#X connect 38 1 11 0;
+#X connect 39 0 12 0;