This manual documents the use of ADLplug, a frequency modulation (FM) synthesizer based on the technology of the OPL3.
ADLplug is free and open source software.
If you encounter a problem with the software, please create an issue on the project page:
https://github.com/jpcima/ADLplug/issues

Description

ADLplug is an FM synthesizer, built on Yamaha’s OPL3 standard. The implementation of this synthesis is based on an accurate emulation of the YMF262 chip. Note that OPL3 and YMF262 are two names for the same chip.

The chip can perform 2- or 4-operator FM synthesis, providing polyphony of 6 to 18 voices, depending on how it is used. It supports 6 algorithms and 8 waveforms.

Using this plugin, you can control any number of virtual YMF262 chips via MIDI input. This enables high levels of polyphony, which would be difficult or impossible to obtain using real hardware.

Additionally, the plugin can use a multitude of instrument banks. A collection of banks is integrated in the plugin. General MIDI compatibility allows synthesis of multiple simultaneous tracks using the same instrument.

Installation

Binary downloads are provided for Windows, Mac and Debian.
https://github.com/jpcima/ADLplug/releases

If there is no binary for your operating system, you will need to download and build the source code. Visit the project homepage, and follow the instructions there.

Once you have a binary in VST or LV2 format, you must install it in a location recognized by your VST host. Commonly used paths include:

  • Windows: C:\Program Files\Steinberg\VSTPlugins

  • Mac: Library/Audio/Plug-ins/VST

  • GNU/Linux and others: /usr/lib/vst, /usr/lib/lv2 , /usr/local/lib/vst, /usr/local/lib/lv2 , ~/.vst , ~/.lv2

Usage

When the editor is opened, a window containing a range of controls and indicators is displayed.

500
Figure 1. The editor window

The editor layout is as follows:

  • in the upper left corner, the current bank, program (instrument), and associated MIDI channel can be set;

  • in the upper right corner are the settings of the virtual YMF262 chips;

  • in the center are all the controls for manipulating the currently selected program: Operators, Algorithm, Tone, and Miscellaneous;

  • in the lower right corner is the Global section, applying to all programs in a bank;

  • at the bottom is a virtual keyboard for playing the currently selected program.

Quick Start

A default bank of 2-operator algorithms is initially loaded. To get started with ADLplug, simply connect a MIDI keyboard and start playing.

The General MIDI standard applies: the MIDI channels are each associated with their melodic instrument, and channel 10 is associated with percussion.

Another bank can be selected from the included collections. This is done by clicking on 24, then opening the submenu via "Load from collection".

Algorithms

To understand how to edit programs, some understanding of FM synthesis, and specifically the OPL3, are required.

FM (frequency modulation) synthesis uses interconnected oscillators, also known as operators. The layout of these operators and connections are also known as algorithms. Each operator in an algorithm may act as either a modulator or a carrier.

  • a carrier produces a signal for audio output

  • a modulator applies rapid frequency changes to the operator which it modulates. Most often, that operator is a carrier, but may also be another modulator. Modulating an operator modifies its spectrum, introducing a number of harmonics.

The OPL3 has three classes of algorithms:

  • 2-operator algorithms (2op)

  • 4-operator algorithms (4op)

  • pseudo-4-operator algorithms (2x2op)

Pseudo-4-op is simply a pair of 2op voices played in unison. A peculiarity of this mode is that a tonal shift may be applied to the second voice with respect to the first.

200
Figure 2. Algorithms

First, select one of the three classes of algorithms.

Then, the FM and AM buttons are interpreted as follows:

  • for 2op, only the pair 1-2 applies. 3-4 is ignored.

  • for 4op, both pairs apply.

  • for 2x2op, the pair 1-2 applies to the first voice, and 3-4 applies to the second.

The algorithm reference, opened by clicking on "?", displays the connection diagram corresponding to any combination of FM and AM.

  • when 2op or 2x2op is selected:

270
Figure 3. 2-operator algorithms
  • when 4op is selected:

600
Figure 4. 4-operator algorithms

The diagrams can be read as follows: blocks labelled from 1 to 4 are operators. Each operator in the bottom row is a carrier, and every other operator is a modulator. The diagrams also highlight the feedback loop on operator 1.

The amplitude of the signal fed back from operator 1 to itself can be controlled by the parameters "Feedback 1-2" and "Feedback 3-4".
Note: "Feedback 3-4" only applies to the second voice of 2x2op programs. In other configurations, it has no effect.

200
Figure 5. Tuning

For tuning, "Note offset" is an offset in semitones applied to the note played. "Fine tune" is an additional offset in cents (hundredths of a semitone).
Note: "Note offset 3-4" and "Fine tune 3-4" apply only to the second voice of 2x2op programs. In other configurations, they have no effect.

"Percussion key" is the note that will be played if the instrument is used as percussion.

Polyphony

The program is played on the 18 general purpose channels of the OPL3.
For 2op algorithms, each of these channels can accommodate a single 2op voice.

For more complex instruments, it becomes more complicated.

  • For 2x2op algorithms, each voice occupies two channels, assigned in the same way as for 2op algorithms. Compared with 2op, polyphony is simply halved. In other words, a chip can accommodate 9 voices in 2x2op mode.

  • Similarly, for 4op algorithms, each voice occupies two channels. However, the channels cannot be occupied arbitrarily. Up to 12 channels may be reserved for 4op, allowing 6 4op voices.

400
Figure 6. 4op channel reservation

The example above shows two OPL3 chips with 18 channels each. We have reserved 16 channels for 8 4op voices. Each voice has 2 channels, one colored pink and one colored blue. The remaining 20 channels in grey are available for 2op and 2x2op, allowing for polyphony of 20 or 10 voices respectively.

180
Figure 7. Chips

Maximum polyphony is controlled by the parameters "Chips" and "4 ops". The "4 ops" parameter is the maximum number of 4op voices, and must be no greater than 6 times the number of chips.

Clicking on 24 automatically sets the "4 ops" parameter, based on the number of chips and the currently loaded bank. This value is a suggestion, and may not be optimal.

Warning
When the selected bank contains 4op programs, and there are no 4op voices reserved, those programs will be inaudible.

Arpeggiation

The synthesizer includes intelligent polyphony management that optimizes channel distribution. However, when channels are heavily occupied, and there are insufficient vacant channels to accommodate a new voice, an arpeggiation mechanism is triggered.

The arpeggiation allows a channel to be shared between 2 or more voices, rapidly switching the properties of the channel between the voices using it. This can create an illusion of polyphony, but also an audible distortion, which may sound uncomfortable in some situations.

Chord played on the "Harpsichord" instrument, without arpeggiation
Chord played on the "Harpsichord" instrument, with arpeggiation

Arpeggiation indicates insufficient polyphony. To prevent arpeggiation, the number of chips or 4op voices should be increased.

Emulators

One of several YMF262 chip emulators may be selected. Emulators may be switched dynamically.

During the time required for switching emulators, the sound will be muted, and the MIDI stream will be ignored. This will not interfere with real-time operation.

200
Figure 8. Emulators
  • DOSBox OPL: This emulator is a balanced choice, producing good fidelity sound while using a very reasonable quantity of CPU resources.

  • Nuked OPL: This emulator offers excellent fidelity, aiming to provide nearly cycle-exact emulation. However, CPU usage is significant, so it is only recommended with a small number of chips, or for non-realtime rendering. — v1.7.4 has been optimized to reduce CPU usage. — v1.8 includes an improved ADSR implementation, but greater CPU usage.

  • Opal OPL3: This emulator is less accurate than the choices above, and does not support the 5 dedicated rhythm channels, but was taken from the popular Reality Adlib Tracker software. It can reproduce the sound characteristics of that tracker.

  • Java: Another alternative, originally developed as an experiment in Java.

Operators

The four operators, whether functioning as modulator or carrier, provide the same parameters.

270
Figure 9. An operator

Waveforms

The first parameter is the oscillator waveform, located in the lower left corner. One of 8 waveforms may be selected.

  1. sine

  2. half-sine

  3. absolute sine

  4. quarter-sine, also known as pulse sine

  5. alternating sine

  6. camel sine, also known as absolute alternating sine

  7. square

  8. logarithmic sawtooth, also known as derived square

Envelopes

The envelope generator is controlled by four dials labelled "ADSR". The envelope controls the amplitude (volume) of an oscillator with respect to time.

250
Figure 10. ADSR Envelope

The attack ("A") and decay ("D") parameters control the durations of those envelope stages.

The sustain ("S") parameter controls the volume level held after A + D has elapsed, and as long as the key remains pressed. However, if the "Sustain" flag is disabled, there is no sustain stage, and the envelope effectively becomes an "ADR".

The release ("R") parameter comes after sustain, and similarly to "A" and "D", specifies the duration of the release stage.

Flags

The "Tremolo" and "Vibrato" flags apply small modulations to the operator, affecting volume and frequency respectively.

"Sustain" enables or disables the "S" stage of the envelope. Refer to the explanation on envelopes.

"Key scaling" automatically shortens the duration of the envelope as the pitch of the note increases.

Levels

The output level "Lv" is the global volume of the operator. Note that there is no "0" setting; even at the lowest level, the operator can be heard faintly.

The frequency multiplier "F*" controls the base frequency of the operator, in octaves.

The key scale level "Ksl" determines the extent to which amplitude is attenuated as pitch increases. The parameter value maps to attenuation as follows:

  • "0" means no attenuation by frequency;

  • "1" attenuates by 3.0 decibels per octave;

  • "2" attenuates by 1.5 decibels per octave;

  • "3" attenuates by 6.0 decibels per octave.

Note values "1" and "2" carefully. In the OPL3 chip, attenuation does not increase monotonically with respect to the parameter value.

Other parameters

The remaining parameters fall into two groups: Miscellaneous and Global.

A miscellaneous parameter applies to the currently selected program in the editor. On the other hand, a global parameter is a property of the bank, and applies to all programs in that bank.

200
Figure 11. Miscellaneous parameters

"Velocity Offset" is a fixed modifier applied to the velocity of MIDI notes, and can be set in the range [-127, 127]. A positive offset increases velocity, and a negative value decreases it.

230
Figure 12. Global parameters

The "Deep tremolo" and "Deep vibrato" flags make those effects more pronounced, if they are active. The effect depths are fixed values determined by the design of the YMF262, and are as follows:

  • Regular tremolo modulates amplitude by 1.0 dB

  • Deep tremolo modulates amplitude by 4.8 dB

  • Regular vibrato modulates frequency by 7 cents (7 hundredths of a semitone)

  • Deep vibrato modulates frequency by 14 cents

"Volume model" specifies a function for transforming the discrete parameters associated with volume into actual gain values. In most cases, the generic model is appropriate.

However, when loading banks from other software, the formula that reproduces the operation of that software should be selected. For example, if you load a bank from Doom, you should choose the DMX model. For Duke Nukem 3D, use Apogee.

About

ADLplug was developed by Jean Pierre Cimalando in 2018.
It is based on previous work by several groups of people.

The YMF262 emulators were developed by:

  • The DOSBox team.

  • Alexey Khokholov (Nuke.YKT) for Nuked OPL, and Alexander Troosh for his optimizations on v1.7.4.

  • Robson Cozendey for the original Java OPL, which was later converted to C++ by Randy Heit.

  • 90’s demo group Reality for Opal.

The MIDI driver was previously developed by Joel Yliluoma (Bisqwit). Originally, this program, ADLMIDI, was a simple MIDI file player.

Vitaly Novichkov (Wohlstand) reorganized ADLMIDI into a reuseable library, adding the basic building blocks of realtime MIDI control. Jean Pierre Cimalando has contributed improvements which make it more suitable for usage in real-time composition.

The ADLplug software was developed with the goal of allowing the use of the OPL3’s FM in composition, making the creation of "chiptunes" accessible to as many musicians as possible.

Other acknowledgements include:

Instrument design

  • Sneakernets

  • Papiezak

  • Vitaly Novichkov

Artists

  • Brian (linuxsynths.com)

  • Garvalf

Translation

  • Olivier Humbert

  • Bruce Sutherland

Artwork

  • Christopher Arndt