#N canvas 427 113 693 639 12;
#X declare -stdpath ./;
#X obj 162 381 *~;
#X obj 205 373 line~;
#X obj 87 382 cos~;
#X obj 87 357 +~;
#X obj 205 348 pack 0 50;
#X floatatom 205 300 4 0 100 0 - - - 0;
#X obj 205 324 / 100;
#X obj 87 332 phasor~;
#X obj 87 493 output~;
#N canvas 665 146 582 450 fft 0;
#X obj 97 106 inlet~;
#X obj 286 257 inlet;
#X obj 113 137 rfft~;
#X obj 113 170 *~;
#X obj 145 170 *~;
#X obj 113 200 sqrt~;
#X obj 113 226 biquad~ 0 0 0 0 1;
#X text 171 138 Fourier series;
#X text 182 191 magnitude;
#X text 180 176 calculate;
#X text 97 28 This subpatch computes the spectrum of the incoming signal with a (rectangular windowed) FFT. FFTs aren't properly introduced until much later.;
#X text 161 106 signal to analyze;
#X text 271 209 delay two samples;
#X text 269 227 for better graphing;
#X obj 319 311 metro 500;
#X obj 309 281 inlet;
#X text 362 279 toggle to graph repeatedly;
#X text 340 257 bang to graph once;
#X obj 97 372 tabwrite~ E09-signal;
#X obj 319 343 tabwrite~ E09-spectrum;
#X obj 113 250 /~ 4096;
#X msg 287 367 \; pd dsp 1;
#X obj 401 149 block~ 4096;
#X text 393 122 Window size;
#X connect 0 0 2 0;
#X connect 0 0 18 0;
#X connect 1 0 18 0;
#X connect 1 0 19 0;
#X connect 1 0 21 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 20 0;
#X connect 14 0 18 0;
#X connect 14 0 19 0;
#X connect 15 0 14 0;
#X connect 15 0 21 0;
#X connect 20 0 19 0;
#X restore 131 436 pd fft;
#X obj 150 412 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 191 436 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 E09-signal 882 float 0;
#X coords 0 1.02 882 -1.02 259 130 1;
#X restore 376 195 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array E09-spectrum 259 float 0;
#X coords 0 0.51 258 -0.008 259 130 1;
#X restore 377 410 graph;
#X text 424 336 ---- 0.02 seconds ----;
#X text 407 541 2;
#X text 438 541 4;
#X text 376 541 0;
#X text 556 166 WAVEFORM;
#X text 527 385 SPECTRUM;
#X text 637 526 0;
#X text 638 408 0.5;
#X obj 162 310 osc~;
#X obj 162 262 r fundamental;
#X text 240 300 index (x100);
#X text 470 541 6;
#X text 503 541 8;
#X text 531 541 10;
#X text 563 541 12;
#X text 595 541 14;
#X floatatom 87 263 3 0 15 0 - cm - 0;
#X text 31 265 carrier harmonic #, f 11;
#X text 94 60 This patch measures the spectrum of two-operator phase modulation. The carrier frequency is initially six times the modulation frequency \, but you can change it with the "carrier harmonic #" control. Changing the index changes the relative strengths of the harmonics. Past a certain index (which depends on the carrier frequency) the lower sidebands begin to reflect about the left edge of the spectrum \, causing complicated interference effects., f 71;
#X text 212 435 <-- repeatedly;
#X text 172 412 <-- graph once;
#X text 409 566 ------ partial number ------;
#X obj 62 18 cnv 5 5 25 empty empty Spectrum\ of\ Two-Operator\ Phase\ Modulation 15 13 0 16 #dfdfdf #202020 0;
#N canvas 121 101 419 471 init 0;
#X obj 134 214 samplerate~;
#X obj 102 163 bng 18 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 134 241 / 256;
#X obj 102 135 loadbang;
#X obj 134 296 s fundamental;
#X text 44 45 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., f 42;
#X msg 85 230 \; cm 6;
#X obj 93 344 declare -stdpath ./;
#X obj 102 186 t b b;
#X floatatom 134 268 9 0 0 0 - - - 0;
#X text 45 14 This subpatch initializes the patch.;
#X connect 0 0 2 0;
#X connect 1 0 8 0;
#X connect 2 0 9 0;
#X connect 3 0 1 0;
#X connect 8 0 6 0;
#X connect 8 1 0 0;
#X connect 9 0 4 0;
#X restore 249 502 pd init;
#X obj 87 308 *;
#X connect 0 0 3 1;
#X connect 1 0 0 1;
#X connect 2 0 9 0;
#X connect 2 0 8 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 10 0 9 1;
#X connect 11 0 9 2;
#X connect 22 0 0 0;
#X connect 23 0 22 0;
#X connect 23 0 38 1;
#X connect 30 0 38 0;
#X connect 38 0 7 0;
