FM Synthesis
Frequency modulation music
FM synthesis makes complex timbres by letting one oscillator vary another's frequency. Chowning's method became Yamaha's chip family: the YM2151 in arcades, the YM3812 on the Ad Lib and Sound Blaster, the YM2413 in MSX-MUSIC, the YM2612 in the Mega Drive.
FM (frequency modulation) synthesis makes a complex waveform by letting one oscillator’s output vary the frequency of another. Two sine waves and a handful of numbers give a spectrum full of harmonics, and changing one of those numbers over the length of a note changes the tone as it plays. Yamaha built the method into a family of chips, and those chips are the sound of the Mega Drive, the Ad Lib and Sound Blaster cards, MSX-MUSIC, the X68000 and most Japanese arcade boards of the late 1980s.
Fast facts
- Principle: “the variation of the frequency of one repeating waveform, the carrier, by an amount proportional to the instantaneous amplitude of a second waveform, the modulating wave” (Robert Moog, BYTE, 1986).
- Origin: John Chowning, Stanford, “in the early seventies”; hobbyists were citing his paper The Synthesis of Complex Audio Spectra by Means of Frequency Modulation by 1981. His work “led to the development of a series of commercial keyboard instruments by Yamaha”.
- Yamaha’s chips: YM2151 (OPM, 8 voices, 4 operators), YM3526/YM3812 (OPL/OPL2, 9 voices, 2 operators), YMF262 (OPL3, 18 voices), YM2413 (OPLL, 9 voices, built-in instruments), YM2612 (Mega Drive, 6 voices, 4 operators).
- Character: bells, brass, electric pianos, slap bass, and a “high harmonic component” that Yamaha’s own manual calls out as the point.
How it works
Moog’s description is the plainest. Take a carrier sine wave at frequency A and modulate its frequency with a second sine wave at frequency B, with a depth I, the modulation index:
W(t) = P sin(At + I sin Bt)
The output contains the carrier plus sidebands at A±B, A±2B, A±3B and so on; the larger I, the more sidebands carry energy, and the brighter the sound. The ratio of the two frequencies decides whether the result is musical: “If you set the modulating frequency B equal to the carrier frequency A, the sideband frequencies are then whole-number multiples, or harmonics” of the carrier. Whole-number ratios give pitched tones; non-integer ratios give the bells, gongs and metallic noises the method is famous for.
Yamaha’s application manual for the YM2151 writes the same equation with the two numbers that matter to a chip made into envelopes: E(t) = A(t)·sin[(Nc+Dc)·ωt + B(t)·sin(Nm+Dm)·ωt], “A(t): Volume envelope, B(t): Timbre envelope”. “When B(t) = 0, you get a sine wave”; raise it and “the output will not be a sine wave but a wave form including a high harmonic component”. Because B(t) is an envelope, “the timbre can be altered and output by temporal adjustment of B(t)” — a brass patch opens up as the modulator’s envelope rises, a plucked string starts bright and dulls as it falls. That time-varying colour, from four or five numbers per operator, is what made FM cheap enough to put on a chip.
Operators and algorithms
An operator is one oscillator with its own envelope. An algorithm is a wiring diagram: which operators modulate which, and which ones are heard. Moog’s account of Yamaha’s DX keyboards has “up to 16 voices” and “one of 32 preprogrammed algorithms, which are configurations of operators”. The chips are smaller versions of the same idea.
The YM2151 gives each note “two circuits composed of this basic structure … which can be arranged serially or in parallel, or made to act as only a sine-wave sound source”, plus a feedback path — “a circuit that takes one’s own output signal [and] returns it to oneself” — with which “virtually any type of wave form can be obtained”. Its connection register is three bits wide: eight algorithms over four operators. The two-operator OPL chips have only two: the YM3812 datasheet gives one formula for “the production of a tone by sine waves addition” and one for “a sine wave modulating another sine wave, i.e. frequency modulation”, and a feedback amount on the first operator.
| Chip | Family | Operators per voice | Voices | What the datasheet stresses |
|---|---|---|---|---|
| YM2151 | OPM | 4 | 8 | Stereo through the YM3012 DAC; noise, vibrato, amplitude modulation, timer |
| YM3526 | OPL | 2 | 9, or 6 + 5 rhythm | Designed for CAPTAIN videotex and teletext terminals |
| YM3812 | OPL2 | 2 | 9, or 6 + 5 rhythm | Adds waveform selection; sine mode is YM3526-compatible |
| YMF262 | OPL3 | 2 or 4 | 18 two-operator, or up to six four-operator | Register-compatible with OPL2; eight waveforms; four outputs |
| YM2413 | OPLL | 2 | 9, or 6 + 5 rhythm | 15 built-in instruments plus one programmable tone; DAC and oscillator on the chip |
| YM2612 | OPN2 | 4 | 6 | Channel 6 can be swapped for an 8-bit sample channel |
Where it turned up
Arcades and the X68000. The YM2151 is the music chip on Capcom’s CP System board, beside a Z80 that drives it and an OKI chip for sample effects, and on Sharp’s X68000. Sanglard’s description of the part — “8 channels … Each channel consists of four operators (a.k.a. slots) which can be setup to produce either percussion or instrument sounds” — is the arcade sound of the late 1980s in one sentence.
Mega Drive. The YM2612 is Sega’s console-sized relative of the YM2151: six four-operator channels, and Sega’s developer manual describes the sixth as replaceable by an 8-bit digitised-audio channel, which is how the machine plays samples.
PC. The Ad Lib Music Synthesizer Card put a YM3812 on an ISA card. COMPUTE! described it in 1990 as “a half-size FM synthesizer card” that “can play up to nine different melodic instruments or six melodic and five percussion instruments” — the OPL2’s two modes verbatim. Ad Lib’s own 1989 advert claimed the card “set the home computer music world on its ear just a year ago” and listed Sierra’s King’s Quest IV, Space Quest III and Police Quest II as titles with Ad Lib soundtracks. When Creative Labs’ card arrived that autumn, the news was that it was “fully Ad Lib-compatible” at the same $195: the Sound Blaster carried the same Yamaha chip, and Ad Lib compatibility became the baseline every DOS game targeted. The OPL3 that followed doubled the voices and added four-operator modes while staying register-compatible.
MSX. MSX-MUSIC is the YM2413, at I/O ports 7CH and 7DH, either built into the machine or added as a cartridge; ASCII’s Datapack warns that fitting a cartridge to a machine that already has one gives two chips at the same address and “the volume becomes twice as large as normal”. The OPLL’s built-in instrument ROM — fifteen fixed tones and one the program can define — is what let a cheap add-on carry a usable orchestra without the programmer designing patches.
The sound
FM’s signature is the harmonic content Yamaha’s manual describes and the way it moves. Integer ratios and a modest index give electric pianos, organs and brass; higher indices give the buzz and bite of the arcade lead line; non-integer ratios give bells and metallic percussion. The weakness is the same mechanism: a small change to the index or ratio changes the whole spectrum, so patches are hard to design by ear, and the chips’ sine-only operators (waveform selection arrived with the OPL2) mean strings and choirs stay thin. Composers who learned the chips — on the Mega Drive, the X68000 and the CPS boards especially — treated those constraints as the instrument.