#N canvas 602 31 641 655 12;
#X declare -stdpath ./;
#X obj 193 184 line~;
#X obj 71 255 cos~;
#X obj 193 160 pack 0 50;
#X floatatom 147 59 4 0 100 0 - - - 0;
#X obj 71 131 -~ 0.5;
#X obj 71 168 *~;
#X obj 147 85 / 10;
#X obj 147 109 moses 0;
#X msg 147 133 0;
#X obj 71 231 clip~ -0.5 0.5;
#X text 192 59 bandwidth;
#X obj 193 209 +~ 1;
#X obj 71 279 +~ 1;
#X text 52 16 PULSE SPECTRUM MEASUREMENT;
#X text 82 469 Here is a measured amplitude spectrum for the pulse train. Notice that \, other than a smallish spillover \, the energy sits in one "lobe" whose changing width justifies our calling the squeeze factor the "bandwidth.", f 68;
#X text 82 530 The spectrum is in units of amplitude. The sidelobes \, although they look small \, are actually only about 34 dB down. You can design more complicated pulse trains \, little Blackman window functions \, which control the sidelobes much better., f 68;
#X obj 71 375 output~;
#N canvas 424 208 569 608 fft 0;
#X obj 43 105 inlet~;
#X obj 243 263 inlet;
#X obj 63 136 rfft~;
#X obj 63 169 *~;
#X obj 95 169 *~;
#X obj 63 199 sqrt~;
#X obj 366 153 block~ 4096 1;
#X obj 63 225 biquad~ 0 0 0 0 1;
#X text 127 137 Fourier series;
#X text 132 190 magnitude;
#X text 130 175 calculate;
#X text 60 26 This subpatch computes the spectrum of the incoming signal with a (rectangular windowed) FFT. FFTs aren't properly introduced until much later.;
#X text 105 104 signal to analyze;
#X text 194 216 delay two samples;
#X text 192 234 for better graphing;
#X obj 298 501 samplerate~;
#X obj 298 524 / 256;
#X obj 272 328 metro 500;
#X obj 272 292 inlet;
#X text 325 290 toggle to graph repeatedly;
#X text 297 263 bang to graph once;
#X obj 63 249 /~ 4096;
#X obj 43 392 tabwrite~ F03-signal;
#X obj 272 366 tabwrite~ F03-spectrum;
#X obj 298 476 bang~;
#X msg 243 389 \; pd dsp 1;
#X obj 298 549 s freq;
#X connect 0 0 2 0;
#X connect 0 0 22 0;
#X connect 1 0 22 0;
#X connect 1 0 23 0;
#X connect 1 0 25 0;
#X connect 2 0 3 0;
#X connect 2 0 3 1;
#X connect 2 1 4 0;
#X connect 2 1 4 1;
#X connect 3 0 5 0;
#X connect 4 0 5 0;
#X connect 5 0 7 0;
#X connect 7 0 21 0;
#X connect 15 0 16 0;
#X connect 16 0 26 0;
#X connect 17 0 22 0;
#X connect 17 0 23 0;
#X connect 18 0 17 0;
#X connect 18 0 25 0;
#X connect 21 0 23 0;
#X connect 24 0 15 0;
#X restore 134 332 pd fft;
#X obj 153 301 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 193 332 tgl 19 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000 0 1;
#X obj 71 303 *~ 0.5;
#X obj 71 104 phasor~;
#N canvas 0 0 450 300 (subpatch) 0;
#X array F03-signal 882 float 0;
#X coords 0 1.02 882 -1.02 200 130 1;
#X restore 371 287 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array F03-spectrum 259 float 0;
#X coords 0 0.51 258 -0.008 256 130 1;
#X restore 339 74 graph;
#X text 371 420 ---- 0.02 seconds ----;
#X text 368 205 2;
#X text 399 205 4;
#X text 338 205 0;
#X text 410 230 -- partial number --;
#X text 431 205 6;
#X text 464 205 8;
#X text 492 205 10;
#X text 524 205 12;
#X text 556 205 14;
#X text 393 617 updated for Pd version 0.37;
#X obj 71 75 r freq;
#X obj 469 25 declare -stdpath ./;
#X text 214 331 <-- repeatedly;
#X text 175 301 <-- graph once;
#X obj 71 336 hip~ 5;
#X connect 0 0 11 0;
#X connect 1 0 12 0;
#X connect 2 0 0 0;
#X connect 3 0 6 0;
#X connect 4 0 5 0;
#X connect 5 0 9 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 7 1 2 0;
#X connect 8 0 2 0;
#X connect 9 0 1 0;
#X connect 11 0 5 1;
#X connect 12 0 20 0;
#X connect 18 0 17 1;
#X connect 19 0 17 2;
#X connect 20 0 17 0;
#X connect 20 0 39 0;
#X connect 21 0 4 0;
#X connect 35 0 21 0;
#X connect 39 0 16 0;
