#N canvas 381 46 858 573 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 0 0 300 0 - - - 0;
#X obj 165 264 / 100;
#X obj 71 208 phasor~;
#X obj 129 493 output~;
#X text 581 495 updated for Pd version 0.37;
#N canvas 298 189 621 664 fft 0;
#X obj 84 81 inlet~;
#X obj 273 232 inlet;
#X obj 98 115 rfft~;
#X obj 98 148 *~;
#X obj 129 148 *~;
#X obj 98 178 sqrt~;
#X obj 397 129 block~ 4096 1;
#X obj 98 204 biquad~ 0 0 0 0 1;
#X text 162 116 Fourier series;
#X text 167 169 magnitude;
#X text 165 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 106 464 samplerate~;
#X obj 106 441 bng 18 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000;
#X floatatom 106 511 5 0 0 0 - - - 0;
#X obj 106 487 / 256;
#X obj 106 417 loadbang;
#X obj 162 561 s fundamental;
#X text 74 350 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 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 106 533 t b f;
#X obj 84 315 tabwrite~ E10-spectrum;
#X obj 273 315 tabwrite~ E10-spectrum;
#X text 162 585 set carrier multiplier and modulation multipliers after fundamental, f 38;
#X msg 106 565 \; cm 8 \; m1 2 \; m2 3;
#X connect 0 0 2 0;
#X connect 0 0 27 0;
#X connect 1 0 27 0;
#X connect 1 0 28 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 28 0;
#X connect 15 0 18 0;
#X connect 16 0 15 0;
#X connect 17 0 26 0;
#X connect 18 0 17 0;
#X connect 19 0 16 0;
#X connect 22 0 27 0;
#X connect 22 0 28 0;
#X connect 23 0 22 0;
#X connect 26 0 30 0;
#X connect 26 1 20 0;
#X restore 196 452 pd fft;
#X obj 215 394 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 235 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 456 116 graph;
#X text 486 247 2;
#X text 517 247 4;
#X text 456 247 0;
#X text 506 271 -- partial number --;
#X text 588 90 SPECTRUM;
#X text 716 232 0;
#X text 717 114 0.5;
#X obj 147 207 osc~;
#X obj 268 147 r fundamental;
#X text 549 247 6;
#X text 582 247 8;
#X text 610 247 10;
#X text 642 247 12;
#X text 674 247 14;
#X floatatom 71 93 4 0 15 0 - - - 0;
#X obj 71 180 *;
#X obj 71 66 r cm;
#X text 55 18 SPECTRUM OF COMPLEX PHASE MODULATION;
#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 194 241 index1;
#X obj 250 337 *~;
#X obj 268 313 line~;
#X obj 268 290 pack 0 50;
#X floatatom 268 241 0 0 300 0 - - - 0;
#X obj 268 266 / 100;
#X obj 250 209 osc~;
#X obj 250 184 *;
#X floatatom 250 93 4 0 15 0 - - - 0;
#X text 254 115 mod 2;
#X text 302 241 index2;
#X obj 250 66 r m2;
#X text 380 346 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. 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 63;
#X obj 623 21 declare -stdpath ./;
#X text 256 422 <-- repeatedly;
#X text 237 394 <-- graph once;
#X obj 129 452 hip~ 5;
#X connect 0 0 3 1;
#X connect 1 0 0 1;
#X connect 2 0 10 0;
#X connect 2 0 53 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 11 0 10 1;
#X connect 12 0 10 2;
#X connect 21 0 0 0;
#X connect 22 0 29 1;
#X connect 22 0 33 1;
#X connect 22 0 44 1;
#X connect 28 0 29 0;
#X connect 29 0 7 0;
#X connect 30 0 28 0;
#X connect 33 0 21 0;
#X connect 34 0 33 0;
#X connect 36 0 34 0;
#X connect 38 0 3 1;
#X connect 39 0 38 1;
#X connect 40 0 39 0;
#X connect 41 0 42 0;
#X connect 42 0 40 0;
#X connect 43 0 38 0;
#X connect 44 0 43 0;
#X connect 45 0 44 0;
#X connect 48 0 45 0;
#X connect 53 0 8 0;
