#N canvas 434 57 705 551 12;
#X declare -stdpath ./;
#X obj 148 354 cos~;
#X obj 138 165 / 10;
#X text 34 146 fundamental;
#X text 27 161 (= mod freq);
#X obj 214 262 line~;
#X obj 166 296 *~;
#X obj 214 216 / 100;
#X obj 214 239 pack 0 50;
#X obj 148 331 +~;
#X text 202 288 modulating;
#X text 202 303 oscillator;
#X obj 148 442 output~;
#X obj 201 348 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 221 375 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 F11-spectrum 259 float 0;
#X coords 0 0.51 258 -0.008 270 201 1;
#X restore 369 242 graph;
#X text 363 453 0;
#X text 614 453 2700;
#X obj 138 214 *;
#X obj 138 191 t b f;
#X obj 166 267 osc~;
#X obj 103 288 phasor~;
#X text 307 96 Here's what happens if you just slide the carrier frequency around. The spectrum moves up and down all right \, but is only periodic at the original period when the center frequency roosts on a harmonic., f 50;
#X text 45 281 carrier;
#X text 24 296 oscillator;
#X text 132 90 center freq. (in tenths of fundamental), f 13;
#X text 223 348 <-- graph once;
#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 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 obj 197 506 tabwrite~ F11-spectrum;
#X connect 0 0 23 0;
#X connect 1 0 30 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 20 0;
#X connect 15 0 30 0;
#X connect 16 0 15 0;
#X connect 19 0 30 0;
#X connect 20 0 21 0;
#X connect 21 0 22 0;
#X connect 22 0 28 0;
#X connect 23 0 2 0;
#X connect 27 0 14 0;
#X connect 27 0 29 0;
#X connect 28 0 23 1;
#X connect 29 0 21 1;
#X restore 182 401 pd fft;
#X obj 63 29 cnv 5 5 25 empty empty How\ Not\ to\ Apply\ 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 50 424 pd init;
#X text 212 155 index (percent), f 9;
#X floatatom 138 138 4 0 200 0 - \$0-center-freq - 0;
#X floatatom 72 183 4 0 0 0 - \$0-fundamental - 0;
#X floatatom 214 190 4 0 500 0 - \$0-index - 0;
#X text 242 374 <-- graph repeatedly, f 11;
#X text 425 453 ---- frequency ----;
#X connect 0 0 26 0;
#X connect 0 0 11 0;
#X connect 1 0 18 0;
#X connect 4 0 5 1;
#X connect 5 0 8 1;
#X connect 6 0 7 0;
#X connect 7 0 4 0;
#X connect 8 0 0 0;
#X connect 12 0 26 1;
#X connect 13 0 26 2;
#X connect 17 0 20 0;
#X connect 18 0 17 0;
#X connect 18 1 17 1;
#X connect 19 0 5 0;
#X connect 20 0 8 0;
#X connect 30 0 1 0;
#X connect 31 0 19 0;
#X connect 31 0 17 0;
#X connect 32 0 6 0;
