#N canvas 428 23 766 696 12;
#X declare -stdpath ./;
#X floatatom 101 97 6 0 0 0 - - - 0;
#X obj 101 468 *~;
#X obj 224 394 line~;
#X floatatom 224 149 6 0 0 0 - - - 0;
#X text 66 25 PITCH SHIFTER;
#X obj 224 123 r window;
#X obj 101 71 r transpose;
#X obj 101 153 exp;
#X floatatom 101 179 6 0 0 0 - - - 0;
#X obj 101 269 /;
#X obj 149 206 * 0.001;
#X obj 287 458 line~;
#X floatatom 287 382 0 0 0 0 - - - 0;
#X obj 287 356 r delay;
#X obj 101 505 +~;
#X obj 45 520 cos~;
#X obj 45 547 *~;
#X obj 164 591 +~;
#X obj 165 394 wrap~;
#X obj 241 453 *~;
#X obj 269 513 +~;
#X obj 183 530 cos~;
#X obj 183 557 *~;
#X msg 470 65 \; transpose 0 \; window 100 \; delay 0;
#X obj 470 39 loadbang;
#X obj 149 232 t b f;
#X floatatom 101 295 6 0 0 0 - - - 0;
#X obj 165 367 +~ 0.5;
#X obj 45 468 -~ 0.5;
#X obj 45 494 *~ 0.5;
#X obj 183 453 -~ 0.5;
#X obj 183 502 *~ 0.5;
#X obj 101 206 - 1;
#X obj 101 127 * 0.05776;
#X obj 101 232 * -1;
#X text 54 173 speed;
#X text 47 187 change;
#X text 29 286 tape head;
#N canvas 514 161 608 645 test-input 0;
#N canvas 0 0 450 300 (subpatch) 0;
#X array array1 155944 float 0;
#X coords 0 1 155943 -1 200 150 1;
#X restore 94 136 graph;
#X obj 163 503 tabread4~ array1;
#X obj 135 315 r totsamps;
#X obj 163 398 /;
#X obj 163 450 *~ 0;
#X obj 163 424 phasor~ 0;
#X obj 163 477 +~ 1;
#X msg 135 371 44100;
#X obj 135 345 t b f, f 7;
#X obj 206 454 r totsamps;
#X text 177 523 sample loop for;
#X text 177 540 test signal;
#X obj 105 25 loadbang;
#X obj 163 575 outlet~;
#X obj 337 164 r readfile;
#X obj 337 194 symbol;
#X msg 336 223 read -resize \$1 array1;
#X obj 336 251 soundfiler;
#X obj 336 279 s totsamps;
#X msg 105 59 \; 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 232 27 pd test-input;
#X obj 164 619 output~;
#X obj 101 326 phasor~;
#X obj 287 409 max 1.5;
#X text 290 315 delay;
#X text 287 333 (msec);
#X obj 224 176 max 1;
#X text 29 299 rotation freq, f 9;
#X obj 232 58 delwrite~ G09-del 5000;
#X obj 463 151 declare -stdpath ./;
#X obj 269 542 delread4~ G09-del, f 9;
#X obj 101 531 delread4~ G09-del, f 9;
#X text 502 641 updated for Pd version 0.52;
#X text 275 149 <-- window (msec);
#X msg 224 367 \$1 200;
#X msg 287 433 \$1 200;
#X text 151 97 <-- transposition in halftones;
#X text 369 209 This is a classic rotating-tape-head style pitch shifter using the [delread4~] variable delay object. There 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., f 52;
#X text 368 349 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., f 52;
#X text 367 444 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., f 52;
#X text 366 535 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., f 52;
#X connect 0 0 33 0;
#X connect 1 0 14 0;
#X connect 2 0 1 1;
#X connect 2 0 19 1;
#X connect 3 0 44 0;
#X connect 5 0 3 0;
#X connect 6 0 0 0;
#X connect 7 0 8 0;
#X connect 8 0 32 0;
#X connect 9 0 26 0;
#X connect 10 0 25 0;
#X connect 11 0 14 1;
#X connect 11 0 20 1;
#X connect 12 0 41 0;
#X connect 13 0 12 0;
#X connect 14 0 49 0;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 17 0 39 0;
#X connect 18 0 19 0;
#X connect 18 0 30 0;
#X connect 19 0 20 0;
#X connect 20 0 48 0;
#X connect 21 0 22 0;
#X connect 22 0 17 1;
#X connect 24 0 23 0;
#X connect 25 0 9 0;
#X connect 25 1 9 1;
#X connect 26 0 40 0;
#X connect 27 0 18 0;
#X connect 28 0 29 0;
#X connect 29 0 15 0;
#X connect 30 0 31 0;
#X connect 31 0 21 0;
#X connect 32 0 34 0;
#X connect 33 0 7 0;
#X connect 34 0 9 0;
#X connect 38 0 46 0;
#X connect 40 0 1 0;
#X connect 40 0 28 0;
#X connect 40 0 27 0;
#X connect 41 0 53 0;
#X connect 44 0 10 0;
#X connect 44 0 52 0;
#X connect 48 0 22 1;
#X connect 49 0 16 1;
#X connect 52 0 2 0;
#X connect 53 0 11 0;
