#N canvas 379 84 882 419 12;
#X declare -path else;
#X obj 512 186 nbx 2 14 1 50 0 0 \$0-peaks empty empty 0 -8 0 10 -228856
-1 -1 1 256;
#X text 469 183 peaks;
#X msg 512 205 npeak \$1;
#X obj 512 260 sigmund~ -npts 2048 -hop 512 -npeak 50 tracks;
#X obj 174 292 s~ \$0-in;
#X obj 531 232 r~ \$0-in;
#X obj 154 325 out~;
#X obj 512 339 out~;
#X obj 657 193 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X text 662 172 cents;
#X msg 657 219 all \$1;
#X text 40 24 The phase difference from one FFT frame to another is
crucial in determining the actual pitch of a sine component. By getting
the accurate pitch of a component \, we can use a bank of oscillators
to resynthesize an analyzed sound. This opens other possibilities \,
like having an independent control over each sine component. But in
this example we just perform a simple pitch shift., f 50;
#X text 661 296 <= open;
#X text 428 54 For the oscillator bank we use an abstraction loaded
50 times in [clone]. The "tracks" arguments send the highest energy
components (a.k.a peaks) separately. We set an initial number of 50
peaks (with -npeak) but it's possible to change that with the npeak
message. Try that! The pitch shift is trivial \, in each oscillator
we perform a simple transposition. Open the subpatch for more info.
;
#X obj 512 295 clone 50 oscillator;
#X text 671 341 compare this pitch shifter with the last two we've
seen, f 20;
#X obj 666 20 declare -path else;
#X obj 154 246 play.file~ bubul.wav 1 1;
#X text 40 144 The native [sigmund~] object is a powerful pitch tracker
and can also spit separate tone components to feed a bank of oscillators.
It is based on FFT so we give it parameters like window size (-npts)
and hop size (-hop)., f 50;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 14 0;
#X connect 5 0 3 0;
#X connect 8 0 10 0;
#X connect 10 0 14 1;
#X connect 14 0 7 0;
#X connect 17 0 4 0;
#X connect 17 0 6 0;
