#N canvas 271 50 816 600 12;
#X declare -stdpath ./;
#X obj 151 313 cos~;
#X obj 151 233 *~;
#X obj 194 313 cos~;
#X obj 235 211 wrap~;
#X obj 198 211 -~;
#X obj 194 288 +~;
#X obj 194 346 -~;
#X obj 217 372 *~;
#X obj 198 181 samphold~;
#X text 469 66 APPLYING TWO-COSINE CARRIER TO FM;
#X floatatom 198 49 4 0 200 0 - - - 0;
#X obj 198 72 / 10;
#X obj 198 124 line~;
#X obj 198 98 pack 0 50;
#X obj 130 116 phasor~;
#X floatatom 130 93 4 0 0 0 - - - 0;
#X text 329 74 index;
#X text 327 91 (percent);
#X floatatom 335 117 4 0 500 0 - - - 0;
#X obj 285 170 cos~;
#X obj 335 186 line~;
#X obj 285 221 *~;
#X obj 335 140 / 100;
#X obj 335 163 pack 0 50;
#X obj 151 259 +~;
#X text 320 218 modulating;
#X text 320 233 oscillator;
#X text 38 274 both phases-->;
#X text 24 259 add modulator to;
#X obj 199 507 output~;
#N canvas 605 126 534 605 fft 0;
#X obj 95 134 inlet~;
#X obj 209 404 inlet;
#X obj 95 266 rfft~;
#X obj 95 299 *~;
#X obj 127 299 *~;
#X obj 127 330 sqrt~;
#X obj 337 244 block~ 4096 1;
#X obj 127 356 biquad~ 0 0 0 0 1;
#X text 159 267 Fourier series;
#X text 173 318 magnitude;
#X text 173 303 calculate;
#X text 52 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 88 99 signal to analyze, f 9;
#X text 256 351 delay two samples;
#X text 254 369 for better graphing;
#X obj 202 129 samplerate~;
#X obj 236 463 metro 500;
#X obj 236 440 inlet;
#X text 284 438 toggle to graph repeatedly;
#X text 253 405 bang to graph once;
#X obj 127 380 /~ 4096;
#X obj 202 104 bang~;
#X msg 210 534 \; pd dsp 1;
#X obj 236 501 tabwrite~ F10-spectrum;
#X obj 202 152 / 4096;
#X obj 113 184 osc~;
#X obj 113 212 +~ 1;
#X obj 95 237 *~;
#X text 157 197 hanning window;
#X obj 164 142 0.5;
#X connect 0 0 27 0;
#X connect 1 0 22 0;
#X connect 1 0 23 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 20 0;
#X connect 15 0 24 0;
#X connect 16 0 23 0;
#X connect 17 0 16 0;
#X connect 17 0 22 0;
#X connect 20 0 23 0;
#X connect 21 0 15 0;
#X connect 21 0 29 0;
#X connect 24 0 25 0;
#X connect 25 0 26 0;
#X connect 26 0 27 1;
#X connect 27 0 2 0;
#X connect 29 0 25 1;
#X restore 240 432 pd fft;
#X obj 259 380 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 279 405 tgl 19 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000 0 1;
#X text 551 534 updated for Pd version 0.37;
#N canvas 0 0 450 300 (subpatch) 0;
#X array F10-spectrum 259 float 0;
#X coords 0 0.51 258 -0.008 256 130 1;
#X restore 485 293 graph;
#X text 477 424 0;
#X obj 199 400 +~;
#X text 471 99 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. 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 539 434 -- frequency --;
#X text 717 425 2700;
#X text 97 34 center freq. (in tenths of fundamental), f 13;
#X text 39 93 fundamental (= mod freq), f 12;
#X obj 622 25 declare -stdpath ./;
#X text 281 380 <-- graph once;
#X text 300 404 <-- repeatedly;
#X obj 199 466 hip~ 5;
#X connect 0 0 6 1;
#X connect 0 0 36 0;
#X connect 1 0 24 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 36 1;
#X connect 8 0 4 0;
#X connect 8 0 3 0;
#X connect 10 0 11 0;
#X connect 11 0 13 0;
#X connect 12 0 8 0;
#X connect 13 0 12 0;
#X connect 14 0 8 1;
#X connect 14 0 19 0;
#X connect 14 0 1 0;
#X connect 14 0 5 1;
#X connect 15 0 14 0;
#X connect 18 0 22 0;
#X connect 19 0 21 0;
#X connect 20 0 21 1;
#X connect 21 0 24 1;
#X connect 22 0 23 0;
#X connect 23 0 20 0;
#X connect 24 0 5 0;
#X connect 24 0 0 0;
#X connect 31 0 30 1;
#X connect 32 0 30 2;
#X connect 36 0 30 0;
#X connect 36 0 45 0;
#X connect 45 0 29 0;
