A student of mine showed me the Native Instruments FM8 Virtual Instrument the other day - it’s an amazing piece of software. I have to admit two things, though. First, I’ve never been all that wild about the FM synth sound, which I associate with chimey ’80s keyboards like the Yamaha DX7. Second, probably as a result of my general lack of enthusiasm for the FM sound, I’ve never taken the time to learn how FM synthesis actually works. The FM8 sounded really cool though, and it piqued my curiosity. So I printed out a copy of the 1973 article “The Synthesis of Complex Audio Spectra by Means of Frequency Modulation,” by John Chowning, and read up. It gets into some pretty heady math, but at the bottom of it all is a simple formula that is easy to implement in software: $sin(2\pi{}f_c + \beta sin(2\pi{}f_m))$

In essence, a carrier frequency $$f_c$$, a modulation frequency $$f_m$$ and a modulation index $$\beta$$ interact to generate a wide variety of harmonic and inharmonic sounds. Looking at the equation, it’s clear that if $$\beta = 0,$$ the result is simply the carrier frequency. As $$\beta$$ increases, the modulator “steals” energy from the carrier and spreads it around to side bands. The FM8 takes the above and adds multiple layers, so that one FM sound can be the carrier for another, and that sound can in turn be the carrier for yet another sound, and so on, up to eight layers deep. In addition, at each layer, filters, LFOs and envelope generators can be applied, making it incredibly flexible. I may have to buy one.

In the meantime, I’ll have to settle for my very humble Python version, which can only generate single notes in not-real time, but which is still fun to play around with.

A simple example: 220 Hz carrier, 220 Hz modulation frequency, modulation index of 1

Increasing the modulation index to 10 results in a much more complex waveform and harmonic spectrum.

Using an irrational modulation frequency ()100*\pi)) results in a non-harmonic spectrum and a very metallic tone:

Plotting the same carrier and modulation frequencies with increasing modulation indeces shows how the harmonic complexity changes with the modulation index. In this example the plots have not been normalized along the Y axis. This makes it easier to see the relative energies of the carrier frequency and the side bands.

A little movement can be added to the sound by ramping the modulation from one value to another and using a modulation frequency that is a few hertz from an integer multiple of the carrier frequency.