opl3 – OPL3 chip emulator

opl3 [ –n rate ] [ file ]

Opl3 is an emulator of a single Yamaha 262 chip, also known as OPL3.

The emulated chip is programmed by a stream of commands either from file or from standard in. It then synthesizes a number of stereo 16 bit little–endian samples for a sampling rate of 44.1 kHz, and writes them to standard out.

Commands are 5 bytes wide, in little–endian byte order:

register[2] value[1] delay[2]

Each command specifies a value to be written to an OPL3 chip register, modifying its internal state.

The delay field provides timing. It is a multiple of a command period, during which the OPL3 chip may be sampled before processing the next command. The period itself is the inverse of the command rate, 44100 Hz by default. This rate can be set using the –n parameter.



Opl3 first appeared in 9front (July, 2018), based on ymf262.c from the Multiple Arcade Machine Emulator ( MAME ).