6.5 Frequency modulation

6.5 Frequency modulation#

Vibrato wavers frequency slowly, by a few Hz. But what happens if we modulate the frequency quickly, at audio rates? The answer is frequency modulation (FM) synthesis, one of the most important discoveries in the history of computer music. FM can conjure extraordinarily rich, evolving spectra from just two oscillators, which made it both musically striking and cheap enough to run on 1980s hardware (like the DX7 from Chapter 0).

The classic definition of FM looks like this:

Definition 19 (Frequency modulation)

Given a carrier frequency \(f_c\), a modulating frequency \(f_m\), and a depth \(D\) (in Hz), frequency modulation (FM) synthesis nests one sinusoid inside the phase of another:

\[\text{FreqMod}(t) = \sin\!\left(2\pi f_c t + \frac{D}{f_m}\sin(2\pi f_m t)\right).\]

This has roughly the shape we might expect for an implementation of vibrato: two sinusoids, with one nested inside the other. But it raises questions. Why does the modulating sinusoid appear to modulate the carrier’s phase rather than its frequency \(f_c\)? And what happened to the integral from the previous section? To answer these questions, let us derive the formula from first principles using our time-varying oscillator.

We begin with the basic sinusoid with time-varying frequency, for which we now have a correct implementation:

\[\text{FreqMod}(t) = \sin\!\left(\int_0^t \omega(\tau)\, d\tau\right).\]

Now we design a time-varying frequency inspired by vibrato: a carrier frequency \(f_c\) that wavers up and down by a depth \(D\) (in Hz) at a modulating frequency \(f_m\):

\[\omega(\tau) = 2\pi\big[f_c + D\sin(2\pi f_m \tau)\big].\]

Substituting and integrating, the constant carrier term contributes \(2\pi f_c t\), and the modulating term integrates from a sine into a cosine:

\[\int_0^t \omega(\tau)\, d\tau = 2\pi f_c t - \frac{D}{f_m}\cos(2\pi f_m t) + \frac{D}{f_m}.\]

The final \(+\tfrac{D}{f_m}\) is a constant phase offset, which we cannot hear, so we drop it. The remaining \(-\tfrac{D}{f_m}\cos(2\pi f_m t)\) is a cosine, but \(-\cos(\theta) = \sin(\theta - \tfrac{\pi}{2})\), so it is just a sine with a phase offset that we also cannot hear. Replacing it with a plain sine yields the classic formula:

\[\text{FreqMod}(t) = \sin\!\left(2\pi f_c t + \frac{D}{f_m}\sin(2\pi f_m t)\right).\]

This answers our questions. The integral is still there, it has simply been evaluated in closed form, which is why it disappears from the final expression. And the modulator appears to modulate phase because integrating a frequency gives a phase. The two views, modulating frequency and modulating phase, are just two different forms of the same phenomenon.

A gentle FM tone: carrier 440 Hz, modulator 6 Hz, small depth. With a slow, shallow modulator, FM is simply vibrato.