Munt

From Modding Fridays
Revision as of 22:12, 6 October 2019 by Ultrageranium (talk | contribs) (MOAR)
Jump to: navigation, search

Munt is a multi-platform software synthesiser emulating pre-GM MIDI devices such as the Roland MT-32 (1987), CM-32L (1989), CM-64 (1989) and LAPC-I (1989). It's useful for listening to MIDI files in a glorious way or get a chance to experience the soundtrack of many DOS games the way they were often originally composed.

Installation

You need two things basically, the Munt software and the ROMS of the synth we want to emulate. Please note that even though MT-32 is often referred to as the ideal DOS gaming sound device, its successor the CM-32L, has some advantages. According to a Roland synth collector:

Roland-LA-Sound-Module-CM-32L-1.jpg

Internally, the CM-32L contains everything that the MT-32 does, but contained an additional 33 samples in it's wave banks. Most of the added samples were sound effects. There are several games that make use of these added sound effects, such as Beneath a Steel Sky and Ultima Underworld. If you play these games with an MT-32, you will get the music, but you will miss out on a few sound effects here and there. This was designed in such a way that an MT-32 user would not know that they were missing anything but the CM-32L, CM-64, CM-500 user would be treated to a nice surprise with extra sounds.

However (dramatic pause), using the latest CM-32L may not be the best thing to do for some games that exploited the faults and issues found in the original MT-32. As explained by The Cranky Hermit:

Roland-Multi-Timbre-Sound-Module-MT-32-2.jpg

The MT-32 went through many iterations and variants. [The main ones are] the very original model (sometimes called the rev0), and the CM-32L. There are plenty of others, but these two will cover all of your bases with regards to playing old games on a new computer. The difference between the two [...] is that the CM-32L has some additional sound effects built into it and fixes a number of firmware bugs. There are also a very small number of games that simply don't work on a rev0. However, many games, especially those by Sierra and Dynamix, actually exploit the rev0's firmware bugs to produce sound beyond its intended ability, and they will not sound right on a CM-32L, or on anything but a rev0. Therefore, the MT-32 rev0 should be the default model to emulate, and the CM-32L to be used only for games which use its sound effects, and also for games known to be incompatible with the rev0 [my emphasis].

ROM files

It's basically copyrighted binaries and data, so they can be a bit tricky to find. You want these files:

  • CM32L_CONTROL.ROM
  • CM32L_PCM.ROM
  • MT32_CONTROL.ROM (find the 1987 unpatched version, that's rev0)
  • MT32_PCM.ROM

They may be available under a slightly different name, just rename them.

Place the files in /usr/share/mt32-rom-data.

md5sum FYI:

bfff32b6144c1d706109accb6e6b1113  CM32L_CONTROL.ROM
08cdcfa0ed93e9cb16afa76e6ac5f0a4  CM32L_PCM.ROM
5626206284b22c2734f3e9efefcd2675  MT32_CONTROL.ROM
89e42e386e82e0cacb4a2704a03706ca  MT32_PCM.ROM

Munt Installation

Note: You may need to install some missing headers here YMMV

git clone https://github.com/munt/munt.git
cd munt
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -Dmunt_WITH_MT32EMU_QT:BOOL=OFF ..  # We don't build the QT tool thing
make
sudo make install
cd ../mt32emu_alsadrv
make
sudo make install

Usage

As a MIDI player

The idea is to get a MIDI player to send MIDI data to the Munt ALSA module.

  • First we start Munt:
mt32d
  • Then we check where the Munt client is:
aconnect -l | grep MT-32
  • On my machine it looks like this, it may be slightly different for yours:
client 128: 'MT-32' [type=user,pid=23689]
aplaymidi *-mt32.mid --port 128

IMPORTANT: If you have installed both MT-32 and CM-32L ROM files, by default mt32d will make use of the CM-32L ROM files. To force it to use the MT-32 romset, start mt32d like this:

mt32d -o 2

As a sound engine for DOSBox

TODO

As an External soundcard

TODO

MOAR

SYSEX init files

Very often, compos for the MT-32 are configuring the voices/syhth in a specific way via SYSEX messages. Usually they will be found in MIDI file itself (which is why some MIDI files seem to take some time to start playing), but sometimes a dedicated SYSEX file can be provided. If that's the case you're expected to load/play it before playing the compos.

GUI for the ALSA plug-in

If you want to have a small MT-32-like graphical interface instead of a daemon, you can start the ALSA plug-in with xmt32 instead of mt32d. Options are the same. Note that you don't need this to see the LCD messages, if you run the dameon as a foreground process it will be printed to stdout.

General MIDI support

The MT-32 predates General MIDI. However Munt provides a GM emulation in case you'd like to feed the MT-32 with GM data. In that case you need to the secondary port of the Munt ALSA interface, namely:

aplaymidi mt32stuff.mid --port 128      # MT-32 interpretation of MIDI stream (default)
aplaymidi mt32stuff.mid --port 128:0    # MT-32 interpretation of MIDI stream
aplaymidi gmstuff.mid --port 128:1      # GM emulation of MIDI stream

Not sure how useful/good it is, the authors say that about it:

128:1 attempts to emulate general midi support using the MT-32 mode, try it for a laugh.

MT-32 MIDI Files