diff options
Diffstat (limited to 'pd/doc/4.fft.examples/09.pvoc.pd')
-rw-r--r-- | pd/doc/4.fft.examples/09.pvoc.pd | 397 |
1 files changed, 397 insertions, 0 deletions
diff --git a/pd/doc/4.fft.examples/09.pvoc.pd b/pd/doc/4.fft.examples/09.pvoc.pd new file mode 100644 index 00000000..495fd535 --- /dev/null +++ b/pd/doc/4.fft.examples/09.pvoc.pd @@ -0,0 +1,397 @@ +#N canvas 100 38 719 544 12; +#X floatatom 283 336; +#X msg 569 149 bang; +#X floatatom 197 329; +#X floatatom 90 330; +#N canvas 0 2 986 683 fft-analysis 0; +#X obj 261 297 *~; +#X obj 230 297 *~; +#X obj 230 319 -~; +#X obj 326 298 *~; +#X obj 295 298 *~; +#X obj 295 320 +~; +#X obj 340 128 *~; +#X obj 309 128 *~; +#X obj 281 128 *~; +#X obj 250 128 *~; +#X obj 250 150 +~; +#X obj 220 179 *~; +#X obj 86 556 *~; +#X obj 366 251 rfft~; +#X obj 387 53 rfft~; +#X obj 477 637 *~; +#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 507 637 *~; +#X obj 87 536 *~; +#X obj 103 513 rifft~; +#X obj 87 582 outlet~; +#X obj 625 446 print~; +#X msg 624 418 bang; +#X text 152 513 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 23 51 tabreceive~ phase-real; +#X obj 190 179 *~; +#X obj 190 201 +~; +#X obj 190 225 rsqrt~; +#X obj 309 150 -~; +#X obj 231 255 *~; +#X obj 291 255 *~; +#X obj 198 51 tabreceive~ phase-imag; +#X obj 105 381 sig~; +#X obj 88 311 t b f; +#X msg 88 332 1; +#X obj 102 355 /; +#X obj 227 436 tabsend~ phase-real; +#X obj 256 408 tabsend~ phase-imag; +#X obj 104 133 sig~ 1.5e-20; +#X obj 632 180 * 0.01; +#X obj 691 212 s speed; +#X obj 468 251 s see-location; +#X obj 598 618 block~ 2048 4; +#X floatatom 672 360; +#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 88 290 r window-size; +#X floatatom 835 353; +#X obj 551 543 tabreceive~ hanning; +#X obj 536 488 tabread4~ sample; +#X obj 502 513 tabread4~ sample; +#X connect 0 0 2 1; +#X connect 1 0 2 0; +#X connect 2 0 65 0; +#X connect 2 0 25 0; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 66 0; +#X connect 5 0 25 1; +#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 restore 43 402 pd fft-analysis; +#X obj 43 488 dac~; +#N canvas 260 23 647 768 phase-tables 0; +#X graph graph2 0 -1 4096 1 172 590 572 290; +#X array phase-imag 4096 float; +#X pop; +#X graph graph3 0 -1 4096 1 170 317 570 17; +#X array phase-real 4096 float; +#X pop; +#X msg 167 564 \; phase-real resize 4096 \; phase-imag resize 4096; +#X restore 425 441 pd phase-tables; +#X obj 43 428 hip~ 5; +#X obj 43 458 *~; +#N canvas 249 280 600 398 loc&precess 0; +#X floatatom 160 229; +#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 90 302 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 90 353 pd setlocprecess; +#X msg 47 313 0; +#X obj 612 162 adc~; +#X obj 283 361 s transpo; +#X obj 283 285 r transpo; +#X msg 283 311 set \$1; +#X msg 423 268 \; 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; +#X graph graph1 0 -1 4096 1 275 581 675 281; +#X array hanning 4096 float; +#X pop; +#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 423 464 pd hanning-window; +#X msg 31 172 \; window-size 2048 \; transpo 0 \; pd dsp 1; +#X floatatom 587 68; +#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 41 153 click here first; +#X text 261 3 PHASE VOCODER; +#X obj 87 486 line~; +#X obj 87 462 r master-amp; +#X text 108 30 This is a Fourier-based analysis/resynthesis tool.; +#X text 55 251 set location; +#X text 54 265 and stop; +#X text 54 279 precession; +#X text 172 250 precession; +#X text 171 266 speed in; +#X text 171 280 hundredths; +#X text 281 244 transposition; +#X text 282 262 in cents; +#X text 491 223 examples; +#X text 428 248 contraction; +#X text 542 247 expansion; +#X msg 531 270 \; location 0 \; speed 10; +#X obj 425 340 loadbang; +#X obj 429 363 samplerate~; +#X obj 425 385 s sample-rate; +#N canvas 132 255 634 327 insample 0; +#X graph graph1 0 -1 155947 1 199 168 599 18; +#X array sample 155948 float; +#X pop; +#X obj 19 70 r read-sample; +#X obj 19 95 unpack s f; +#X obj 53 121 s insamprate; +#X obj 19 171 soundfiler; +#X msg 19 147 read -resize \$1 sample; +#X obj 19 201 s insamplength; +#X msg 357 197 \; sample resize 220500 \; insamplength 220500; +#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 restore 425 415 pd insample; +#X msg 196 146 \; read-sample ../sound/bell.aiff \; transpo 0; +#X msg 196 197 \; read-sample ../sound/voice.wav \; transpo -530; +#X text 107 99 The second soundfile read button sets the transposition to correct for the 32000 sample rate of the file.; +#X text 108 50 You can move forward or backward in the sample \, or "freeze" at any point using the "precession" and "location" controls. Transposition is in hundredths of a half-tone.; +#X obj 569 184 tabwrite~ sample; +#X connect 0 0 13 0; +#X connect 1 0 50 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 50 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 27 0 8 1; +#X connect 28 0 27 0; +#X connect 42 0 43 0; +#X connect 43 0 44 0; |