This commit adds a MidiParser implementation for Ultima 6's
M format and MidiDrivers for AdLib and MT-32. This replaces
the old implementation based on AdPlug, which supports
AdLib only and does not have ScummVM's support for various
OPL emulators and devices.
Music for Savage Empire and Martian Dreams has been
temporarily disabled, because these games use a different
music format and there is no MidiParser yet.
This commit adds a MidiParser implementation for Ultima 6's
M format and MidiDrivers for AdLib and MT-32. This replaces
the old implementation based on AdPlug, which supports
AdLib only and does not have ScummVM's support for various
OPL emulators and devices.
Music for Savage Empire and Martian Dreams has been
temporarily disabled, because these games use a different
music format and there is no MidiParser yet.
This commit adds the following functionality to the MIDI drivers:
- Add checking if a driver is ready to process MIDI events for a specific
source (rather than any source). To facilitate this, SysExes can now be sent
using a source number. This is stored with the SysEx data in the SysEx queue
and can be checked when isReady is called with a source number.
- Allow specifying controller default values per MIDI channel. Currently this
is only implemented for program.
- The OPL dynamic channel allocation algorithm will now respect statically
allocated channels, in case a subclass uses combined static and dynamic channel
allocation.
It also fixes the following bugs:
- Instrument remapping can now be specified using const arrays.
- OPL instrument writing code is refactored to a separate function.
- OPL note on with velocity 0 would be handled as a note off, and then
continued to be processed as a note on.
- OPL writeFrequency would always write key on bit, even if the note is not
active.
- MT-32 default channel volume was incorrect.
This adds support for the OPL rhythm mode to the AdLib multisource MIDI driver.
Some games (f.e. Simon 1) use this to generate the rhythm sounds of their music.
This commit adds a feature to the multisource MIDI drivers which allows setting
a default value for most controllers. This default is then applied at the start
of every new track, which ensures controllers are in the correct state.
This can be used for games which use some controller, but do not reset it at
the start of each track, which can lead to incorrect playback.
This adds a MIDI driver for AdLib / OPL2 and OPL3 with support for multiple
simultaneous sources of MIDI data. Additionally, it is easier to subclass the
driver and customize its behavior than the existing AdLib MIDI driver. The
standard behavior matches the Windows 95 SB16 driver.