<-- Back to Previous Page TOC Next Section -->

   

Chapter 4: The Synthesis of Sound by Computer

Section 4.7: FM Synthesis

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 provides 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 amplitude modulation (AM) in Section 4.5.

History of FM Synthesis

FM techniques have been around since the early 20th century, and by the 1930s FM theory for radio broadcasting was welldocumented 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 1980s, 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 1980s, making its mark on both computer music and synthesizer-based pop and rock. It’s 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 range of sonic variation. Let’s take a look at how FM works and listen to some examples.

Figure 4.16  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.

Simple FM

In its simplest form, FM involves two sine waves. One is called the modulating wave, the other the carrier wave. 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.

Figure 4.17  Frequency modulation, two operator case.

Vibrato



Soundfile 4.23
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 Soundfile 4.23, the frequency (fc) of the carrier wave is 500 Hz and the modulating frequency (fm) is 1 Hz. 1 Hz 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.

fc = carrier frequency, m(t) = modulating signal, and 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 the above equation, 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 Figure 4.17 showing the unit generator diagram for frequency modulation (remember, we showed you one of these in Section 4.5), note that each of the sine wave oscillators has two inputs: one for frequency and one for amplitude. For our modulating oscillator we are using 1 Hz as the 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 determines how high and low the frequency of the carrier wave will go. In the sound example, the fc ranges from 400 Hz to 600 Hz (500 Hz – 100 Hz to 500 Hz + 100 Hz). If we change the depth to 500 Hz, then our fc would range from 0 Hz to 1,000 Hz. Humans can only hear sounds down to about 30 Hz, so there should be a moment of "silence" each time the frequency dips below that point.



Soundfile 4.24
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 in Soundfile 4.24 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) depend on the ratio of fc to fm. John 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.

Figure 4.18  FM sidebands.

Soundfiles 4.25 through 4.28 show some simple two-carrier FM sounds with modulating frequencies above 30 Hz.



Soundfile 4.25
Bell-like sound
 

Carrier: 100 Hz; modulator frequency: 280 Hz; FM index: 6.0 -> 0.


Soundfile 4.26
Bass clarinet-type sound
 

Carrier: 250 Hz; modulator frequency: 175 Hz; FM index: 1.5 -> 0.


Soundfile 4.27
Trumpet-like sound
 

Carrier: 700 Hz; modulator frequency: 700 Hz; FM index: 5.0 -> 0.


Soundfile 4.28
FM sound

Carrier: 500 Hz; modulator frequency: 500 -> 5,000 Hz; FM index: 10.



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, consisting of instruments that are essentially unit-generator designs for sounds, and scores (or note lists) that tell how long, loud, and so on a sound should be played from your orchestra.

The code in Figure 4.19 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 is probably self-explanatory, like sr, which is just the sampling rate). Take a close look at the following 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 asig).

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

    p4*env states that the amplitude of the oscillator will be multiplied by an envelope (which, as seen in Figure 4.19, is defined with the Csound linseg function).

    cpspch(p5) looks to the fifth value in the score (8.00, which will be a middle C) 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 sine wave table (look at the first line of the score).

Yes, we know, you might be completely confused, but we thought you’d like to see a common language that actually uses some of the concepts we’ve been discussing!

Computer Code for an FM Instrument and a Score to Play the Instrument in Csound

Figure 4.19  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 that tells the instruments what to do.

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

<-- Back to Previous Page Next Section -->