#N canvas 60 64 834 697 12;
#X obj 168 476 cos~;
#X obj 168 430 *~;
#X obj 211 478 cos~;
#X obj 252 379 wrap~;
#X obj 215 378 -~;
#X obj 211 455 +~;
#X obj 209 513 -~;
#X obj 230 539 *~;
#X obj 215 348 samphold~;
#X text 167 6 APPLYING TWO-COSINE CARRIER TO FM;
#X floatatom 232 228 4 0 200 0 - - -;
#X obj 232 251 / 10;
#X text 232 147 center;
#X obj 232 300 line~;
#X text 232 167 freq. (in;
#X text 232 187 tenths of;
#X text 232 207 fundamental);
#X obj 232 277 pack 0 50;
#X obj 121 283 phasor~;
#X floatatom 121 260 4 0 0 0 - - -;
#X text 106 207 fundamental;
#X text 106 227 (= mod freq);
#X text 435 254 index;
#X text 435 274 (percent);
#X floatatom 435 295 4 0 500 0 - - -;
#X obj 385 361 cos~;
#X obj 435 364 line~;
#X obj 385 384 *~;
#X obj 435 318 / 100;
#X obj 435 341 pack 0 50;
#X obj 168 453 +~;
#X text 388 410 modulating;
#X text 388 430 oscillator;
#X text 40 452 both phases-->;
#X text 9 435 add modulator to;
#X obj 233 632 output~;
#X obj 232 601 hip~;
#N canvas 122 211 558 609 fft 0;
#X obj 23 55 inlet~;
#X obj 210 303 inlet;
#X obj 27 215 rfft~;
#X obj 27 248 *~;
#X obj 58 248 *~;
#X obj 27 278 sqrt~;
#X obj 334 200 block~ 4096 1;
#X obj 27 304 biquad~ 0 0 0 0 1;
#X text 91 216 Fourier series;
#X text 96 269 magnitude;
#X text 94 254 calculate;
#X text 21 3 This subpatch computes the spectrum of the incoming signal
with a (rectangular windowed) FFT. FFTs aren't properly introduced
until much later.;
#X text 83 61 signal to analyze;
#X text 195 255 delay two samples;
#X text 193 273 for better graphing;
#X obj 292 79 samplerate~;
#X obj 240 352 metro 500;
#X obj 240 329 inlet;
#X text 293 327 toggle to graph repeatedly;
#X text 264 303 bang to graph once;
#X obj 27 328 /~ 4096;
#X obj 292 54 bang~;
#X msg 211 413 \; pd dsp 1;
#X obj 237 390 tabwrite~ F10-spectrum;
#X obj 292 102 / 4096;
#X obj 58 135 osc~;
#X obj 58 163 +~ 1;
#X obj 28 188 *~;
#X text 113 138 hanning window;
#X obj 254 79 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 286 601 pd fft;
#X obj 346 580 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 346 601 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X text 367 600 <-- repeatedly;
#X text 368 580 <-- graph once;
#X text 580 663 updated for Pd version 0.37;
#N canvas 0 0 450 300 graph1 0;
#X array F10-spectrum 259 float 0;
#X coords 0 0.51 258 -0.008 256 130 1;
#X restore 560 386 graph;
#X text 552 517 0;
#X obj 207 565 +~;
#X text 31 30 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.
;
#X text 614 527 -- frequency --;
#X text 792 518 2700;
#X connect 0 0 6 1;
#X connect 0 0 45 0;
#X connect 1 0 30 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 45 1;
#X connect 8 0 4 0;
#X connect 8 0 3 0;
#X connect 10 0 11 0;
#X connect 11 0 17 0;
#X connect 13 0 8 0;
#X connect 17 0 13 0;
#X connect 18 0 8 1;
#X connect 18 0 25 0;
#X connect 18 0 1 0;
#X connect 18 0 5 1;
#X connect 19 0 18 0;
#X connect 24 0 28 0;
#X connect 25 0 27 0;
#X connect 26 0 27 1;
#X connect 27 0 30 1;
#X connect 28 0 29 0;
#X connect 29 0 26 0;
#X connect 30 0 5 0;
#X connect 30 0 0 0;
#X connect 36 0 35 0;
#X connect 36 0 35 1;
#X connect 38 0 37 1;
#X connect 39 0 37 2;
#X connect 45 0 36 0;
#X connect 45 0 37 0;
