#N canvas 387 124 697 536 12;
#X declare -stdpath ./;
#X obj 146 209 *~;
#X obj 189 209 line~;
#X obj 71 210 cos~;
#X obj 71 185 +~;
#X obj 189 186 pack 0 50;
#X floatatom 189 138 4 0 0 0 - - - 0;
#X obj 189 162 / 100;
#X obj 71 160 phasor~;
#X obj 71 315 output~;
#X obj 71 284 hip~;
#X text 442 513 updated for Pd version 0.37;
#N canvas 665 146 599 711 fft 0;
#X obj 97 106 inlet~;
#X obj 286 257 inlet;
#X obj 113 137 rfft~;
#X obj 113 170 *~;
#X obj 144 170 *~;
#X obj 113 200 sqrt~;
#X obj 401 149 block~ 4096 1;
#X obj 113 226 biquad~ 0 0 0 0 1;
#X text 171 138 Fourier series;
#X text 182 191 magnitude;
#X text 180 176 calculate;
#X text 97 28 This subpatch computes the spectrum of the incoming signal with a (rectangular windowed) FFT. FFTs aren't properly introduced until much later.;
#X text 161 106 signal to analyze;
#X text 271 209 delay two samples;
#X text 269 227 for better graphing;
#X obj 133 532 samplerate~;
#X obj 133 509 bng 18 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000;
#X floatatom 133 581 5 0 0 0 - - - 0;
#X obj 133 555 / 256;
#X obj 133 485 loadbang;
#X obj 184 631 s fundamental;
#X text 86 426 At load time \, calculate a good choice of fundamental frequency for showing spectra: the 16th bin in a 4096-point spectrum \, so SR*16/4096 or SR/256.;
#X obj 319 311 metro 500;
#X obj 309 281 inlet;
#X text 362 279 toggle to graph repeatedly;
#X text 340 257 bang to graph once;
#X obj 97 372 tabwrite~ E09-signal;
#X obj 319 343 tabwrite~ E09-spectrum;
#X obj 133 603 t b f;
#X msg 133 631 \; cm 6;
#X text 138 671 set carrier multiplier after fundamental;
#X obj 113 250 /~ 4096;
#X msg 287 367 \; pd dsp 1;
#X connect 0 0 2 0;
#X connect 0 0 26 0;
#X connect 1 0 26 0;
#X connect 1 0 27 0;
#X connect 1 0 32 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 31 0;
#X connect 15 0 18 0;
#X connect 16 0 15 0;
#X connect 17 0 28 0;
#X connect 18 0 17 0;
#X connect 19 0 16 0;
#X connect 22 0 26 0;
#X connect 22 0 27 0;
#X connect 23 0 22 0;
#X connect 23 0 32 0;
#X connect 28 0 29 0;
#X connect 28 1 20 0;
#X connect 31 0 27 0;
#X restore 115 264 pd fft;
#X obj 134 240 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 175 264 tgl 19 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000 0 1;
#N canvas 0 0 450 300 (subpatch) 0;
#X array E09-signal 882 float 0;
#X coords 0 1.02 882 -1.02 200 80 1;
#X restore 411 59 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array E09-spectrum 259 float 0;
#X coords 0 0.51 258 -0.008 259 130 1;
#X restore 354 196 graph;
#X text 420 145 ---- 0.02 seconds ----;
#X text 384 327 2;
#X text 415 327 4;
#X text 353 327 0;
#X text 392 342 -- partial number --;
#X text 332 88 WAVEFORM;
#X text 448 178 SPECTRUM;
#X text 614 312 0;
#X text 615 194 0.5;
#X obj 146 138 osc~;
#X obj 146 107 r fundamental;
#X text 224 138 index (x100);
#X text 447 327 6;
#X text 480 327 8;
#X text 508 327 10;
#X text 540 327 12;
#X text 572 327 14;
#X text 45 17 SPECTRUM OF TWO-OPERATOR PHASE MODULATION;
#X floatatom 71 79 3 0 15 0 - - - 0;
#X obj 71 136 *;
#X obj 71 54 r cm;
#X text 105 78 carrier harmonic #;
#X text 113 391 This patch measures the spectrum of two-operator phase modulation. The carrier frequency is initially six times the modulation frequency \, but you can change it with the "carrier harmonic #" control. Changing the index changes the relative strengths of the harmonics. Past a certain index (which depends on the carrier frequency) the lower sidebands begin to reflect about the left edge of the spectrum \, causing complicated interference effects., f 71;
#X obj 529 17 declare -stdpath ./;
#X text 196 263 <-- repeatedly;
#X text 156 240 <-- graph once;
#X connect 0 0 3 1;
#X connect 1 0 0 1;
#X connect 2 0 9 0;
#X connect 2 0 11 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X connect 5 0 6 0;
#X connect 6 0 4 0;
#X connect 7 0 3 0;
#X connect 9 0 8 0;
#X connect 9 0 8 1;
#X connect 12 0 11 1;
#X connect 13 0 11 2;
#X connect 25 0 0 0;
#X connect 26 0 25 0;
#X connect 26 0 35 1;
#X connect 34 0 35 0;
#X connect 35 0 7 0;
#X connect 36 0 34 0;
