#N canvas 429 51 731 641 12;
#X declare -stdpath ./;
#X obj 353 355 line~;
#X obj 89 448 cos~;
#X obj 353 331 pack 0 50;
#X floatatom 353 259 0 0 0 0 - - - 0;
#X obj 89 360 -~ 0.5;
#X obj 89 399 *~;
#X obj 353 283 / 10;
#X obj 89 424 clip~ -0.5 0.5;
#X text 353 237 bandwidth;
#X obj 353 379 +~ 1;
#X obj 90 471 +~ 1;
#X obj 239 444 cos~;
#X obj 90 500 *~;
#X floatatom 257 273 4 0 0 0 - - - 0;
#X obj 257 297 / 10;
#X obj 239 418 *~;
#X text 255 228 center;
#X text 255 247 freq.;
#X obj 353 307 max 0;
#X obj 257 369 line~;
#X obj 257 345 pack 0 50;
#X obj 257 321 max 0;
#X floatatom 89 312 4 0 0 0 - - - 0;
#X obj 89 336 phasor~ 100;
#X text 85 287 freq.;
#X text 85 268 fundamental;
#N canvas 0 22 450 278 (subpatch) 0;
#X array spectrum 128 float 0;
#X coords 0 500 128 0 256 130 1;
#X restore 428 396 graph;
#X msg 153 502 bang;
#N canvas 590 187 368 296 fft 0;
#X obj 46 48 inlet~;
#X obj 137 179 tabwrite~ spectrum;
#X obj 137 143 inlet;
#X obj 46 78 rfft~;
#X obj 46 111 *~;
#X obj 77 111 *~;
#X obj 77 142 sqrt~;
#X obj 165 82 block~ 1024 1;
#X connect 0 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 3 0 4 1;
#X connect 3 1 5 0;
#X connect 3 1 5 1;
#X connect 4 0 6 0;
#X connect 5 0 6 0;
#X connect 6 0 1 0;
#X restore 114 528 pd fft;
#X text 427 532 0;
#X text 675 532 5512;
#X text 69 26 WINDOWED PACKET SPECTRUM;
#X text 94 75 Here's the spectrum you get. Note that even if you put the center frequency right on a partial \, there is significant energy in neighboring partials (try fundamental 440 \, "center freq" 30 \, bandwidth 0.), f 76;
#X text 94 129 The center frequency is in units of ten per partial \, or in other words a value of "30" means "centered on the third partial"., f 76;
#X text 482 574 updated for Pd version 0.34;
#X text 94 169 This technique only works if you're doing Hanning-window shaped PWM--you can't combine this naturally with FM or with the waveshaping technique we'll see later., f 76;
#X text 194 502 <= graph;
#X obj 90 569 output~;
#X obj 537 27 declare -stdpath ./;
#X connect 0 0 9 0;
#X connect 1 0 10 0;
#X connect 2 0 0 0;
#X connect 3 0 6 0;
#X connect 4 0 5 0;
#X connect 4 0 15 0;
#X connect 5 0 7 0;
#X connect 6 0 18 0;
#X connect 7 0 1 0;
#X connect 9 0 5 1;
#X connect 10 0 12 0;
#X connect 11 0 12 1;
#X connect 12 0 28 0;
#X connect 12 0 37 0;
#X connect 13 0 14 0;
#X connect 14 0 21 0;
#X connect 15 0 11 0;
#X connect 18 0 2 0;
#X connect 19 0 15 1;
#X connect 20 0 19 0;
#X connect 21 0 20 0;
#X connect 22 0 23 0;
#X connect 23 0 4 0;
#X connect 27 0 28 1;
