GENMIDI

GENMIDI Is a WAD lump that contains instrument data for the DMX Sound library to use for OPL synthesis. Given an *.OP2 extension, it can be used in MUSPlayer.

The lump is a database of OPL register values, used to program the OPL chip found in the Adlib and Sound blaster sound cards. It contains 175 entries, one for each of the 128 standard General MIDI instruments and 47 percussion effects.

Header
The lump has an 8-byte ASCII header, containing the text "#OPL_II#".

Instrument data
The header is followed by 175 36-byte records of instrument data.

Each record has a 4 byte header of the following form:

The flags value is a bitfield containing several flags that control the record. These are:

Following the header are two 16 byte records of OPL voice data. If the double voice bit is set in the header, both voices will be played simultaneously on an OPL3 chip; otherwise, only the first set of voice data is played.

The voice data has this format: