An XM file starts with a 60-byte identification block and then a header whose size is stored first. Numbers are little-endian. Offsets are decimal. FastTracker 2 came with no official specification; this reference follows the XM format notes by Matti Hamalainen, and FastTracker 2 clone’s source for what they leave out.
Layout
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 17 | ASCII | ID text | Extended Module: , with a trailing space. |
| 17 | 20 | text | module name | Padded with zero bytes. |
| 37 | 1 | u8 | marker | Always 1A. |
| 38 | 20 | text | tracker name | The program that wrote the file. |
| 58 | 2 | u16 | version | High byte major, low byte minor. The current format is 0x0104. |
| 60 | 4 | u32 | header size | Size of the header counted from offset 60, including these four bytes. Usually 276. |
| 64 | 2 | u16 | song length | Entries of the order table in use, 1 to 256. |
| 66 | 2 | u16 | restart | Position in the order table to go back to at the end. |
| 68 | 2 | u16 | channels | Number of channels: 2 to 32 in even steps. |
| 70 | 2 | u16 | patterns | Number of patterns, up to 256. |
| 72 | 2 | u16 | instruments | Number of instruments, up to 128. |
| 74 | 2 | u16 | flags | Frequency table. |
| 76 | 2 | u16 | tempo | Default speed: ticks per row, up to 31. |
| 78 | 2 | u16 | BPM | Default beats per minute, 32 to 255. |
| 80 | 256 | u8 × 256 | order table | The pattern for each position. |
Limits from FastTracker 2 itself: 32 channels, 256 patterns, 128 instruments, 16 samples per instrument, 256 rows per pattern and 256 orders.
Flags
| Bit | Meaning |
|---|---|
| 0 | Frequency table: 0 Amiga, 1 linear. See frequency. |
Versions
Version 0x0104 stores the patterns first, then each instrument with its
samples. Older versions differ, as OpenMPT’s loader records:
| Version | Layout |
|---|---|
0x0104 and later | Patterns, then instruments, each followed by its sample data. |
below 0x0104 | Instrument and sample headers first, then the patterns, then all the sample data. |
0x0102 | The pattern header’s row count is one byte holding rows − 1, instead of the 16-bit count. |
No public document gives the layout of older versions. The XM notes say only that
versions before 0x0104 differ “a lot”.
Tracker names
| Tracker name | Written by |
|---|---|
FastTracker v2.00 | FastTracker 2, and IT2XM, whose output cannot be told apart this way |
FastTracker v 2.00 | ModPlug Tracker 1.0, an old version |
OpenMPT | OpenMPT |
MilkyTracker | MilkyTracker |
Fasttracker II clone | FastTracker 2 clone |
MadTracker 2.0 | MadTracker 2 |
Skale Tracker, Sk@le Tracker | Skale Tracker |
*Converted … -File* | Digitrakker, with the file type between |
rst's SoundTracker | SoundTracker, which adds Qxx and Zxx filter effects |
DigiTrakker sometimes writes the composer’s name in this field. Envelope frame values above 255 suggest a file that did not come from FastTracker 2.