#N canvas 667 74 758 469 12;
#X obj 47 11 pique;
#X obj 143 185 rfft~;
#X obj 102 116 osc~ 2000;
#N canvas 0 22 450 278 (subpatch) 0;
#X array fft-real 64 float 0;
#X coords 0 64 63 -64 200 140 1;
#X restore 516 67 graph;
#N canvas 0 22 450 278 (subpatch) 0;
#X array fft-imag 64 float 0;
#X coords 0 64 63 -64 200 140 1;
#X restore 516 236 graph;
#X obj 143 269 tabwrite~ fft-real;
#X obj 225 239 tabwrite~ fft-imag;
#X obj 225 175 metro 1000;
#X obj 225 123 loadbang;
#X msg 225 151 1;
#X obj 125 399 pique;
#X msg 125 372 64 fft-real fft-imag 10;
#X obj 125 426 print;
#X obj 143 142 osc~ 5000;
#X text 25 44 pique takes unwindowed FFT analyses as input (they should
be stored in arrays) and outputs a list of peaks \, giving their peak
number \, frequency \, amplitude \, and phase (as a cosine/sine pair.)
, f 64;
#X text 41 319 message arguments: number of FFT points \, fft real
part \, fft imaginary part \, maximum number of peaks to report.;
#X text 557 398 updated for Pd 0.31.;
#X text 97 12 - find peaks in an FFT spectrum;
#X msg 384 149 \; pd dsp 1;
#X text 340 129 click here first, f 12;
#X connect 1 0 5 0;
#X connect 1 1 6 0;
#X connect 2 0 1 0;
#X connect 7 0 5 0;
#X connect 7 0 6 0;
#X connect 8 0 9 0;
#X connect 9 0 7 0;
#X connect 10 0 12 0;
#X connect 11 0 10 0;
#X connect 13 0 1 0;
