#N canvas 367 23 909 712 12;
#X declare -stdpath ./;
#X floatatom 148 113 5 0 0 0 - - - 0;
#X obj 148 484 *~;
#X obj 271 411 line~;
#X floatatom 271 148 5 0 0 0 - - - 0;
#X text 73 41 PITCH SHIFTER;
#X obj 271 122 r window;
#X obj 148 87 r transpose;
#X obj 148 169 exp;
#X floatatom 148 195 6 0 0 0 - - - 0;
#X obj 148 285 /;
#X obj 196 219 * 0.001;
#X obj 370 472 line~;
#X floatatom 370 396 0 0 0 0 - - - 0;
#X obj 370 370 r delay;
#X obj 148 510 +~;
#X obj 85 536 cos~;
#X obj 85 563 *~;
#X obj 226 607 +~;
#X obj 212 413 wrap~;
#X obj 307 467 *~;
#X obj 307 519 +~;
#X obj 244 546 cos~;
#X obj 244 573 *~;
#X msg 497 66 \; transpose 0 \; window 100 \; delay 0;
#X obj 497 40 loadbang;
#X obj 196 246 t b f;
#X floatatom 148 311 6 0 0 0 - - - 0;
#X obj 212 386 +~ 0.5;
#X obj 85 484 -~ 0.5;
#X obj 85 510 *~ 0.5;
#X obj 244 466 -~ 0.5;
#X obj 244 518 *~ 0.5;
#X obj 148 222 - 1;
#X obj 148 143 * 0.05776;
#X obj 148 248 * -1;
#X text 101 189 speed;
#X text 94 203 change;
#X text 76 302 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 279 43 pd test-input;
#X text 480 326 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 479 421 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 478 512 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 obj 209 640 output~;
#X obj 148 342 phasor~;
#X obj 370 423 max 1.5;
#X text 373 329 delay;
#X text 370 347 (msec);
#X obj 271 175 max 1;
#X text 76 315 rotation freq, f 9;
#X obj 279 74 delwrite~ G09-del 5000;
#X text 39 98 transposition;
#X text 38 111 (halftones) =>;
#X obj 660 43 declare -stdpath ./;
#X obj 307 548 delread4~ G09-del, f 9;
#X obj 148 536 delread4~ G09-del, f 9;
#X text 481 186 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 624 631 updated for Pd version 0.52;
#X obj 370 447 pack f 200;
#X obj 271 385 pack f 200;
#X text 312 147 <-- window (msec);
#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 47 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 44 0;
#X connect 13 0 12 0;
#X connect 14 0 54 0;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 17 0 42 0;
#X connect 17 0 42 1;
#X connect 18 0 19 0;
#X connect 18 0 30 0;
#X connect 19 0 20 0;
#X connect 20 0 53 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 43 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 49 0;
#X connect 43 0 1 0;
#X connect 43 0 28 0;
#X connect 43 0 27 0;
#X connect 44 0 57 0;
#X connect 47 0 10 0;
#X connect 47 0 58 0;
#X connect 53 0 22 1;
#X connect 54 0 16 1;
#X connect 57 0 11 0;
#X connect 58 0 2 0;
