MD_YM2413 Library 1.0
Library for Yahama YM2413 sound synthesizer
Loading...
Searching...
No Matches
Custom Instruments

Defining and using Custom Instruments

The library implements methods to load custom instruments into the single available customizable slot.

The library is able to take two styles of instrument definitions

  • OPL2/OPL3 style definitions that can be downloaded from from various sites. The OPL2/3 definitions are translated into an OPLL compatible format. The major difference is in the way that wave types are handled - OPL2/3 definitions can have up to 7 different wave types while OPLL is limited to full or half sine wave - and the library has a mapping between the two.
  • Native OPLL (YM2413) definitions if these are known.

To play the custom instrument, use the loadInstrumentOPL2() or loadInstrument() methods to load the data for the custom instrument and then set the channel that will use this instrument to I_CUSTOM.