#N canvas 689 141 643 693 12;
#X obj 193 184 line~;
#X obj 71 255 cos~;
#X obj 193 160 pack 0 50;
#X floatatom 147 59 0 0 100 0 - - -;
#X obj 71 126 -~ 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.";
#X text 84 540 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.;
#X obj 71 375 output~;
#X obj 71 336 hip~;
#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 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 193 332 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 71 303 *~ 0.5;
#X obj 71 102 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 268 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 55 graph;
#X text 371 401 ---- 0.02 seconds ----;
#X text 368 186 2;
#X text 399 186 4;
#X text 338 186 0;
#X text 410 211 -- partial number --;
#X text 431 186 6;
#X text 464 186 8;
#X text 492 186 10;
#X text 524 186 12;
#X text 556 186 14;
#X text 406 635 updated for Pd version 0.37;
#X obj 71 75 r freq;
#X text 175 301 <= graph once;
#X text 214 331 <= repeatedly;
#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 21 0;
#X connect 17 0 16 0;
#X connect 17 0 16 1;
#X connect 19 0 18 1;
#X connect 20 0 18 2;
#X connect 21 0 17 0;
#X connect 21 0 18 0;
#X connect 22 0 4 0;
#X connect 36 0 22 0;
