Introduction
An RMI file is a Standard MIDI File wrapped in Microsoft’s Resource Interchange File Format (RIFF), the same container as WAV. Microsoft defined it in the early 1990s, in the multimedia specifications that also brought WAV, and Windows shipped several RMI files as sample music. The wrapper lets the file carry RIFF metadata, such as a title and copyright, and from the MMA’s RP-029 of 2000 it can also hold a bank of instrument sounds, so that the music sounds the same on every computer.
The MIDI data inside is a complete Standard MIDI File, byte for byte, so it can be cut
out and saved as a .mid file. The container around it is different, with
little-endian sizes and chunks of its own, so the RIFF MIDI file is a separate format
here. Files are usually named .rmi. In 2001 the MMA’s XMF became its
preferred way of bundling a song with its sounds, but RMI files are still played, and a
community specification, SF2 RMIDI, now uses the container for songs with an embedded
SoundFont.
An .rmi file dropped on any page of this site opens in the explorer,
which shows the RIFF chunks, the INFO text and the MIDI file inside, event by event,
with the notes as a piano roll and the lyrics.
Structure
The file is one RIFF chunk with the form type RMID. Inside,
a data chunk holds a complete Standard MIDI File, beginning
MThd. Optional chunks may follow: a LIST chunk of type
INFO with text such as the name and copyright, and an instrument bank,
Downloadable Sounds (DLS) or a SoundFont, as a nested RIFF chunk. Sizes are
32-bit little-endian, as in every RIFF file, while the MIDI data inside keeps its own
big-endian layout.
0RIFF chunk ID, size and form typeRMID12 bytes12data a complete Standard MIDI File: the header and tracksvaries…LIST INFO name, copyright and other textoptional…RIFF DLS or sfbk an instrument bankoptional
The RIFF container page describes the
chunks around the MIDI data. The other pages describe the MIDI file in the
data chunk, with offsets counted from the start of that file.
Telling it apart
The file starts with RIFF (52 49 46 46), and the four bytes
at offset 8 are RMID (52 4D 49 44). The explorer’s parser for
this format checks both, and then that there is a data chunk whose MIDI
file it can read, by the same rules as for a
Standard MIDI File. A file
without a data chunk is turned down.
A RIFF file of another form, such as WAVE, AVI or a SoundFont’s
sfbk, is not this format. A file that starts with MThd is a
bare Standard MIDI File. Not every file named
.rmi is MIDI: the extension is used for other things too.
Variants
- Standard MIDI File (MThd) – a header chunk and track chunks of timed events, types 0, 1 and 2
- RIFF MIDI file (RMID) – a Standard MIDI File inside a RIFF container, with optional text and a sound bank
Links
Software
- Windows Media Player – Microsoft’s media player, built into Windows, which plays RMI files (Windows)
Developers
- SpessaSynth – SoundFont synthesiser and player that reads MIDI and RMI files with embedded banks (JavaScript)
Reference
- RMID – the Library of Congress’s description of the RIFF MIDI file, with RP-029
- SF2 RMIDI specification – the community extension of RMID with SoundFont banks
- Standard MIDI Files Specification – the MIDI Association’s page for RP-001, the MIDI data inside
- MIDI specifications – the MIDI Association’s specifications, including RMID and DLS