#N canvas 358 63 809 627 12;
#X declare -stdpath ./;
#X obj 152 348 cos~;
#X obj 152 268 *~;
#X obj 195 348 cos~;
#X obj 236 246 wrap~;
#X obj 199 246 -~;
#X obj 195 323 +~;
#X obj 195 381 -~;
#X obj 218 407 *~;
#X obj 199 216 samphold~;
#X floatatom 199 84 4 0 200 0 - \$0-center-freq - 0;
#X obj 199 107 / 10;
#X obj 199 159 line~;
#X obj 199 133 pack 0 50;
#X obj 131 151 phasor~;
#X floatatom 131 128 4 0 0 0 - \$0-fundamental - 0;
#X floatatom 336 152 4 0 500 0 - \$0-index - 0;
#X obj 286 205 cos~;
#X obj 336 221 line~;
#X obj 286 256 *~;
#X obj 336 175 / 100;
#X obj 336 198 pack 0 50;
#X obj 152 294 +~;
#X text 321 253 modulating;
#X text 321 268 oscillator;
#X text 39 309 both phases-->;
#X text 25 294 add modulator to;
#X obj 200 512 output~;
#N canvas 605 126 529 576 fft 0;
#X obj 83 140 inlet~;
#X obj 197 410 inlet;
#X obj 83 272 rfft~;
#X obj 83 305 *~;
#X obj 115 305 *~;
#X obj 115 336 sqrt~;
#X obj 115 362 biquad~ 0 0 0 0 1;
#X text 135 272 Fourier series;
#X text 161 324 magnitude;
#X text 161 309 calculate;
#X text 62 23 This subpatch computes the spectrum of the incoming signal with a (rectangular windowed) FFT. FFTs aren't properly introduced until much later.;
#X text 76 105 signal to analyze, f 9;
#X text 244 357 delay two samples;
#X text 242 375 for better graphing;
#X obj 171 135 samplerate~;
#X obj 214 469 metro 500;
#X obj 214 446 inlet;
#X text 262 444 toggle to graph repeatedly;
#X text 241 411 bang to graph once;
#X obj 115 386 /~ 4096;
#X obj 197 506 tabwrite~ F10-spectrum;
#X obj 171 158 / 4096;
#X obj 171 190 osc~;
#X obj 171 218 +~ 1;
#X obj 83 203 *~;
#X text 215 203 hanning window;
#X obj 373 271 block~ 4096;
#X text 375 246 window size;
#X obj 264 102 loadbang;
#X obj 171 242 *~ 0.5;
#X msg 264 148 0.5;
#X connect 0 0 24 0;
#X connect 1 0 20 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 21 0;
#X connect 15 0 20 0;
#X connect 16 0 15 0;
#X connect 19 0 20 0;
#X connect 21 0 22 0;
#X connect 22 0 23 0;
#X connect 23 0 29 0;
#X connect 24 0 2 0;
#X connect 28 0 14 0;
#X connect 28 0 30 0;
#X connect 29 0 24 1;
#X connect 30 0 22 1;
#X restore 241 467 pd fft;
#X obj 260 415 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 280 440 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 F10-spectrum 259 float 0;
#X coords 0 0.51 258 -0.008 317 162 1;
#X restore 435 336 graph;
#X text 431 505 0;
#X obj 200 435 +~;
#X text 730 505 2700;
#X text 98 69 center freq. (in tenths of fundamental), f 13;
#X text 40 128 fundamental (= mod freq), f 12;
#X text 286 415 <-- graph once;
#X text 518 508 ---- frequency ----;
#X obj 51 24 cnv 5 5 25 empty empty Applying\ Two-Cosine\ Carrier\ to\ FM 15 13 0 16 #dfdfdf #202020 0;
#N canvas 238 316 365 358 init 0;
#X obj 125 294 declare -stdpath ./;
#X obj 131 97 loadbang;
#X text 81 28 This subpatch initializes the patch and loads a value in the number boxes., f 29;
#X obj 131 126 bng 19 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#X obj 131 153 f \$0;
#X msg 131 183 \; \$1-fundamental 220 \; \$1-center-freq 20 \; \$1-index 10;
#X connect 1 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X restore 67 486 pd init;
#X text 445 110 We can apply the two-cosine method to FM synthesis to get FM spectra which slide up and down: we just treat the cosines like carrier signals in an FM instrument., f 43;
#X text 445 178 This doesn't work as well as you'd wish \, because the phases of the partials of the two FM instruments don't line up \, so that \, for indices of modulation above about 20% \, you get beating effects as the center frequency goes up and down., f 43;
#X text 326 111 index (percent), f 9;
#X text 305 439 <-- graph repeatedly, f 10;
#X connect 0 0 6 1;
#X connect 0 0 32 0;
#X connect 1 0 21 0;
#X connect 2 0 6 0;
#X connect 3 0 4 1;
#X connect 3 0 7 1;
#X connect 4 0 1 1;
#X connect 5 0 2 0;
#X connect 6 0 7 0;
#X connect 7 0 32 1;
#X connect 8 0 4 0;
#X connect 8 0 3 0;
#X connect 9 0 10 0;
#X connect 10 0 12 0;
#X connect 11 0 8 0;
#X connect 12 0 11 0;
#X connect 13 0 8 1;
#X connect 13 0 16 0;
#X connect 13 0 1 0;
#X connect 13 0 5 1;
#X connect 14 0 13 0;
#X connect 15 0 19 0;
#X connect 16 0 18 0;
#X connect 17 0 18 1;
#X connect 18 0 21 1;
#X connect 19 0 20 0;
#X connect 20 0 17 0;
#X connect 21 0 5 0;
#X connect 21 0 0 0;
#X connect 28 0 27 1;
#X connect 29 0 27 2;
#X connect 32 0 27 0;
#X connect 32 0 26 0;
