From 57045df5fe3ec557e57dc7434ac1a07b5521bffc Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Mon, 29 Jul 2002 17:06:19 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r58, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=59 --- pd/doc/4.fft.examples/10.phaselockedvoc.pd | 444 +++++++++++++++++++++++++++++ 1 file changed, 444 insertions(+) create mode 100644 pd/doc/4.fft.examples/10.phaselockedvoc.pd (limited to 'pd/doc/4.fft.examples/10.phaselockedvoc.pd') diff --git a/pd/doc/4.fft.examples/10.phaselockedvoc.pd b/pd/doc/4.fft.examples/10.phaselockedvoc.pd new file mode 100644 index 00000000..7eea2f57 --- /dev/null +++ b/pd/doc/4.fft.examples/10.phaselockedvoc.pd @@ -0,0 +1,444 @@ +#N canvas 117 53 719 544 12; +#X floatatom 279 354 0 0 0; +#X msg 563 169 bang; +#X floatatom 186 351 0 0 0; +#X floatatom 84 350 0 0 0; +#N canvas 5 5 986 679 fft-analysis 0; +#X obj 177 242 *~; +#X obj 146 242 *~; +#X obj 146 264 -~; +#X obj 242 243 *~; +#X obj 211 243 *~; +#X obj 211 265 +~; +#X obj 256 73 *~; +#X obj 225 73 *~; +#X obj 197 73 *~; +#X obj 166 73 *~; +#X obj 166 95 +~; +#X obj 136 124 *~; +#X obj 49 560 *~; +#X obj 365 179 rfft~; +#X obj 291 34 rfft~; +#X obj 490 598 *~; +#X obj 685 288 r window-size; +#X obj 751 201 r sample-rate; +#X obj 609 234 f; +#X obj 603 52 r sample-rate; +#X obj 578 29 r window-size; +#X obj 601 98 t b f; +#X obj 578 121 /; +#X obj 520 598 *~; +#X obj 50 540 *~; +#X obj 66 517 rifft~; +#X obj 50 586 outlet~; +#X obj 625 446 print~; +#X msg 624 418 bang; +#X text 115 517 inverse real FFT; +#X obj 589 210 bang~; +#X obj 516 424 line~; +#X obj 578 143 * 1000; +#X text 630 136 window size (msec); +#X obj 603 76 * 4; +#X obj 632 159 r speed; +#X obj 709 160 r location; +#X obj 640 235 +; +#X obj 633 200 *; +#X msg 710 188 0; +#X obj 609 341 +; +#X obj 600 298 t f f; +#X msg 516 396 \$1 \, \$2 \$3; +#X obj 516 369 pack 0 0 0; +#X obj 752 229 / 1000; +#X obj 609 269 *; +#X text 639 270 reading location (samples); +#X obj 637 381 / 4; +#X text 669 386 hop size (samples); +#X obj 564 464 sig~; +#X obj 534 463 +~; +#X text 638 82 (overlap times parent SR); +#X text 638 69 local sample rate; +#X obj 103 10 tabreceive~ phase-real; +#X obj 106 124 *~; +#X obj 106 146 +~; +#X obj 106 170 rsqrt~; +#X obj 225 95 -~; +#X obj 147 200 *~; +#X obj 207 200 *~; +#X obj 266 9 tabreceive~ phase-imag; +#X obj 31 481 sig~; +#X obj 14 411 t b f; +#X msg 14 432 1; +#X obj 28 455 /; +#X obj 187 496 tabsend~ phase-real; +#X obj 288 474 tabsend~ phase-imag; +#X obj 50 71 sig~ 1.5e-20; +#X obj 632 180 * 0.01; +#X obj 691 212 s speed; +#X obj 474 263 s see-location; +#X obj 598 618 block~ 2048 4; +#X floatatom 672 360 0 0 0; +#X obj 670 339 *; +#X obj 829 234 r transpo; +#X obj 829 256 * 0.01; +#X obj 831 277 + 69; +#X obj 832 298 mtof; +#X obj 832 320 / 440; +#X obj 689 316 t b f; +#X obj 14 390 r window-size; +#X floatatom 835 353 0 0 0; +#X obj 551 543 tabreceive~ hanning; +#X obj 534 489 tabread4~ sample; +#X obj 516 515 tabread4~ sample; +#X obj 145 422 -~; +#X obj 249 385 r lock; +#X obj 162 291 ../../extra/lrshift~ 1; +#X obj 154 315 ../../extra/lrshift~ -1; +#X obj 227 339 ../../extra/lrshift~ 1; +#X obj 219 363 ../../extra/lrshift~ -1; +#X obj 210 432 -~; +#X obj 161 397 *~ 0; +#X obj 226 408 *~ 0; +#X connect 0 0 2 1; +#X connect 1 0 2 0; +#X connect 2 0 87 0; +#X connect 2 0 88 0; +#X connect 2 0 85 0; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 89 0; +#X connect 5 0 90 0; +#X connect 5 0 91 0; +#X connect 6 0 57 1; +#X connect 7 0 57 0; +#X connect 8 0 10 1; +#X connect 9 0 10 0; +#X connect 10 0 58 1; +#X connect 10 0 54 0; +#X connect 10 0 54 1; +#X connect 11 0 55 1; +#X connect 12 0 26 0; +#X connect 13 0 1 1; +#X connect 13 0 3 1; +#X connect 13 1 0 1; +#X connect 13 1 4 1; +#X connect 14 0 9 1; +#X connect 14 0 7 1; +#X connect 14 1 6 1; +#X connect 14 1 8 1; +#X connect 15 0 14 0; +#X connect 16 0 73 0; +#X connect 17 0 44 0; +#X connect 18 0 37 0; +#X connect 18 0 45 0; +#X connect 18 0 70 0; +#X connect 19 0 34 0; +#X connect 20 0 22 0; +#X connect 21 0 22 0; +#X connect 21 1 22 1; +#X connect 22 0 32 0; +#X connect 23 0 13 0; +#X connect 24 0 12 0; +#X connect 25 0 24 1; +#X connect 28 0 27 0; +#X connect 30 0 18 0; +#X connect 31 0 27 0; +#X connect 31 0 50 0; +#X connect 31 0 84 0; +#X connect 32 0 43 2; +#X connect 32 0 38 1; +#X connect 34 0 21 0; +#X connect 35 0 68 0; +#X connect 36 0 39 0; +#X connect 36 0 18 1; +#X connect 37 0 18 1; +#X connect 38 0 37 1; +#X connect 39 0 69 0; +#X connect 40 0 43 1; +#X connect 41 0 43 0; +#X connect 41 1 40 0; +#X connect 42 0 31 0; +#X connect 43 0 42 0; +#X connect 44 0 45 1; +#X connect 45 0 41 0; +#X connect 47 0 49 0; +#X connect 49 0 50 1; +#X connect 50 0 83 0; +#X connect 53 0 9 0; +#X connect 53 0 6 0; +#X connect 54 0 55 0; +#X connect 55 0 56 0; +#X connect 56 0 58 0; +#X connect 56 0 59 0; +#X connect 57 0 59 1; +#X connect 57 0 11 0; +#X connect 57 0 11 1; +#X connect 58 0 1 0; +#X connect 58 0 4 0; +#X connect 59 0 0 0; +#X connect 59 0 3 0; +#X connect 60 0 7 0; +#X connect 60 0 8 0; +#X connect 61 0 24 0; +#X connect 62 0 63 0; +#X connect 62 1 64 1; +#X connect 63 0 64 0; +#X connect 64 0 61 0; +#X connect 67 0 10 0; +#X connect 68 0 38 0; +#X connect 72 0 47 0; +#X connect 72 0 40 1; +#X connect 73 0 72 0; +#X connect 74 0 75 0; +#X connect 75 0 76 0; +#X connect 76 0 77 0; +#X connect 77 0 78 0; +#X connect 78 0 79 0; +#X connect 78 0 81 0; +#X connect 79 0 73 0; +#X connect 79 1 73 1; +#X connect 80 0 62 0; +#X connect 82 0 23 1; +#X connect 82 0 15 1; +#X connect 82 0 12 1; +#X connect 83 0 23 0; +#X connect 84 0 15 0; +#X connect 85 0 65 0; +#X connect 85 0 25 0; +#X connect 86 0 93 1; +#X connect 86 0 92 1; +#X connect 87 0 92 0; +#X connect 88 0 92 0; +#X connect 89 0 93 0; +#X connect 90 0 93 0; +#X connect 91 0 66 0; +#X connect 91 0 25 1; +#X connect 92 0 85 1; +#X connect 93 0 91 1; +#X restore 37 422 pd fft-analysis; +#X obj 37 508 dac~; +#N canvas 260 23 647 768 phase-tables 0; +#N canvas 0 0 450 300 graph2 0; +#X array phase-imag 4096 float 0; +#X coords 0 1 4096 -1 400 300 1; +#X restore 172 290 graph; +#N canvas 0 0 450 300 graph3 0; +#X array phase-real 4096 float 0; +#X coords 0 1 4096 -1 400 300 1; +#X restore 170 17 graph; +#X msg 167 564 \; phase-real resize 4096 \; phase-imag resize 4096 +; +#X restore 419 489 pd phase-tables; +#X obj 37 448 hip~ 5; +#X obj 37 478 *~; +#N canvas 249 280 600 398 loc&precess 0; +#X floatatom 160 229 0 0 0; +#X msg 270 175 set \$1; +#X obj 269 207 outlet; +#X obj 83 267 outlet; +#X obj 171 71 r location; +#X msg 82 235 set \$1; +#X obj 269 149 r speed; +#X obj 55 70 r see-location; +#X obj 67 102 t b f; +#X obj 82 214 f; +#X obj 54 127 int; +#X obj 54 151 sel 0; +#X msg 153 102 1; +#X msg 201 101 0; +#X obj 110 179 del 300; +#X connect 1 0 2 0; +#X connect 4 0 8 0; +#X connect 5 0 3 0; +#X connect 6 0 1 0; +#X connect 7 0 8 0; +#X connect 8 0 10 0; +#X connect 8 1 9 1; +#X connect 9 0 5 0; +#X connect 10 0 11 0; +#X connect 11 0 12 0; +#X connect 11 0 14 0; +#X connect 12 0 10 1; +#X connect 13 0 10 1; +#X connect 14 0 13 0; +#X connect 14 0 9 0; +#X restore 84 322 pd loc&precess; +#N canvas 0 0 600 400 setlocprecess 0; +#X obj 173 82 inlet; +#X obj 73 80 inlet; +#X obj 169 105 s speed; +#X obj 74 105 s location; +#X connect 0 0 2 0; +#X connect 1 0 3 0; +#X restore 84 373 pd setlocprecess; +#X msg 41 333 0; +#X obj 606 182 adc~; +#X obj 279 379 s transpo; +#X obj 277 305 r transpo; +#X msg 277 331 set \$1; +#X msg 404 287 \; location 0 \; speed 200; +#N canvas 138 111 767 761 hanning-window 0; +#X obj 92 206 phasor~; +#X obj 92 234 cos~; +#X obj 23 328 tabwrite~ hanning; +#X obj 30 252 -~; +#X obj 28 218 sig~ 1; +#X msg 37 180 0; +#X text 141 13 CALCULATE HANNING; +#X text 141 27 WINDOW TABLE; +#N canvas 0 0 450 300 graph1 0; +#X array hanning 4096 float 0; +#X coords 0 1 4096 -1 400 300 1; +#X restore 275 281 graph; +#X obj 93 171 sig~; +#X text 175 148 sample rate / window size; +#X msg 23 144 bang; +#X obj 66 269 sig~ 0.5; +#X obj 49 300 *~; +#X obj 94 80 samplerate~; +#X obj 25 23 r window-size; +#X obj 25 53 t b f; +#X msg 275 547 \; hanning resize 4096; +#X obj 93 132 /; +#X connect 0 0 1 0; +#X connect 1 0 3 1; +#X connect 3 0 13 0; +#X connect 4 0 3 0; +#X connect 5 0 0 1; +#X connect 9 0 0 0; +#X connect 11 0 2 0; +#X connect 11 0 5 0; +#X connect 12 0 13 1; +#X connect 13 0 2 0; +#X connect 14 0 18 0; +#X connect 15 0 16 0; +#X connect 16 0 14 0; +#X connect 16 0 11 0; +#X connect 16 1 18 1; +#X connect 18 0 9 0; +#X restore 417 512 pd hanning-window; +#X msg 25 192 \; window-size 2048 \; transpo 0 \; pd dsp 1; +#X floatatom 587 68 0 0 0; +#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 587 44 pd output; +#X msg 587 20 mute; +#X text 624 60 MASTER; +#X text 623 74 LEVEL; +#X obj 587 92 s master-lvl; +#X text 35 173 click here first; +#X obj 81 506 line~; +#X obj 81 482 r master-amp; +#X text 49 271 set location; +#X text 48 285 and stop; +#X text 48 299 precession; +#X text 166 270 precession; +#X text 165 286 speed in; +#X text 165 300 hundredths; +#X text 275 264 transposition; +#X text 276 282 in cents; +#X text 512 242 examples; +#X text 407 266 contraction; +#X text 623 265 expansion; +#X msg 612 288 \; location 0 \; speed 10; +#X obj 419 360 loadbang; +#X obj 423 383 samplerate~; +#X obj 419 405 s sample-rate; +#N canvas 132 255 846 368 insample 0; +#N canvas 0 0 450 300 graph1 0; +#X array sample 92615 float 0; +#X coords 0 1 92614 -1 400 150 1; +#X restore 406 155 graph; +#X obj 12 19 r read-sample; +#X obj 12 132 unpack s f; +#X obj 46 158 s insamprate; +#X obj 12 208 soundfiler; +#X msg 12 184 read -resize \$1 sample; +#X obj 12 238 s insamplength; +#X msg 20 289 \; sample resize 220500 \; insamplength 220500; +#X obj 22 46 inlet; +#X obj 22 73 openpanel; +#X obj 22 101 pack s 50; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 2 1 3 0; +#X connect 4 0 6 0; +#X connect 5 0 4 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 2 0; +#X restore 419 463 pd insample; +#X msg 190 163 \; read-sample ../sound/bell.aiff \; transpo 0; +#X msg 190 217 \; read-sample ../sound/voice.wav \; transpo -530; +#X obj 563 204 tabwrite~ sample; +#X obj 583 411 s lock; +#X floatatom 583 386 0 0 0; +#X msg 584 359 0; +#X msg 618 358 1; +#X text 135 18 PHASE LOCKING VOCODER; +#X text 32 46 This is a spin on the phase vocoder which prevents beating +between adjacent channels of the FFT. This is described in "Phase Locked +Vocoder" (reprinted on MSP's web page) and further improved by Laroche +and Dolson \, reported in ICMC97.; +#X obj 419 440 bng 15 250 50 0 empty empty read-sample 20 8 0 12 -262144 +-1 -1; +#X text 528 265 normal; +#X msg 507 288 \; location 0 \; speed 100; +#X connect 0 0 13 0; +#X connect 1 0 46 0; +#X connect 2 0 10 1; +#X connect 3 0 10 0; +#X connect 4 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 5 0; +#X connect 8 0 5 1; +#X connect 9 0 3 0; +#X connect 9 1 2 0; +#X connect 11 0 3 0; +#X connect 12 0 46 0; +#X connect 14 0 15 0; +#X connect 15 0 0 0; +#X connect 19 0 24 0; +#X connect 20 0 19 0; +#X connect 21 0 20 0; +#X connect 26 0 8 1; +#X connect 27 0 26 0; +#X connect 40 0 41 0; +#X connect 41 0 42 0; +#X connect 48 0 47 0; +#X connect 49 0 48 0; +#X connect 50 0 48 0; +#X connect 53 0 43 0; -- cgit v1.2.1