Introduction
ProTracker 3.59, in 1996, could save a module in a file of a new form: an IFF file, the same outer shape as Amiga pictures and sounds, holding the song’s version, some information about it, a comment and the module itself. Later versions to 3.62 write it too. The module inside is an ordinary ProTracker module, so the wrapper is the only thing a reader must add.
No specification of the wrapper was published; what follows is from OpenMPT’s loader for it, which is the source of everything here.
A .mod file of this kind dropped on any page of this site opens in the
explorer, which shows each chunk and gives the embedded module an Open button; opened,
it is read and played as any other module.
Structure
A 12-byte header, then chunks, one after the other to the end of the file. All numbers are big-endian.
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 4 | magic | FORM |
| 4 | 4 | size | The form size. OpenMPT does not check it. |
| 8 | 4 | type | MODL |
Each chunk is an 8-byte header, four letters and a 32-bit size, then its data. The
size of a chunk counts the 8-byte header, and the first chunk’s also counts the four
bytes of MODL: subtract 8 for the data length, and 4 more for the first
chunk. A chunk with another name is skipped.
VERS: the version
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 4 | skipped | Skipped. |
| 4 | 2 | magic | PT |
| 6 | rest | version | Text, such as 3.61. If there is none, 3.6 is assumed. |
INFO: the song
The chunk must be exactly 64 bytes:
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 32 | name | The song’s name, up to 32 characters; if the first byte is not 0 it replaces the title in the module. |
| 32 | 2 | samples | Read by OpenMPT but not used. |
| 34 | 2 | orders | Read by OpenMPT but not used. |
| 36 | 2 | patterns | Read by OpenMPT but not used. |
| 38 | 2 | volume | If not 0, a sample pre-amp, at most 64. |
| 40 | 2 | tempo | If not 0 and the song does not use vertical-blank timing, the default tempo. |
| 42 | 2 | flags | Bit 8 (0100) set means CIA timing; clear means vertical-blank timing. |
| 44 | 12 | date saved | Six 16-bit numbers: day, month, year since 1900, hour, minute and second. |
| 56 | 8 | playing time | Four 16-bit numbers: hours, minutes, seconds and milliseconds. Read by OpenMPT but not used. |
CMNT: author and comment
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 32 | author | Text. UNNAMED AUTHOR means none. |
| 32 | rest | comment | Text, wrapped to lines of 40 characters. |
PTDT: the module
The chunk’s data is a whole module, starting with the module’s title. OpenMPT reads
more than the chunk’s stated size, because some files record their sample sizes
wrongly. A reader should use the size only as a guide and read the module by its
own header. OpenMPT plays the module with vertical-blank timing if the flags say so,
and with the pre-amp and tempo from INFO.
Also used for
- Go module file – A Go module's path, Go version and dependencies, as line-oriented UTF-8 text.
Variants
- ProTracker module (M.K.) – 31 samples and 4 channels, marked M.K. at offset 1080: the standard Amiga module
- Multichannel module (xCHN, xxCH) – 31 samples and any channel count other than 4, marked 6CHN, 8CHN, 16CH and so on
- StarTrekker 8-channel module (FLT8) – 8 channels, each pattern stored as two 4-channel patterns
- Soundtracker module (15 samples) – the first modules, 1987 to 1989: 15 samples and no signature
- ProTracker 3.6 module (IFF) – an IFF wrapper around a module, with version, song information and a comment
Links
Software
- OpenMPT – free tracker that opens these files (Windows)
Developers
- libopenmpt – OpenMPT’s playback library, which reads them (C, C++)
Reference
- OpenMPT’s ProTracker 3.6 loader – the chunks and their fields (C++)