OPL / AdLib FM instruments in trackers
What it is#
A second sound chip inside the PC tracker: scream-tracker-3 plays up to 9 FM voices on a Sound Blaster's Yamaha OPL2 next to its digital channels, and the s3m-format stores such instruments alongside samples; openmpt emulates the OPL3 in software for S3M and MPTM (since 1.28, 2018), so a chip-style FM patch needs no hardware today (sources: s-st3-manual, s-openmpt-manual-samples, s-tracker-history-notes).
Why it works#
Two-operator FM: the Modulator's waveform "applies a (very fast) pitch envelope for the Carrier", so the modulator's volume behaves like a filter cutoff — "the louder the Modulator, the more open the filter is"; in additive mode both operators simply sum. Feedback of the modulator into itself yields "rich sounds ranging from metallic to noise". OPL volume is logarithmic: 8 units halve the level (source: s-openmpt-manual-samples).
How to do it#
OpenMPT (S3M / MPTM)#
Create the instrument from the sample tab's New-sample dropdown or Resize; the OPL editor exposes per operator: attack, decay, sustain level, release rate, Sustain Sound (hold the sustain until note-off), volume, tremolo (1 dB), envelope key scaling, key-scale level (1.5/3/6 dB per octave), frequency multiplier 0.5–15, vibrato (7 cents), and one of 8 waveforms — sine, half sine, absolute sine, pulse sine (the four the OPL2 and therefore S3M allow), plus even-period sines, square and derived square on OPL3/MPTM; a feedback amount; additive or FM mode. Pattern volume commands scale the carrier in FM mode (both operators in additive mode); filter cutoff — the instrument's filter settings, a filter envelope, or the Zxx macro F0F000xx — scales the modulator instead. Panning is left / centre / right only; Oxx, SAx, S9x and surround do nothing on OPL notes; in S3M tone portamento is not available for OPL notes (sources: s-openmpt-manual-samples, s-openmpt-manual-effect-reference, s-openmpt-manual-zxx-macros).
Scream Tracker 3#
Press A in the instrument list's sample-type column, then Space on Parameters to edit the FM registers; FM voices live on channels A1–A9 (Sound Blaster only — a GUS can still play the samples at the same time); 1 in the pattern editor enters the AdLib note-off; rip the FM sounds from Skaven's example S3M to learn ("they can be saved as normal samples") (source: s-st3-manual). The instrument record packs the OPL registers per operator (multiplier, envelope scaling, sustain, vibrato/tremolo flags, level, attack/decay, sustain/release, waveform, feedback and mode) and carries a C2Spd that scales the note frequency sent to the chip; instrument types distinguish melody, bass drum, snare, tom, cymbal and hi-hat (source: s-st3-tech-doc).
Before the trackers: EdLib and a C64 composer's AdLib player#
The scene did not only reach OPL through trackers. JCH's route is documented in detail and is worth reading as design notes for FM sequencing (sources: s-chordian-my-computer-chronicles, s-chordian-player-editor-notes).
- The player (November 1991) carried the C64 habits straight over: arpeggio tables in the C64 style, his own vibrato and modulation control — "it immediately distanced the player from almost anything that used AdLib on the PC" — and a timer interrupt instead of raster sync, since the PC has no raster to hang a player on (multispeed, sid-player-routine).
- "Register bypassing", his own invention and the one idea here that any OPL player still needs: cache every OPL register write and skip the ones whose value has not changed. The chip is addressed through a slow port pair, so the win is real, and it is the FM equivalent of the ghost-register tricks the SID drivers use (instrument-tables).
- EdLib, the DOS editor grown out of a "Multi-Editor" prototype, used "the same sequence editing principle as on the C64", folding out only the selected one of nine channels — nine being exactly the OPL2's melodic voice count. First version September 1993, public December 1994.
- The paper trail dates the design before the code: AdLib editor ideas are dated 1991-08-10 and February 1992, while the PC player's own notes start in December 1991 and its header format in March 1992 (source: s-chordian-player-editor-notes).
- Converting SID tunes to FM is not free. He kept a candidate list of C64 tunes to move to AdLib/Sound Blaster; "only laxity's The Alibi and Star Dream were eventually transferred among these" (source: s-chordian-player-editor-notes). His paid AdLib work came through the PC version of Hugo and the 1992 Harald Hårdtand, where drax composed on the C64 and JCH converted (source: s-chordian-my-computer-chronicles).
Tips & pitfalls#
- Treat the modulator level as the filter and the carrier envelope as the amplitude envelope; feedback for grit; a frequency multiplier ratio of 1:2 or 1:3 keeps it harmonic, odd ratios bell-like (the manual only states the mechanism; the ratio advice is an inference from it).
- Remember the logarithmic volume when mixing FM against samples —
v50is half ofv58. - Only the four OPL2 waveforms survive an S3M save.
Related#
instrument-design · chordian · jch-editor · scream-tracker-3 · s3m-format · openmpt · filter-programming · adsr-envelope · chip-samples
Sources#
s-openmpt-manual-samples · s-st3-manual · s-st3-tech-doc · s-openmpt-manual-effect-reference · s-openmpt-manual-zxx-macros · s-tracker-history-notes · s-chordian-my-computer-chronicles · s-chordian-player-editor-notes