#N canvas 497 41 789 590 12;
#X declare -stdpath ./;
#X obj 147 335 *~;
#X obj 165 311 line~;
#X obj 129 407 cos~;
#X obj 129 377 +~;
#X obj 165 288 pack 0 50;
#X floatatom 165 239 5 0 300 0 - - - 0;
#X obj 165 264 / 100;
#X obj 71 208 phasor~;
#X obj 129 493 output~;
#N canvas 298 189 609 386 fft 0;
#X obj 84 81 inlet~;
#X obj 273 232 inlet;
#X obj 98 115 rfft~;
#X obj 98 148 *~;
#X obj 130 148 *~;
#X obj 98 178 sqrt~;
#X obj 98 204 biquad~ 0 0 0 0 1;
#X text 162 116 Fourier series;
#X text 166 170 magnitude;
#X text 166 154 calculate;
#X text 62 16 This subpatch computes the spectrum of the incoming signal with a (rectangular windowed) FFT. FFTs aren't properly introduced until much later.;
#X text 148 81 signal to analyze;
#X text 258 184 delay two samples;
#X text 256 202 for better graphing;
#X obj 285 280 metro 500;
#X obj 285 254 inlet;
#X text 338 252 toggle to graph repeatedly;
#X text 327 232 bang to graph once;
#X obj 84 315 tabwrite~ E10-spectrum;
#X obj 273 315 tabwrite~ E10-spectrum;
#X obj 397 130 block~ 4096;
#X text 395 103 Window size;
#X connect 0 0 2 0;
#X connect 0 0 18 0;
#X connect 1 0 18 0;
#X connect 1 0 19 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 6 0;
#X connect 6 0 19 0;
#X connect 14 0 18 0;
#X connect 14 0 19 0;
#X connect 15 0 14 0;
#X restore 178 452 pd fft;
#X obj 197 394 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 217 423 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 E10-spectrum 259 float 0;
#X coords 0 2100 258 -20 259 130 1;
#X restore 429 299 graph;
#X text 459 430 2;
#X text 490 430 4;
#X text 429 430 0;
#X text 561 273 SPECTRUM;
#X text 689 415 0;
#X text 690 297 0.5;
#X obj 147 207 osc~;
#X obj 274 147 r fundamental;
#X text 522 430 6;
#X text 555 430 8;
#X text 583 430 10;
#X text 615 430 12;
#X text 647 430 14;
#X floatatom 71 93 4 0 15 0 - - - 0;
#X obj 71 180 *;
#X obj 71 66 r cm;
#X text 74 115 carrier;
#X obj 147 182 *;
#X floatatom 147 93 4 0 15 0 - - - 0;
#X text 151 115 mod 1;
#X obj 147 66 r m1;
#X text 204 240 index1;
#X obj 256 337 *~;
#X obj 274 313 line~;
#X obj 274 290 pack 0 50;
#X floatatom 274 241 5 0 300 0 - - - 0;
#X obj 274 266 / 100;
#X obj 256 209 osc~;
#X obj 256 184 *;
#X floatatom 256 93 4 0 15 0 - - - 0;
#X text 260 115 mod 2;
#X text 313 241 index2;
#X obj 256 66 r m2;
#X text 238 422 <-- repeatedly;
#X text 219 394 <-- graph once;
#X text 445 458 -------- partial number --------;
#X obj 42 12 cnv 5 5 25 empty empty Spectrum\ of\ Complex\ Phase\ Modulation 15 13 0 16 #dfdfdf #202020 0;
#N canvas 241 111 402 454 init 0;
#X obj 134 214 samplerate~;
#X obj 102 163 bng 18 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 134 241 / 256;
#X obj 102 135 loadbang;
#X obj 134 296 s fundamental;
#X text 44 45 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., f 42;
#X obj 93 344 declare -stdpath ./;
#X obj 102 186 t b b;
#X floatatom 134 268 9 0 0 0 - - - 0;
#X text 45 14 This subpatch initializes the patch.;
#X msg 74 248 \; cm 8 \; m1 2 \; m2 3;
#X connect 0 0 2 0;
#X connect 1 0 7 0;
#X connect 2 0 8 0;
#X connect 3 0 1 0;
#X connect 7 0 10 0;
#X connect 7 1 0 0;
#X connect 8 0 4 0;
#X restore 292 508 pd init;
#X text 436 72 Now we introduce a second modulator oscillator. The carrier is on the 8th harmonic and the two modulators are at 2 and 3 times the fundamental., f 38;
#X text 436 138 When either index of modulation is zero \, changing the other index gives the familiar 2-operator FM result. But if index2 is nonzero (try around 10 \, for example) then sliding index1 upward from 0 introduces sidebands around each of the sidebands., f 38;
#X connect 0 0 3 1;
#X connect 1 0 0 1;
#X connect 2 0 9 0;
#X connect 2 0 8 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 10 0 9 1;
#X connect 11 0 9 2;
#X connect 19 0 0 0;
#X connect 20 0 27 1;
#X connect 20 0 30 1;
#X connect 20 0 41 1;
#X connect 26 0 27 0;
#X connect 27 0 7 0;
#X connect 28 0 26 0;
#X connect 30 0 19 0;
#X connect 31 0 30 0;
#X connect 33 0 31 0;
#X connect 35 0 3 1;
#X connect 36 0 35 1;
#X connect 37 0 36 0;
#X connect 38 0 39 0;
#X connect 39 0 37 0;
#X connect 40 0 35 0;
#X connect 41 0 40 0;
#X connect 42 0 41 0;
#X connect 45 0 42 0;
