diff options
Diffstat (limited to 'pd/doc/3.audio.examples/56.delay.pitchshift.pd')
-rw-r--r-- | pd/doc/3.audio.examples/56.delay.pitchshift.pd | 226 |
1 files changed, 226 insertions, 0 deletions
diff --git a/pd/doc/3.audio.examples/56.delay.pitchshift.pd b/pd/doc/3.audio.examples/56.delay.pitchshift.pd new file mode 100644 index 00000000..feb56e2f --- /dev/null +++ b/pd/doc/3.audio.examples/56.delay.pitchshift.pd @@ -0,0 +1,226 @@ +#N canvas 93 36 1005 580 12; +#X obj 19 493 hip~ 5; +#X floatatom 19 87 0 0 0; +#X obj 84 359 *~; +#X obj 192 290 line~; +#X floatatom 265 114 0 0 0; +#X text 68 9 PITCH SHIFTER; +#X obj 192 264 pack 0 200; +#X obj 266 141 moses 1; +#X msg 227 141 1; +#X obj 266 88 r window; +#X obj 19 61 r transpose; +#X obj 19 143 exp; +#X floatatom 19 169 0 0 0; +#X obj 19 259 /; +#X obj 146 189 * 0.001; +#X obj 314 366 line~; +#X obj 315 338 pack 0 200; +#X floatatom 315 258 0 0 0; +#X text 314 202 delay (msec); +#X obj 315 232 r delay; +#X obj 84 385 +~; +#X msg 315 311 1; +#X obj 315 285 moses 1.5; +#X obj 84 411 vd~ delay1; +#X obj 19 410 cos~; +#X obj 19 437 *~; +#X obj 19 466 +~; +#X obj 106 317 wrap~; +#X obj 251 360 *~; +#X obj 251 393 +~; +#X obj 251 422 vd~ delay1; +#X obj 188 420 cos~; +#X obj 188 447 *~; +#X msg 492 56 \; transpose 0 \; window 100 \; delay 0; +#X obj 492 30 loadbang; +#X obj 264 42 delwrite~ delay1 5000; +#X obj 146 216 t b f; +#X floatatom 19 285 0 0 0; +#X obj 19 312 phasor~ 0; +#X floatatom 51 526 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 372 176 t b; +#X obj 372 121 f; +#X obj 372 66 inlet; +#X text 378 32 mute; +#X obj 372 204 f; +#X msg 468 196 0; +#X msg 372 94 bang; +#X obj 372 149 moses 1; +#X obj 468 168 t b f; +#X obj 437 129 moses 1; +#X obj 91 163 dbtorms; +#X obj 437 101 r master-lvl; +#X obj 91 46 r master-lvl; +#X obj 372 231 s master-lvl; +#X obj 24 199 inlet~; +#X obj 219 45 inlet; +#X text 219 20 level; +#X obj 219 110 s master-lvl; +#X msg 106 72 set \$1; +#X obj 106 98 outlet; +#X msg 235 70 \; pd dsp 1; +#X obj 91 213 line~; +#X obj 24 233 *~; +#X obj 24 265 dac~; +#X obj 91 188 pack 0 50; +#X text 22 174 audio; +#X text 102 121 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 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 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 19 557 pd output; +#X msg 83 526 MUTE; +#X text 125 525 <-- output amplitude; +#X obj 106 290 +~ 0.5; +#X obj 19 358 -~ 0.5; +#X obj 19 384 *~ 0.5; +#X obj 188 359 -~ 0.5; +#X obj 188 392 *~ 0.5; +#X floatatom 227 167 0 0 0; +#X obj 19 196 - 1; +#X obj 19 117 * 0.05776; +#X obj 19 222 * -1; +#X text 53 86 <-- transposition; +#X text 96 99 (halftones); +#X text 86 177 speed; +#X text 85 191 change; +#X text 310 113 <--window (msec); +#X text 54 252 tape head; +#X text 55 265 rotation speed; +#N canvas 0 0 612 637 test-input 0; +#X graph graph1 0 -1 155947 1 150 291 350 141; +#X array array1 155948 float 0; +#X pop; +#X obj 139 518 tabread4~ array1; +#X obj 139 333 r totsamps; +#X obj 139 413 /; +#X obj 139 465 *~ 0; +#X obj 139 439 phasor~ 0; +#X obj 139 492 +~ 1; +#X msg 139 386 44100; +#X obj 139 360 t b f; +#X obj 182 469 r totsamps; +#X text 153 538 sample loop for; +#X text 153 555 test signal; +#X obj 162 30 loadbang; +#X obj 139 590 outlet~; +#X obj 393 169 r readfile; +#X obj 393 199 symbol; +#X msg 392 228 read -resize \$1 array1; +#X obj 392 256 soundfiler; +#X obj 392 284 s totsamps; +#X msg 161 64 \; readfile ../sound/bell.aiff; +#X connect 1 0 13 0; +#X connect 2 0 8 0; +#X connect 3 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 4 0; +#X connect 6 0 1 0; +#X connect 7 0 3 0; +#X connect 8 0 7 0; +#X connect 8 1 3 1; +#X connect 9 0 4 1; +#X connect 12 0 19 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X restore 264 11 pd test-input; +#X text 439 161 This is a classic rotating-tape-head style pitch shifter +using the vd~ variable delay object. Ther are two moving tape heads +\, each of which is loudest at the middle of its trajectory \, and +enveloped out at the moment it has to jump back (or forward) to start +another scratch. Most of the brain work is in computing how fast the +tape heads have to move to get the desired transposition.; +#X text 439 280 The "window size" is the total trajectory of the read +points in the delay line \, in milliseconds. The delay times are controlled +by a phasor~ object. The second delay time \, 180 degrees out of phase +from the first one \, is computed using the "wrap" object.; +#X text 437 370 The "window size" is the total trajectory of the read +points in the delay line \, in milliseconds. The delay times are controlled +by a phasor~ object. The second delay time \, 180 degrees out of phase +from the first one \, is computed using the "wrap" object.; +#X text 436 462 The cos~ objects compute the fadein and fadeout of +the two delay line outputs. They each traverse the positive half of +the cosine waveform (phase -0.25 to +0.25) over the time the phase +goes from one end to the other.; +#X text 757 557 updated for Pd version 0.33; +#X connect 0 0 40 0; +#X connect 1 0 50 0; +#X connect 2 0 20 0; +#X connect 3 0 2 1; +#X connect 3 0 28 1; +#X connect 4 0 7 0; +#X connect 6 0 3 0; +#X connect 7 0 8 0; +#X connect 7 1 48 0; +#X connect 8 0 48 0; +#X connect 9 0 4 0; +#X connect 10 0 1 0; +#X connect 11 0 12 0; +#X connect 12 0 49 0; +#X connect 13 0 37 0; +#X connect 14 0 36 0; +#X connect 15 0 20 1; +#X connect 15 0 29 1; +#X connect 16 0 15 0; +#X connect 17 0 22 0; +#X connect 19 0 17 0; +#X connect 20 0 23 0; +#X connect 21 0 16 0; +#X connect 22 0 21 0; +#X connect 22 1 16 0; +#X connect 23 0 25 1; +#X connect 24 0 25 0; +#X connect 25 0 26 0; +#X connect 26 0 0 0; +#X connect 27 0 28 0; +#X connect 27 0 46 0; +#X connect 28 0 29 0; +#X connect 29 0 30 0; +#X connect 30 0 32 1; +#X connect 31 0 32 0; +#X connect 32 0 26 1; +#X connect 34 0 33 0; +#X connect 36 0 13 0; +#X connect 36 1 13 1; +#X connect 37 0 38 0; +#X connect 38 0 2 0; +#X connect 38 0 44 0; +#X connect 38 0 43 0; +#X connect 39 0 40 1; +#X connect 40 0 39 0; +#X connect 41 0 40 2; +#X connect 43 0 27 0; +#X connect 44 0 45 0; +#X connect 45 0 24 0; +#X connect 46 0 47 0; +#X connect 47 0 31 0; +#X connect 48 0 6 0; +#X connect 48 0 14 0; +#X connect 49 0 51 0; +#X connect 50 0 11 0; +#X connect 51 0 13 0; +#X connect 59 0 35 0; |