Frequency modulation (FM) synthesis is an exciting topic: with a few simple operations, we can create complex sounds that can instantaneously change in timbre with a few simple coefficient changes.
How does it work? How to control it to produce musical notes? Why was it so popular in the 1980s? We will explore all that in this single article!
- Source code of figures and audio examples
- History
- Vibrato
- Basic FM Synth
- Simple FM Spectrum
- Timbre control of simple FM
- Modulation Index
- Phase Modulation
- How to control the timbre of FM?
- Extensions of simple FM
- Summary
- Bibliography
Source code of figures and audio examples
All figures and audio examples in this article were generated using the following Python script. Feel free to use and tweak it to your needs!
History
Just as a brief word of history, to give credit to people’s hard work, the original publication on FM synthesis came from John Chowning in 1973 [Chowning1973]. Because of the lack of interest of American manufacturers in using the technique in hardware synths, Chowning turned to Japan-based manufacturer Yamaha in the same year. [SOS2000]
However, it wasn’t until 1983, when the first widely successful FM synth was introduced, namely, Yamaha DX7 [Wikipedia]. It took the market by storm and spawned a host of FM-based hardware synths.
That 10-year gap should tell you how much engineering effort was required to make FM commercially usable!
Vibrato
Before we delve into the frequency modulation synthesis, we should consider what is vibrato.
Vibrato is an effect of a sound varying up and down in pitch. In other words, vibrato is a periodical pitch variation [Zölzer2011].
In this sense, we modulate the pitch. To achieve the vibrato, the modulation must be quite slow: in the range of 5-14 Hz [Zölzer2011]. Note that this range is below the human hearing range, which is typically associated with the 20-20 000 Hz range.
Here’s how a single musical note (a sine representing the MIDI note 57) sounds without the vibrato.
Here’s how the same note sounds when we apply a 6 Hz vibrato to it with a modulation index 2 (which means that the pitch should change by +/- 12 Hz).
It turns out that if we increase the vibrato frequency and the range over which we change the pitch, we stop hearing a variation in pitch and start hearing a completely different timbre. That is the basis of frequency modulation synthesis.
Basic FM Synth
Let’s now consider a basic frequency modulation instrument.
In FM, we modulate the frequency of a carrier waveform. It means that the instantaneous frequency of the waveform (waveform’s frequency at a particular time instant) is constantly being changed by a modulator (another waveform) in a regular, periodic fashion.
In the simplest FM setup, a sine modulator modulates a sine carrier. In this scenario, the output signal’s instantaneous frequency
where
is the frequency of the carrier in Hz, the carrier frequency, is the amplitude of the modulator (unitless), is the cosine function, is the frequency of the modulator in Hz, the modulation frequency, and is time in seconds.
To create a sine oscillator whose frequency changes according to Equation 1, we cannot simply put it into the sine formula like this
because it’s not mathematically correct. Here,
If we would apply the thing in “Equation” 2 to generate a signal where
Instead, we need to use the fact that angular frequency is the derivative of phase [Farina2000]. Mathematically speaking,
where
is the instantaneous angular frequency in radians per sample, denotes the instantaneous phase (phase at time instant ), and denotes the derivative of a function over time.
Note: if you don’t know what a derivative is, it is a measure of how much a given function changes at every point in time. The derivative is also a function. If you think about Equation 3, it makes total sense: if the phase changes rapidly, the derivative is large, and the frequency is high; if the phase changes slowly, the derivative is small, and the frequency is low.
The argument of a sine is the phase NOT the frequency. In order to obtain the phase from the equation for frequency (Equation 3), we must perform an operation that is inverse to derivation, namely, integration.
Note: Want to understand the mathematics of DSP? Check out my online course on digital audio signal processing for beginners!
Proper FM Formula
Now, we can plug the formula for the phase (Equation 4) as the argument of a sine function.
This is the correct formula for a simple FM instrument; we have a sine carrier with amplitude
Simple FM Diagram
FM variants are most often explained on the basis of diagrams. The diagrams can easily show how the interconnection between the oscillators are placed much like in graphical audio programming languages like Max/MSP or PureData.
Here is the diagram of a simple FM instrument [Pluta2019, Dodge1997].
Each box with a sine symbol inside is an oscillator. The plus “+” in a circle denotes sample-wise signal summation.
Simple FM Spectrum
Although FM synthesis timbres sound quite complex, their spectrum structure is very straightforward. The partials are centered around the carrier frequency
You can see exactly how it looks in the frequency domain in this figure.
In the middle, there is the carrier frequency and on its sides are the sidebands.
In general, the frequency of each partial
where
is the carrier frequency in Hz, is the modulator frequency in Hz, and is any integer (that’s what means).
Partials vs harmonics vs overtones
To avoid confusion, let me just quickly define partials, harmonics, and overtones.
Various sources use various definitions but I rely on a distinct meaning of each of these terms.
- A partial is a spectrum member.
- A harmonic is a member of a harmonic spectrum, i.e., spectrum whose partials are in a mathematical relation to each other (e.g., in a sawtooth, harmonics are integer multiples of the fundamental frequency).
- An overtone is a harmonic that is not the fundamental frequency.
The first harmonic is the fundamental frequency. The second harmonic is the first overtone.
Acoustic instrument spectra often consist of harmonic partials, inharmonic partials, and noise.
Timbre control of simple FM
One of the goals of FM synthesis research was to be able to use a MIDI keyboard to control it. That means we need a way of keeping the timbre somewhat consistent while changing the pitch.
It turns out that if the ratio of the carrier frequency to the modulation frequency is constant, the partials’ structure is preserved.
In other words, if we multiply the carrier frequency by some real constant, we need to multiply the modulation frequency by the same constant in order to keep the partials’ structure intact.
The frequency ratio is sometimes denoted
If
Let’s look at an example. (From now on, you can assume that
Here’s a sound generated with
Here’s its spectrum.
Let’s now generate a sound that’s twice higher in pitch but has a similar timbre. According to the frequency ratio (Equation 7),
In this particular case, it suffices to double the modulation frequency
Here’s the resulting sound generated with
And here’s its spectrum.
You can hear that the octave-higher version has a similar timbre and the partials are correctly spaced, yet their amplitudes look a little bit different. That is because we have not changed the modulation amplitude. If we set
Here’s its spectrum.
As you can hear, this last one sounds more like the original. As you can see, the partials’ structure is completely preserved, they are just spaced apart more because of the higher pitch.
Why did we need to change the modulation amplitude as well? Because the amplitude of each partial is determined by both the amplitude and the frequency of modulation [Dodge1997]. The meaning of the modulation amplitude at modulation frequency equal to 400 Hz is different from its meaning when the modulation frequency is equal to 800 Hz.
That’s why we need to use a different parameter to control the timbre: the modulation index.
Modulation Index
To have a parameter that controls the timbre in a consistent way across all modulation frequencies, it’s more handy to use the modulation index than the modulation amplitude. Modulation index will change the modulation amplitude according to the current modulator frequency.
Here’s the formula for the modulation index
where
is the modulation amplitude, and is the modulation frequency.
We can plug this formula into our simple FM equation (Equation 5)
In our previous example, initially we had
After raising the pitch by an octave, we had
The key takeaways are:
- use modulation index instead of the modulation amplitude to preserve partials’ amplitudes when changing pitch, and
- use constant carrier-to-modulator frequency ratio to preserve partials’ frequencies.
In other words: to preserve the timbre when changing pitch, keep the modulation index
Now, our simple FM diagram looks as follows.
Again, a box with a sine symbol inside denotes an oscillator. The plus “+” in a circle denotes sample-wise signal summation. The asterisk “
Phase Modulation
Since we’ve just revisited the simple FM equation (Equation 10), let’s do one more adjustment to it. If we are less mathematically strict and we attempt to solve the integral in the carrier oscillator’s phase, we obtain the following FM equation [Pluta2019, Tolonen1998]
where
is the carrier amplitude, is the carrier frequency in Hz, is time in seconds, is the modulation index, is the modulator frequency in Hz.
Why do I say that we are “less mathematically strict”? Well, that’s because
What’s the difference? That’s a great question.
Most sources I’ve seen say that the difference between the two is not relevant [Pluta2019, Roads1996, Tolonen1998, DePoli1983] and point to two articles [Bate1990, Holm1992] that explain the difference.
The answer I found in [Holm1992] is that FM and PM are equivalent if the sampling rate is high enough. Then, the numerical integration used to implement the FM equation (Equation 10) approximates the continuous time integration accurately enough. On the other hand, inaccurate integration (when the sample rate is too small) results in diverging partials’ amplitudes between FM and PM.
Take a look at this example. Here,
When the sampling rate is equal to 96 kHz, we obtain the following magnitude spectra of PM and FM.
As you can see, the spectra nicely overlap. Audibly, there is no difference either.
FM at 96 kHz:
PM at 96 kHz:
However, if we decrease the sampling rate to 22.05 kHz…
…the partials’ amplitudes differ much more. FM has stronger first, second, and fourth partial, while PM has stronger third partial.
We can also start hearing a difference between the two sounds.
FM at 22.05 kHz:
PM at 22.05 kHz:
To my ear, the FM sound has a more pronounced low-frequency partial.
That’s in essence the difference between FM and PM: at high enough sampling rates, they are equivalent. The lower the sampling rate, the more their partials’ amplitudes differ.
To drive this point home, let’s take a look at time-domain plots of a carrier at 600 Hz, a modulator at 50 Hz, and the resulting FM and PM signals (
As you can see, they are identical.
Looking at Equations 10 and 11, you can tell that implementation-wise it’s way easier to use PM and that’s what we’ll do for the remainder of this article.
So, from now on, our go-to formula for frequency modulation will be the PM formula (Equation 11). This is the formula that we will analyze in the context of FM. So everywhere I write “FM” from now on, I refer to PM.
Just like synth manufacturers!
Key takeaway: FM and PM only differ at low sampling rates. For implementation, use phase modulation (Equation 11).
How to control the timbre of FM?
We said that if the ratio of the carrier frequency to the modulator frequency
To answer this, we must answer a different question first…
When is FM spectrum harmonic?
Harmonic spectra are obtained only if
Let’s look at a few examples and listen to them. In all of them,
As you could hear, as long as
Let’s listen to an extreme example of
Even here, we still hear a harmonic sound. And that’s despite the “beating” effect caused by inharmonic partials close to harmonic ones.
Apart from the rational ratio requirement, the literature says that if we want to obtain a clearly audible pitch,
What if they aren’t small?
Let’s listen to an example with
Here, we can hear what happens when the small ratio requirement is neglected: although the ratio is rational, we have a sense of inharmonicity. The inharmonicity is caused by reflected partials: partials with negative frequencies that are being mirrored back onto the positive frequency axis. Thus, the sound is not as clearly harmonic as in the previous examples with rational
Key takeaway: if you want your FM sound to be harmonic, keep the carrier frequency to modulator frequency ratio rational and relatively small in numerator and denominator.
What’s the fundamental frequency (the pitch) in FM?
The fundamental frequency is the difference between the harmonic partials’ frequencies and is typically the lowest harmonic partial. The pitch is the sensation of the perceived height of a sound and is most often associated with the fundamental frequency. In the following, I use the two interchangeably.
In FM, if the ratio of the carrier frequency to the modulator frequency is rational, i.e.,
So if you want to generate a sound with a specific carrier-to-modulator-frequency ratio
That’s how I generated the above harmonic and inharmonic examples: by setting
How to eliminate every -th harmonic?
The carrier-to-modulator frequency ratio
Specifically,
-
If
, all harmonics are present. Example ( ):
-
If
is even, the spectrum is odd, i.e., only odd partials are present. Example ( ):
Note the missing second, fourth, sixth, and eighth harmonics.
-
If
, every third harmonic is missing. Example ( ):
In general, if
How to control the brightness of FM spectra?
The brightness of a sound is typically associated with the presence of high frequencies. In FM synthesis, we can control the center of the sound’s spectrum with the carrier frequency, the spacing of the partials with the modulator frequency, and the bandwidth of the spectrum with the modulation frequency and the modulation index. If we want to change the bandwidth of the spectrum (resulting in a brightness change) without changing the pitch, we can simply alter the modulation index.
Specifically, John Chowning computed the bandwidth of a simple FM sound as [Chowning1973]
where
Let’s look at some examples using
Let’s set
And here’s its spectrum.
As you can see, its bandwidth is
Here,
As you can hear and see, the spectrum got wider and as a result, it sounds brighter.
Here,
Here,
As you can hear and see, the spectrum gets so wide that it expands over to negative frequencies. Negative frequencies get reflected back and hence the spectrum is no longer symmetric. However, it is still harmonic because just the amplitudes of the partials changed after the reflection, not their positions.
Here,
This spectrum is clearly the brightest and it’s not symmetric. We could go even further than this but I’d leave it for your experimentation 🙂
FM Efficiency
At this point, I would like to point out how efficient in generating rich sounds FM is. With just two table lookups (to get the values of the carrier and the modulator) we are able to generate quite elaborate spectra. With a few simple controls, we are able to change it in a significant but meaningful way. This low computational effort paired with powerful sonics was the reason why FM was one of the first synthesis techniques (if not the first) to be successfully implemented with digital electronics. In the 1980s, the chips were too weak to efficiently implement the alternatives like additive or subtractive synthesis.
If you want to learn how to efficiently generate a sine (or any waveform for that matter) using table lookup, check out my wavetable synthesis tutorial!
How to control the partials’ amplitudes? Bessel functions
In the examples so far, we could see that the FM spectrum definitely has some pattern to it. Can we accurately predict what the partials’ amplitudes will be for given parameters?
It turns out that we can. As the literature reports [Chowning1973, DePoli1983, Pluta2019], we can write out the PM equation (Equation 11) as
where
is the sum operator; in the above equation, it is an infinite sum where each summand corresponds to one integer value assigned to ; here, each value of corresponds to one partial, is a Bessel function of the first kind of order whose argument is the modulation index , denotes the absolute value, is the carrier frequency in Hz, is the modulator frequency in Hz, is time in seconds.
Bessel functions are a very important concept in mathematics. They appear in the solution of the wave equation: the basic equation of acoustics.
Here’s how Bessel functions of the first kind look for orders from 0 to 3.
These are sine-like functions that decrease in amplitude the higher the absolute value of the argument. You can also observe that Bessel functions of even orders are even (symmetrical with respect to the
What is more important, Bessel functions cross the value of 0 for many values of the argument
It’s hard to get a feeling for the meaning of the partials’ amplitudes equation (Equation 16) without any visuals. Thus, here you can see a plot of how the spectrum changes if we vary the modulation index
How to read this plot? Say you want to see how the spectrum looks for a particular value of
You can see what I mean on the figure below.
The 3D Bessel functions plot (Figure 24) gives you the full insight into the spectrum of FM sounds. You can go back to this plot over and over again to discover more and more properties of the FM spectrum. As you can see, it is completely frequency-independent; for each fundamental frequency, the partials behave identically. Of course, this plot does not take reflected frequencies into account but you can visualize them yourself 😉
Extensions of simple FM
What we have discussed so far is “simple FM”, i.e., we have one sine carrier and one sine modulator.
Simple FM can be extended in various ways to create even more complex sounds [Pluta2019]:
- We can add feedback, where the output of an FM instrument modulates the modulator. We can do this for any setup of carriers and modulators but the most popular approaches use one, two, or three oscillators within the feedback loop.
- We can add multiple carriers modulated by the same oscillator. This is called multiple-carrier FM (MCFM). It can be used to create formants in the sound spectrum.
- We can have non-sine carriers or modulators. However, non sinusoid modulators can result in very dense spectra, so we should be careful when using harmonically rich modulators [Dodge1997].
- We can add multiple modulators, parallel or serial, that modulate one carrier. This is called multiple-modulator FM (MMFM). This technique increases the number of partials in the output spectrum. Again, multiple non-sine modulators make little sense because the spectrum gets too dense [Dodge1997].
- We can use oscillators with exponential control which emulates analog gear. This is called exponential FM. Exponential FM is used in Virtual Analog applications.
- We can combine two or more FM instruments in parallel or in serial. However, this may quickly get too complicated to control.
- We can add envelope generators (EGs) to control various FM parameters. For example, an envelope generator controlling the modulation index can create a naturally sounding effect of timbre brightening with the initial transient. An EG-controlled timbre gets darker and darker the longer the sound is played (or a keyboard key is held).
- Phase distortion (PD) synthesis is another take on phase modulation. In this technique, the modulator frequency is equal to the carrier frequency or to its multiplicity. Moreover, various modulator waveforms are used, for example, a triangle waveform. A picture sometimes says a thousand words, so here’s a very short but very good explanation of phase distortion synthesis (accessed February 10, 2024). Oli Larkin, whom I interviewed in the 15th episode of the WolfTalk podcast, is well known for his implementations of Casio’s phase distortion emulations.
The discussion of all these extensions is beyond the scope of this already quite long article. Should they be discussed in more detail in future articles? Let me know in the comments!
Summary
In this comprehensive article, you’ve learned about the frequency modulation (FM) and phase modulation (PM) synthesis. You’ve learned how these two are different, how their spectra look and how to control these spectra.
You’ve also learned what Bessel functions are and how the partials’ amplitudes in FM synthesis follow Bessel functions with increasing modulation index.
You’ve learned what the modulation index is and how to use it to control the bandwidth of FM spectra.
Finally, we have mentioned various extensions to the simple FM technique.
In future articles, we will look into how to implement the PM synthesis technique using various programming languages. So look out for those!
If you want to become an audio developer today, check out my free Audio Developer Checklist. It lists every bit and piece of knowledge I believe is necessary to become a full-fledged audio programmer and be able to create software synths, for example, with FM synthesis.
Bibliography
[Bate1990] John A. Bate, The Effect of Modulator Phase on Timbres in FM Synthesis, Computer Music Journal Vol. 14, No. 3, Autumn 1990.
[Chowning1973] Original FM paper by John Chowning: John M. Chowning, The Synthesis of Complex Audio Spectra by Means of Frequency Modulation, J. Audio Eng. Soc. 21, 7, 1973. [PDF, accessed March 5, 2025]
[DePoli1983] Giovanni De Poli, A Tutorial on Digital Sound Synthesis Techniques, Computer Music Journal 7(4), October 1983 [PDF, accessed March 5, 2025]
[Dodge1997] Charles Dodge, Thomas A. Jerse, Computer Music: Synthesis, Composition, and Performance, 2nd ed., Schirmer Books, 1997.
[Farina 2000] Angelo Farina, Simultaneous Measurement of Impulse Response and Distortion With a Swept-Sine Technique, 108th AES Convention, Paris, France, 2000. [PDF, accessed March 5, 2025]
[Holm1992] Frode Holm, Understanding FM Implementations: A Call for Common Standards, Computer Music Journal Vol. 16, No. 1, Spring 1992.
[Pluta2019] Marek Pluta, Sound Synthesis for Music Reproduction and Performance, monograph, AGH University of Science and Technology Press 2019. [PDF, (accessed March 6, 2025)]
[SOS2000] Gordon Reid, An Introduction To Frequency Modulation, Synth Secrets, Sound on Sound. (accessed March 5, 2025)
[Tolonen1998] Tero Tolonen, Vesa Välimäki, and Matti Karjalainen, Evaluation of Modern Sound Synthesis Methods, Report 48, Helsinki University of Technology, Espoo 1998. [NOT SECURE PDF, accessed March 5, 2025]
[Wikipedia] Frequency modulation synthesis, Wikipedia. (accessed March 5, 2025)
[Zölzer2011] Udo Zölzer et al., DAFX: Digital Audio Effects, 2nd ed., Helmut Schmidt University – University of the Federal Armed Forces, Hamburg, Germany: John Wiley & Sons Ltd, 2011.
Comments powered by Talkyard.