#N canvas 275 43 920 617 12;
#X declare -stdpath ./;
#X obj 231 164 *~;
#X floatatom 231 107 4 0 0 0 - - - 0;
#X obj 319 144 line~;
#X floatatom 135 121 4 0 0 0 - - - 0;
#X obj 135 245 cos~;
#X obj 135 191 +~;
#X obj 231 132 osc~ 0;
#X obj 319 118 pack 0 50;
#X floatatom 319 65 4 0 0 0 - - - 0;
#X obj 319 92 / 100;
#X text 293 27 modulation index;
#X text 293 42 in hundredths;
#X text 132 78 carrier;
#X text 131 96 frequency;
#X text 216 83 frequency;
#X text 217 66 modulation;
#X text 64 132 carrier;
#X text 33 177 phase;
#X text 46 230 output;
#X text 68 30 PHASE MODULATION;
#X text 66 395 Most implementations of "FM" actually use phase \, not frequency \, modulation \, because it extends in a more natural way to "multi-operator FM" with three or more oscillators.;
#X text 66 451 To do phase modulation \, we split the "carrier oscillator" into its phase calculation (phasor~) and its waveform lookup (cos~). These together would be equivalent to an osc~ object \, but the "+~" between them adds the modulating oscillator's output to the phase.;
#X text 530 476 We also have to use a line~ to smooth changes in the modulation index \, which wasn't necessary in the previous patch., f 45;
#X obj 135 148 phasor~;
#X obj 167 574 cos~;
#X obj 167 546 phasor~;
#X text 110 556 this:;
#X text 269 549 is the same;
#X text 270 568 as this:;
#X obj 385 561 osc~;
#N canvas 0 0 450 300 (subpatch) 0;
#X array cos-out 441 float 0;
#X coords 0 1 440 -1 200 140 1 0 0;
#X restore 676 204 graph;
#X obj 250 263 tabwrite~ phase-out;
#X obj 240 290 tabwrite~ cos-out;
#X obj 135 322 output~;
#X text 636 559 updated for Pd version 0.37;
#X text 531 392 The "modulation" index \, which in true FM is in units of Hertz \, is dimensionless for phase modulation. "Good" values tend to be between 0 and 1... in this patch the index is in hundredths., f 45;
#X text 66 147 phase =>;
#X text 32 192 modulation =>;
#X text 45 246 waveform =>;
#X text 264 225 <= graph them;
#X obj 691 55 declare -stdpath ./;
#X obj 240 225 bng 19 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#N canvas 0 0 450 300 (subpatch) 0;
#X array phase-out 441 float 0;
#X coords 0 1 440 0 200 140 1 0 0;
#X restore 432 204 graph;
#X obj 187 233 wrap~;
#X text 370 143 (the index is ramped to avoid clicks.);
#X text 413 332 0;
#X text 416 197 1;
#X text 661 199 1;
#X text 652 331 -1;
#X connect 0 0 5 1;
#X connect 1 0 6 0;
#X connect 2 0 0 1;
#X connect 3 0 23 0;
#X connect 4 0 32 0;
#X connect 4 0 33 0;
#X connect 5 0 4 0;
#X connect 5 0 43 0;
#X connect 6 0 0 0;
#X connect 7 0 2 0;
#X connect 8 0 9 0;
#X connect 9 0 7 0;
#X connect 23 0 5 0;
#X connect 25 0 24 0;
#X connect 41 0 31 0;
#X connect 41 0 32 0;
#X connect 43 0 31 0;
