Kris' Music System Voice Format

From ModdingWiki
Jump to navigation Jump to search
Kris' Music System Voice Format
Format typeMusical Instrument
HardwareOPL, MIDI, PC Speaker
Number of instruments65535
Instruments named?Yes, 4 chars
Games

The Kris' Music System Voice Format is used to store the instrument settings for songs in Kris' Music System Format. There are different variants of the format for different audio hardware.

File format

The file begins with a header:

Data type Name Description
UINT32LE lenFile File length (sometimes files are longer than this though)
UINT16LE numInstruments Number of instruments in the file
char[4][numInstruments] titles List of four-character instrument titles, not null-padded, one for each instrument one after the other with no separators.
UINT32LE[numInstruments] offInst Offset where instrument data begins, relative to the end of this header

This is followed by the instrument data. The offInst[0] is always zero, as the instrument offsets are relative to the end of the above header and the first instrument always follows directly.

Instrument data

Each instrument begins with the following data.

Data type Name Description
UINT16LE lenInst Length of instrument data, in bytes (0x64 for Adlib, 0x5D for MT32, Tandy, and PC Speaker
UINT16LE unknown Always 0x0001

! Work out rest of instrument data

Tools

There are no known tools that work with files in this format.

Credits

This file format was reverse engineered by Malvineous. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)