Windows 3.11 MIDI Playback on AdLib Cards

During the early 1990s, Microsoft Windows 3.11 provided multimedia support for non-native MIDI hardware by utilizing software translation layers within its multimedia architecture. Because the original AdLib sound card lacked onboard MIDI hardware and relied purely on Frequency Modulation (FM) synthesis, Windows 3.11 bridged the gap using a specialized driver and the Windows MIDI Mapper. This system converted standard General MIDI event streams into register-level instructions that the AdLib's Yamaha YM3812 sound chip could execute in real time.

The original AdLib Music Synthesizer card was built around the Yamaha YM3812 sound chip, commonly referred to as the OPL2 (Operator Type-L 2). The OPL2 was strictly an FM synthesis chip without an onboard micro-controller, an MPU-401 interface, or ROM-based instrument samples. As a result, the card could not interpret standard MIDI bytes (such as Note On, Note Off, or Program Change messages) on its own.

To enable MIDI playback, Windows 3.11 relied on its Multimedia Control Interface (MCI) and a dedicated hardware driver, typically named MSADLIB.DRV. When a user or application initiated playback of a .MID file, the MCI sent standard MIDI events through the Windows multimedia subsystem directly to this driver instead of passing raw bytes to a physical MIDI port.

The MSADLIB.DRV driver functioned essentially as a real-time synthesizer engine. It contained predefined voice parameter tables (often called patch maps or timbre definitions) that approximated standard General MIDI instruments. Each patch contained specific mathematical configurations for the YM3812’s two FM operators, including attack, decay, sustain, release rates (ADSR), frequency multipliers, and modulator feedback levels. When the driver intercepted a MIDI "Program Change" command, it looked up the corresponding FM parameters and wrote those values directly to the AdLib’s input/output ports (commonly at base address 0x388).

Polyphony management was another critical task handled by the driver. The OPL2 chip supported a maximum of nine concurrent FM channels, or six melodic channels paired with five percussive voices. Because standard General MIDI arrangements frequently exceeded nine simultaneous notes, the Windows AdLib driver dynamically managed voice allocation. When all hardware channels were active, the driver implemented voice-stealing algorithms, cutting off older or lower-priority notes to play incoming ones.

Windows 3.11 managed user-level configuration through the MIDI Mapper utility located in the Control Panel. The MIDI Mapper used a system configuration file (MIDIMAP.CFG) that allowed users to select AdLib-specific setups. Because the AdLib had limited dynamic range and timbre flexibility compared to high-end wavetable cards like the Roland Sound Canvas, the MIDI Mapper could remap channel volumes, transpose notes by octave, and redirect General MIDI percussion (Channel 10) to the specific FM synthesis parameters that emulated drums.

Through this combination of the MSADLIB.DRV driver, dynamic voice allocation, and the Windows MIDI Mapper, Windows 3.11 successfully allowed users with older AdLib hardware to listen to standard MIDI compositions without requiring dedicated MIDI processing hardware.