—> To Continue with Chapter 4

FM Synthesis

FM applet

Installed

One goal of synthesis design is to find
efficient algorithms, which don’t take a lot of computation, to generate rich sound palettes. Frequency Modulation synthesis (FM) has traditionally been one of the most popular techniques in this regard, and it's a good way to communicate some basic concepts about sound synthesis. You’ve probably heard of frequency modulation— it is the technique used in FM radio broadcasting. We took a look at AM in the previous section.

The History of FM Synthesis

FM techniques have been around since the early twentieth century, and by the 1930s, FM theory for radio broadcasting was well-documented and understood. It was not until the 1970s though, that a certain type of FM was thoroughly researched as a musical synthesis tool. In the early 1970s, John Chowning, a composer and researcher at Stanford University, developed some important new techniques for music synthesis using FM.

Chowning's research paid off. In the early 1980's the Yamaha Corporation introduced their extremely popular
DX line of FM synthesizers, based on Chowning's work. The DX-7 keyboard synthesizer was the top of their line, and it quickly became the digital synthesizer for the 80's, making its mark on both computer music and synthesizer-based pop and rock, and the most popular synthesizer in history.

FM turned out to be good for creating a wide variety of sounds, although it is not as flexible as some other types of synthesis. Why has FM been so useful? Well, it's simple, easy to understand, and allows users to tweak just a few "knobs" to get a wide variety of sonic variation. Let's take a look at how FM works and listen to some examples.

Simple FM

Figure .x

The Yamaha DX-7 Synthesizer was an extraordinarily popular instrument in the 1980s, and was partly responsible for making electronic and computer music a major industry.

Thanks to Joseph Rivers and The Audio Playground Synthesizer Museum for this photo.


In its simplest form FM involves two sinewaves. One is called the modulating wave, the other the carrier wave. In FM synthesis, the modulating wave changes the frequency of the carrier wave. It can be easiest to visualize, understand, and hear when the modulator is low frequency.


Vibrato


Vibrato sound: Carrier: 500 Hz, Modulator Frequency: 1 Hz, Modulator Index: 100

FM can create vibrato when the modulating frequency is less than 30 Hz. Okay, so it's still not that exciting — that's just because everything is moving slowly. We’ve created a very slow, weird vibrato! That's because we were doing low frequency modulation. In the sound example above, the frequency (fc) of the carrier wave in this example is 500Hz and the modulating frequency (fm) is 1Hz. 1Hz means one complete cycle each second, so you should hear the frequency of the carrier rise, fall and return to its original pitch once each second.

Equation for FM: fc = carrier frequency, m(t) = modulating signal, Ac= carrier amplitude.

Note that the frequency of the modulating wave is the rate of change in the carrier’s frequency. Although you can’t tell from this example, it also turns out that the amplitude of the modulator is the degree of change of the carrier’s frequency, and the waveform of the modulator, is the shape of change of the carrier’s frequency.

In the figure above showing the
unit generator diagram for frequency modulation (remember, we showed you one of these in the previous section), note that each of the sinewave oscillators has two inputs, one for frequency, and one for amplitude. For our modulating oscillator we are using 1Hz as its frequency, which becomes fm to the carrier (that is the frequency of the carrier is changed 1 time per second). The modulator's amplitude is 100, which will determine how much the frequency of the carrier gets changed (at a rate of 1 time per second).

The amplitude of the modulator is often called the modulation depth, since this value that determines how high and low the frequency of the carrier wave will go. In the sound example, the fc ranges from 400Hz to 600Hz (500Hz - 100Hz to 500Hz + 100Hz). If we change the depth to 500Hz, then our fc would range from 0Hz to 1000Hz. Humans can only hear sounds down to about 30Hz, so there should be a moment of silence each time the frequency dips below that point.

Vibrato sound: Carrier: 500 Hz, Modulator Frequency: 1 Hz, Modulator Index: 500


Generating Spectra with FM

If we raise the frequency of the modulating oscillator above 30 Hz we can start to hear more complex sounds. We can make an analogy to being able to see the spokes of a bike wheel if it rotates slowly, but once the wheel starts to rotate faster a visual blur starts to occur.

So it is with FM, when the modulating frequency starts to speed up, the sound becomes more complex. The tones you heard sliding around are called sidebands, and are extra frequencies located on either side of the carrier frequency. Sidebands are the secret to FM synthesis. The frequencies of the sidebands (called, as a group, the spectra) depends on the ratio of fc to fm. Chowning, in a famous article, showed how to predict where those sidebands would be, using a simple mathematical idea called Bessel Functions. By controlling that ratio (called the FM index), and using Bessel functions to determine the spectra, you can create a wide variety of sounds, from noisy jet engines to a sweet sounding Fender Rhodes.

Soundfile .x

A 3-D plot of the first 15 Bessel functions. These functions are used to determine the strength of the sidebands that result from doing simple FM synthesis with a given modulation index (I). At I = 0, all of the energy is concentrated at the 0th sideband. As I increases, the energy begins to spread out according to the shapes of the functions.

Bell-like sound. Carrier: 100 Hz, Modulator Frequency: 280 Hz, FM Index: 6.0 ->0
Bass Clarinet-type sound. Carrier: 250 Hz, Modulator Frequency: 175 Hz, FM Index: 1.5 ->0
Trumpet-like sound: Carrier: 700 Hz, Modulator Frequency: 700 Hz, FM Index: 5.0 ->0
FM sound: Carrier: 500 Hz, Modulator Frequency: 500 -> 5000 Hz, FM Index: 10
Some simple 2 carrier FM sounds with Modulating frequencies above 30 Hz.

An Honest to Goodness Computer Music Example of FM (using Csound)

One of the most common computer languages for synthesis and sound processing is called Csound, developed by Barry Vercoe at MIT. Csound is popular because it is powerful, easy to use, public domain, and runs on a wide variety of platforms. It has become a kind of lingua franca for computer music. Csound divides the world of sound into orchestras, which consist of instruments which are essentially unit generator designs for sounds, and scores (or note lists), which tell how long, loud, etc. to play sounds from your orchestra.

The code below is an example of a simple FM instrument in Csound. You don't need to know what most of it means (though by now, a lot of it should be self-explanatory, like sr, which is just the sampling rate). However, take a close look at the line:

asig foscil p4*env, cpspch(p5), 1,3,2,1 ; simple FM

Commas separate the various parts of this command.

    Asig is simply a name for this line of code, so we can use it later (out aseg).

    foscil is a predefined Csound unit generator, which is just a pair of oscillators that implements simple frequency modulation (in a compact way).

    p4 * env states that the amplitude of the oscillator will be mutliplied by an envelope (note we defined that in the line before).

    cpspch(p5) looks to the fifth value in the score (8.00, which will be a middle C, don't ask why!), to find what the fundamental of the sound will be. The next three values determine the carrier and modulating frequencies of the two oscillators, as well as the modulation index (we won't go into what they mean, but these values will give us a nice sweet sound). The final value (1) points to a sinewave table (look at the first line of the score).

Yes, we know, you're completely confused, but we thought you'd like to see a common language to actually use some of these concepts!

Computer Code for a FM instrument and a score to play the instrument in the Csound language.
Figure .x This is a Csound Orchestra and Score blueprint for a simple FM synthesis instrument. Any number of basic unit generators, such as oscillators, adders, multipliers, filters, and so on, can be combined to create complex instruments.

Some music languages, like CSound, make extensive use of the unit generator model. Generally, unit generators are used to create instruments (the orchestra), and then a set of instructions (a score) is created which tells the instruments what to do.

Now that you understand the basics of FM synthesis, go back to the top of this section and play with the applet. FM is kind of interesting theoretically, but it's far more fun and educational to just try it out.

—> To Continue with Chapter 4

<— Back to 4.6

<— To Table of Contents