Jazz 2 Music Format

From ModdingWiki
Jump to navigation Jump to search
Jazz 2 Music Format
Format typeMusic
Notation typeTracked
InstrumentsPCM
Max channel count255 (practically limited to 64 by source formats)
Max track count1
Max pattern count256
Max order count256
Tags?Title, instrument names, sample names
Games

The J2B format is just a container for the custom format of the Galaxy Sound System, RIFF AMFF or RIFF AM.

Container Header

The file header is 24 bytes long:

Data type Name Description
char[4] format identifier "MUSE"
UINT32LE format subtype 0xDEADBEAF (RIFF AM) or 0xDEADBABE (RIFF AMFF); indicates the file content, but is pretty useless (you should not rely on this at all!)
UINT32LE size Size of the complete file
UINT32LE checksum Checksum of the data block (before decompression)
UINT32LE compressed size Length of the data block before decompression (should be file size - 24 bytes)
UINT32LE uncompressed size Length of the data block after decompression
char[] music data This is the actual music file in either RIFF AMFF or RIFF AM format; It's compressed using standard zlib compression. Simply use zlib's "uncompress" macro to read this.

Data body

The uncompressed data body contains a module in either RIFF AMFF or RIFF AM format. Both formats are rather similar, but RIFF AM follows the RIFF conventions more strictly. RIFF AMFF was only used in early versions of Jazz Jackrabbit 2, which explains why RIFF AM is generally the more advanced format of the two. RIFF AMFF is internally very close to the XM format, with a few additions to support some S3M / IT commands.

Tools

The following tools are able to work with files in this format.

Name PlatformPlay? Create new? Modify? Convert/export to other? Import from other? Access hidden data? Edit metadata? Notes
OpenMPT WindowsYesNoNoManyNoNoNo
mod2j2b WindowsNoYesNoNoMOD, XM, S3M, IT, MTM, 669NoNo Some formats are converted rather poorly (e.g. MTM, 669). There are two different mod2j2b executables for AM and AMFF files.