The Yamaha OPL (Operator Type-L) is a series of sound chips developed by Yamaha for low-cost frequency modulation (FM) synthesis in computers, musical instruments, and video games. OPL chips enabled the development of affordable sound cards for IBM PC compatible computers in the late 1980s, including the Ad Lib and Sound Blaster series. They became widely used in PC sound cards before being supplanted by cards using wavetable synthesis in the early 1990s.
Internal operation
The internal operation of the chips is completely digital. Each FM-tone is generated by a digital oscillator using a form of direct digital synthesis. A low-frequency oscillator and an envelope generator drive an FM operator to produce floating-point output for the DAC. Decapsulation of the chips shows two look-up tables, one for calculating exponents and one for log-sine. This allows the FM operator to calculate its output without any multipliers, using the formula exp[logsin[φ2+exp[logsin[φ1]+A1]]+A2] and two 256-entry look-up tables. Both tables are stored as pairs of values rounded to the nearest whole number, with the second value represented as the difference between it and the first value. A quarter of the log-transformed sine waveform is stored as a sampled approximation in a 256-word read-only memory (ROM) table, computed by 256×−log2(sin((x+0.5)×π512)) for values of 0 to 255. The rest of the sine-waveform is extrapolated via its property of symmetry. Scaling the output of an oscillator to a wanted volume would normally be done by multiplication, but the YM3526 avoids multiplications by operating on log-transformed signals, which reduces multiplications into computationally cheaper additions. Another 256-word ROM stores the exponential function as a lookup table, used to convert the logarithmic scale signal back to linear scale when required, as the final stage where the oscillator-outputs are summed together (just prior to the DAC-output bus), with the modulator waveform always delayed by one sample before the carrier waveform. This table is computed by (2x256−1)×1024 for values of 0 to 255. To compute the exponent, 1024 is added to the value at the index given by the least significant byte of input; this becomes the significand and the remaining bits of input become the exponent of the floating point output.
Chips in the series
OPL
The YM3526, also known as OPL or OPL1, is the first chip in the OPL family. Introduced in 1984, it is a nine-channel, two-operator FM synthesis chip. The YM3526 has 244 write-only registers and can produce nine melodic channels, each with two operators. Alternatively, it can use six melodic channels and five percussion instruments: bass drum, snare drum, tom, cymbal, and hi-hat. Each operator generates a sine wave and has its own ADSR envelope generator. The chip produces sounds primarily through frequency modulation, in which one operator modulates the phase of another. The YM3526 generates digital audio samples at 49.716 kHz and sends them to an external digital-to-analog converter (DAC), the YM3014B, for conversion to an analog signal. The YM3014B was also used with other Yamaha FM chips, including the YM2151 and YM2203. The Y8950, also known as MSX-AUDIO, is closely related to the YM3526 and was used in MSX audio expansion hardware. It adds ADPCM recording and playback capabilities. Overview of a channel's registers: For the whole channel:
Main frequency (10 bits) Octave (3 bits) Note on/off Synthesis mode (FM or just additive) Feedback (0–7, the modulator modulating itself) For each one of the two oscillators:
Frequency multiply (can be set to 1⁄2, 1 to 10, 12 or 15) Waveform (Sine) Volume (0–63, logarithmic) Attack, decay, sustain, release (4 bits each, logarithmic) Tremolo (on or off) Vibrato (on or off) Sustain (on or off) Envelope scaling per key (on or off) Volume scaling per key (0–3) There are also a few parameters that can be set for the whole chip:
Vibrato depth Tremolo depth Percussion mode (uses 3 channels to provide 5 percussion sounds) Composite sine mode (see Oscillator sync)
OPL2
The YM3812, also known as OPL2, is the second chip in the OPL family. Introduced in 1985, it is an improved version of the YM3526, and was backwards compatible with the former alongside its variant, the Y8950. Among its newly-added features is the ability to pick between four waveforms for each individual oscillator by setting a register. In addition to the original sine wave, three modified waveforms can be produced: half-sine waves (where the negative part of the sine is muted), absolute-sine waves (where the negative part is inverted), and pseudo-sawtooth waves (quarter sine waves upward only with silent sections in between). This odd way of producing waveforms give the YM3812 a characteristic sound. Limited to two-operator FM synthesis, the YM3812 is unable to accurately reproduce timbres of real instruments and percussive sounds unlike other FM chips. Melody polyphony is limited to nine voices in melodic mode and six voices in percussive mode. The YM3812 is used with an external YM3014B monophonic DAC chip to output its audio in analog form, like with the YM3526. Having little competition on the market at the time of introduction of Adlib and Sound Blaster in the late 1980s, the chip became the de-facto standard for "Sound Blaster compatible" sound cards. Another related chip is the YM2413 (OPLL), which is a cut down version of the YM3812.
OPL3
The YMF262, also known as OPL3, is the third chip in the OPL family. Introduced in 1990, it is an upgraded version of the YM3812, which improves on the feature-set of its predecessor while also notably including the ability to use four-operator FM synthesis. This makes the YMF262 produce more harmonically richer sound than that of its predecessors, similar to contemporary consumer synthesizer keyboards of the time such as the Yamaha DX100. The following features were added:
… excerpt ends here. Continue reading the full article.

![Yamaha OPL: OPL2 waveforms[4]: 46](https://upload.wikimedia.org/wikipedia/commons/a/a2/YM3812_waveforms_numbered.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail_unscaled)



