NAME
opl3 – OPL3 chip emulator

SYNOPSIS
opl3 [ –r rate ] [ file ]

DESCRIPTION
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 stereo 16–bit little–endian PCM samples at the chip's sampling rate, 49.716 kHz, resamples them to audio(3)'s default 44.1 kHz rate, 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 input stream's sampling rate, by default the same as the chip's output sampling rate. The –r parameter sets the input sampling rate.

SOURCE
/sys/src/games/opl3

SEE ALSO
audio(3)

Yamaha ``YMF262 Manual'', 1994.

V. Arnost ``Programmer's Guide to Yamaha YMF 262/OPL3 FM Music Synthesizer'', version 1.12 dated Nov. 23rd 2000.

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