MIDI - dosbox-staging/dosbox-staging GitHub Wiki
The digital equivalent of sheet music, MIDI (acronym for Musical Instrument Digital Interface) was commonly utilized by the video games of yesterday. MIDI doesn't have any sound information in it per se, therefore the quality of the samples utilized by your MIDI synthesizer determines the quality of your MIDI sound as much as the composition itself.
A file format that stores and exchanges the data is also defined. Advantages of MIDI include small file size, ease of modification and manipulation and a wide choice of electronic instruments and synthesizer or digitally-sampled sounds. A MIDI recording of a performance on a keyboard could sound like a piano or other keyboard instrument; however, since MIDI records the messages and information about their notes and not the specific sounds, this recording could be changed to many other sounds, ranging from synthesized or sampled guitar or flute to full orchestra. A MIDI recording is not an audio signal, as with a sound recording made with a microphone. -- [Wikipedia]
Comparison of software emulation to real hardware is hardly accurate and in some cases impossible to achieve. Some software emulation can sound perfectly accurate for one MIDI track where other tracks it is completely wrong. SoundFonts are not fully an accurate representation of the hardware it tries to replicate due to hardware having different features than the typical software emulation can currently interpret. At best, we can appreciate the efforts by many communities to make good quality sounding comparisons. Some software is better tuned than others in different capability, there is much research and comparison to gloss over here when talking about software MIDI emulation.
[Top]
General MIDI (also known as GM or GM 1) is a standardized specification for electronic musical instruments that respond to MIDI messages. GM was developed by the American MIDI Manufacturers Association (MMA) and the Japan MIDI Standards Committee (JMSC) and first published in 1991. The GM 1 specification was superseded by General MIDI 2 in 1999; however, GM 1 is still commonly used.
General MIDI is defined by a standard layout of defined instrument sounds called 'patches', defined by a 'patch' number (program number โ PC#) and triggered by pressing a key on a MIDI keyboard. This layout ensures MIDI sound modules and other MIDI devices faithfully reproduce the designated sounds expected by the user and maintains reliable and consistent sound palettes across different manufacturers MIDI devices. -- [Wikipedia]
Have a look at the list of GM-compatible games or the one from Wikipedia (now deleted, there's also a backup on Vogons).
[Top]
The Roland MT-32 Multi-Timbre Sound Module is a Linear Arithmetic synthesizer first released in 1987 by Roland Corporation. It became more famous along with its compatible modules as an early de facto standard in computer music. Since it used proprietary MIDI specification developed by Roland prior to the release of the General MIDI standard, it is therefore not compatible with General MIDI sequences.
Despite its original purpose as a companion to other professional MIDI equipment, the MT-32 became one of several de facto standards for PC computer game publishers. Sierra On-Line, a leading PC game publisher of the time, took an interest in the sound-design of its PC games. Sierra secured a distribution deal to sell the MT-32 in the US, and invested heavily in giving its game titles (at the time) state-of-the-art sound by hiring professional composers to write in-game music. King's Quest IV, released in 1988, was the first Sierra title with a complete musical soundtrack scored on the MT-32.
The proliferation of the General MIDI standard, along with competition from less expensive "wavetable" sample-based soundcards, led to the decline of musical soundtracks using the MT-32's proprietary features. Games that played General MIDI tracks on the MT-32 initialized the MT-32's sound bank to approximate the General MIDI Level 1 (GM1) specification, but avoided any of the MT-32's hallmark music-synthesis features, adhering to GM1's rather limited set of controllers. -- [Wikipedia]
Differences between the Roland MT-32, CM-32L, CM-32P, CM-64, LAPC-I and MT-100.
Keep an eye to the list of MT-32-compatible games or check the one on Wikipedia (now deleted, there's also a backup on Vogons).
[Top]
FluidSynth is a real-time, high-quality, cross-platform software MIDI synthesiser based on the SoundFont 2 specification. DOSBox Staging comes with FluidSynth 2.x built-in.
Compared to other DOSBox forks, DOSBox Staging's FluidSynth audio is mixed internally allowing its sound level to be controlled via DOSBox's mixer
. This also makes any external recording software (eg. OBS) easier to configure.
Compared to other FluidSynth patches, DOSBox Staging:
- Improves SoundFont loading.
- Manages FluidSynth settings in it's own
.conf
section with better documentation and entries more in-line with rest of.conf
file. - Uses a stack-allocated buffer for transferring samples to mixer (other DOSBox channels using signed 16-bit samples do the same). This should prevent some cache trashing and prevents alignment issues.
- Brought back the copyright statement on top of the file + SPDX identifier, because it's important.
[Top]
Part of the Munt project, mt32emu is a multi-platform software synthesizer emulating Roland's MT-32, CM-32L, CM-64 and LAPC-I modules. It is not endorsed by or affiliated with the Roland Corporation.
DOSBox Staging now comes with mt32emu built-in by default. Yet to use that synthesizer, you will have to provide a set of valid ROM files dumped from the hardware. The mt32emu configuration section below will help you with the details.
[Top]
FluidSynth support is enabled in DOSBox Staging by default, however you will need to edit your config file to tune the following sections with your preferred soundfont.
Tip: thanks to the layering approach of DOSBox configuration files, you can pick one specific SoundFont per game.
[midi]
mididevice = fluidsynth
[fluidsynth]
soundfont = /path to/soundfont.sf2
The path can be absolute or relative, if you prefer a custom location of your SoundFont collection. You may also place your SoundFont files within the soundfonts
directory within your DOSBox configuration directory, in which case you can omit the path entirely and simply use soundfont = filename.sf2
.
Configure your game to use General MIDI (GM) output on port 330 to start using it.
This might be due to some conflict with an already installed FluidSynth package. If possible, it would be good to delete any FluidSynth files and directories you can find in /usr
or /usr/local
. Then rebuild DOSBox Staging as usual. It should be then safe to reinstall FluidSynth packages from your distribution.
To find FluidSynth files installed on your system, try this command and delete any files listed:
$ find /usr -name '*fluidsynth*'
Required for General MIDI playback. To put it simply, a SoundFont is a library of instrumental sound samples, instructions and parameters which, when loaded by a compatible synthesizer (either implemented in hardware or in software), will dramatically change the sound of MIDI output. It follows that your choice of SoundFont can have a noticeable impact on your classic video game experience.
SoundFonts marked "Non-free" have various usage limitations - check licensing info for the font to learn more; sometimes licensing info is embedded in the font file itself.
Recommended SoundFonts are with gaming in mind.
Roland GS is an extension to General MIDI used by some games. More on Wikipedia.
Name | Size (MiB) | License | Free | Recommended | Roland GS |
---|---|---|---|---|---|
GeneralUser GS | 31 | custom license | โ๏ธ | โ๏ธ | โ๏ธ |
FluidR3 | 148 | custom (MIT-like) | โ๏ธ | โ๏ธ | โ๏ธ |
Creative 4GMGSMT | 4 | Commercial, distributed by Creative Technology | โ | โ๏ธ | โ๏ธ |
Voice Crystal GM/GS Set | 4 | Commercial, sold by EYE & I Productions | โ | โ๏ธ | โ๏ธ |
SGM-YamahaGrand-Guit-Bass | 538 | missing license | โ | โ๏ธ | โ |
FatBoy | 316 | "free" for non-commercial use, share-alike | โ | โ๏ธ | |
Musyng Kite | 990 | CC BY-SA 3.0 | โ๏ธ | โ๏ธ | |
HEDSound MT32/CM64L as SF2 | 494 | free for personal use | โ๏ธ | โ | |
Cwadge's UHD3 | 64 | missing license | โ๏ธ | โ | |
Arachno | 155 | "free" for non-commercial use | โ | โ | |
Timbres of Heaven | 436 | several contradicting license statements | โ | โ๏ธ | |
Titanic | 288 | missing license; "not for commercial use" | โ | โ๏ธ | |
Crisis GM | 1570 | "free" for home use, paid otherwise | โ | โ | |
OmegaGMGS2 | 278 | "free" to download | โ | โ๏ธ | |
Patch93's SC-55 | 45 | legally grey area | โ | โ | |
Trevor0402's SC-55 | 10 | legally grey area | โ | โ๏ธ | |
SGM-NicePianosGuitarsBass | 310 | missing license | โ | โ | |
SGM-Sal-Guit-Bass | 520 | missing license | โ | โ |
You can also download most of the above SoundFonts from this Internet Archive collection or from this collection hosted by us.
For more SoundFonts, the SynthFont website maintains a meta-list of download pages.
Below are comparison recordings of the Star Wars: Dark Forces intro music on Roland SC-55 hardware versus various SoundFonts (the FLAC originals are here). Note how Creative 4GMGSMT, GeneralUser GS, and FluidR3 are the closest to the SC-55 in overall balance and character, while others can be wildly off (including Patch93's SC-55 recreating attempt). Orchestral pieces are the best for this type of shootout as these compositions rely on well-balanced instruments a lot more than any other genre of music, making deviations from the SC-55 gold-standard very apparent.
Name | Recording |
---|---|
Roland SC-55 v1.21 (hardware) | ๐ Play |
Creative 4GMGSMT | ๐ Play |
GeneralUser GS | ๐ Play |
FluidR3 | ๐ Play |
UHD3 | ๐ Play |
FatBoy | ๐ Play |
Timbres of Heaven | ๐ Play |
Patch93's SC-55 | ๐ Play |
Arachno | ๐ Play |
These are the official Creative SoundFonts distributed with with Creative
soundcards thus providing the authentic sound of a Creative AWE32, AWE64, and
X-Fi cards. For older Creative models like Sound Blaster 16 or Sound Blaster
Pro, we recommend to configure the appropriate MIDI device in your configuration file (dosbox-staging.conf
).
The sample recordings are labeled as follows:
- BI2: Battle Isle 2 Jogrwai Map โ Lot of distorted guitars.
- TH: Theme Hospital Steady โ Modern sound and some piano instruments.
- TF: Tie Fighter Title Screen โ A well-known orchestral piece.
- WC: Warcraft 2 Human 3 โ Another orchestral composition.
Name | Size | Description and Source | BI2 | TH | TF | WC |
---|---|---|---|---|---|---|
1MGM | 1 MB | Creative AWE32 Official ROM Dump | ๐ Play | ๐ Play | ๐ Play | ๐ Play |
2GMGSMT | 2 MB | Creative AWE64 Install Disc | ๐ Play | ๐ Play | ๐ Play | ๐ Play |
2MBGMGS | 2 MB | E-mu General MIDI Collection Disc | ๐ Play | ๐ Play | ๐ Play | ๐ Play |
GM35REVC | 3 MB | Creative AWE64 Install Disc | ๐ Play | ๐ Play | ๐ Play | ๐ Play |
4GMGSMT | 4 MB | Creative AWE64 Install Disc | ๐ Play | ๐ Play | ๐ Play | ๐ Play |
4MBGM | 4 MB | E-mu General MIDI Collection Disc | ๐ Play | ๐ Play | ๐ Play | ๐ Play |
8MBGM | 8 MB | E-mu General MIDI Collection Disc | ๐ Play | ๐ Play | ๐ Play | ๐ Play |
28MBGM | 28 MB | Creative X-Fi Vista Installation Disc | ๐ Play | ๐ Play | ๐ Play | ๐ Play |
Also available:
- 4MBGMSFX.sf2 clone of 4MBGM.sf2 but with SFX set.
- 8MBGMSFX.sf2 clone of 8MBGM.sf2 but with SFX set.
- CT2MGM.sf2 clone of 2GMGSMT.sf2 but coming from the Creative Installation Disc.
- CT4MGM.sf2 clone of 4GMGSMT.sf2 but coming from the Creative Installation Disc.
- CT8MGM.sf2 clone of 8MBGM.sf2 but with SFX set and coming from the Creative Installation Disc.
- EMUAPS_2meg_version.sf2 clone of 2GMGSMT.sf2 but coming from E-mu Disc.
- EMUAPS_8MB.sf2 clone of 8MBGM.sf2 but coming from E-mu Disc.
Some games provide a volume adjustment while others use a fixed background listening volume. If the game's music level isn't to your liking, then adjust the fsynth
mixer channel before launching the game by adding mixer fsynth 200
(to double the volume), or mixer fsynth 50
(to halve the volume), or any other percentage, to your DOSBox Staging's conf [autoexec]
section, or as a command in your game's startup batch file.
When you exit a MIDI game, the console output will indicate the maximum MIDI level and recommend any attenuation or amplification percentages (if the volume was excessively low or high). You can ignore this information if you're happy with the level, or it might help you further tune your SoundFont levels (especially if you're trying many different SoundFonts). Using mixer /noshow
option will suppress these messages if so desired.
[Top]
mt32emu support for DOSBox Staging is now built-in by default and can be configured by editing your dosbox-staging.conf
file (or any local .conf
you may have) as follows:
[midi]
mididevice = mt32
[mt32]
model = auto
romdir = /path/to/mt32-roms
Tip: using the layering approach of DOSBox configuration files, you can pick one specific MT-32 model per game.
MT-32 and CM-32L ROMs are copyrighted by Roland Corporation. The ROMs contain PCM samples and are required to get any sound out of the MT-32 device selected. You can download the ROM files from here or here (for personal use only).
These ROMs can be stored anywhere as long as the romdir
setting is pointing to the correct location. The directory can be absolute or relative, or you may leave it blank to use the default mt32-roms
directory in your DOSBox Staging configuration directory. Both interleaved (mt32pi style) and non-interleaved (MAME style) ROM files are supported, and the filenames don't matter as DOSBox Staging identifies them by their checksums.
Although the vast majority of games are best served by the CM-32L model, there are many games that rely on the older MT-32 models (e.g., most of Sierra's early adventure game catalog). Please refer to the table listing the MT-32-compatible games as well as the list on Vogons to know which model works best for a particular game.
DOSBox Staging supports both versioned and unversioned ROMs (more details below) for the CM-32L, CM-32LN, LAPC-I, MT-32 "new", and MT-32 "old" models. Depending on which ROMs are available, DOSBox Staging's default setting (model = auto
) will attempt to load ROMs for CM-32L first, then MT-32 "old", and finally MT-32 "new".
-
Unversioned ROMs are supported for compatibility with game packs created for older DOSBox forks, but their use is discouraged. These other forks expected the MT-32 ROM files to be present in the game folder; it was the user's task to ensure the correct ROM versions were copied into each game folder. They had to be named as follows:
CM32L_CONTROL.ROM CM32L_PCM.ROM MT32_CONTROL.ROM MT32_PCM.ROM
-
Versioned ROMs are the new and better method: all MT-32 ROM files need to be copied to the
romdir
folder, and the file names don't matter as DOSBox Staging identifies the correct ROM files and their versions by their checksums (plus logs warnings about the ones that it could not identify). Learn more by searching for "mt32 mame roms", "cm32l mame roms", "mt32pi roms", or download the full ROM set ready to be used in Staging from here.
Lord Nightmare on Wikipedia has assembled a thorough document of different types of hardware used by various models of MT-32, which is beyond the scope of this wiki.
In DOSBox Staging, run the command MIXER /LISTMIDI
to check which ROM versions were auto-detected and which mode is currently in use. Example output:
In the screen above, mt32_107
is the user's selected model. The green highlighted 'y' additionally indicates which directory will be used during the actual loading.
Note that both the control and PCM ROMs need to be present for a given model. If some model could not be detected, or you're getting Failed to find ROMs for model <model_name>
error at startup, make sure that both ROM sets have been copied to your ROM directory for that model.
To load a different ROM, the following set of commands comes in handy (at the DOS prompt):
config -set mt32 model=mt32_old
config -set midi mididevice=mt32
Or by using the abbreviated form:
model mt32_old
mididevice mt32
This should result in the following log entries on success:
MT32: Initialized MT-32 Control v1.07 from ~/.config/dosbox/mt32-roms/
MIXER: MT32 channel operating at 48000 Hz without resampling
[Top]
- https://github.com/dosbox-staging/dosbox-staging/issues/572
- https://github.com/dosbox-staging/dosbox-staging/pull/539
- https://github.com/dosbox-staging/dosbox-staging/commit/9357eebacea94bcfd1cbb668a384545409da3f03
- https://github.com/dosbox-staging/dosbox-staging/issues/646
- https://github.com/dosbox-staging/dosbox-staging/issues/257
- https://github.com/dosbox-staging/dosbox-staging/issues/964
[Top]