Skip to content

Arduino OPL2 v1.5.0

Compare
Choose a tag to compare
@DhrBaksteen DhrBaksteen released this 10 Nov 11:07
· 85 commits to master since this release
fd5459b

This change adds a simpler way of defining OPL2 instruments in code to the library and a new example to play VGM files.

Changes:

  • New structs Instrument and Operator are introduced for simpler instrument definition in code. New related instrument functions:
    • createInstrument - Creates a new empty instruement
    • loadInstrument - Loads a predefined melodic or drum imstrument
    • getInstrument - Creates a new melodic instrument from the given OPL2 channel's current settings
    • setInstrument - Set an instrument to an OPL2 channel with optional volume
    • getDrumInstrument - Creates a new drum instrument from the current OPL2 drum settigns
    • setDrumInstrument - Set a drum instrument to its precussive channel
  • Instruments can now be loaded from both flash memory and SRAM using loadInstrument
  • The TeensyMidi example has been changed to fix issues with clicking and popping noises when changing instruments
  • Corrected comments that wrongly described the instrument definitions
  • Updated examples that use the old setInstrument function
  • Added new PlayVGM example by Eirik Stople

This fixes the following issues:

#44 Cracking noises in MIDI output
#47 SetInstrument does not support SRAM instruments
#48 Bug when setting registers for melodic instruments

Warning:

As of this version the old setInstrument function is deprecated and will be removed in v1.6.0 of the library! Please start using the new instrument handling functions.