Skip to content
Techniques & Technology

MOD Format

The tracker music revolution

The MOD format combined samples with pattern-based sequencing in a single self-contained file, becoming the standard for game and demo music on the Amiga and across the chiptune scene.

commodore-amigaibm-pcaudiotrackerdemo-sceneformatprotracker

The MOD format began with Karsten Obarski’s Ultimate Soundtracker on the Amiga — Amiga Format’s 1993 PD column still introduced him as the man “who wrote the first soundtracker program” — and was carried on by the hacked Soundtrackers, NoiseTracker and ProTracker that followed. It stores both digitised audio samples and the pattern data that tells the player when to play them — a self-contained music format. Each sample is stored once and replayed, so a tune is the size of its samples, not of its running time; a recording of the same music would be many times larger.

The format’s simplicity made it portable. Within a few years of the Amiga release, MOD players existed for PC, Atari ST, Acorn Archimedes, and even Linux — anywhere with a sample-capable sound chip. Demo coders, BBS sysops, and bedroom musicians spread MODs across modems and floppies; the format became the default soundtrack of the demoscene.

Fast facts

  • Origin: Ultimate Soundtracker (Karsten Obarski, Amiga; sold commercially by MichTron/MicroDeal); the 31-sample M.K. form came from a hacked version; ProTracker V1.0 was on PD disks by December 1990.
  • Channels: 4 in the canonical MOD (one per Paula channel); extensions add more.
  • Samples: 8-bit PCM, up to 31 instruments per file (15 in the earliest variants).
  • Patterns: 64 rows × 4 channels of note data, indexed and chained into a song sequence.
  • Effects: 16 effect commands per note (volume slide, portamento, vibrato, etc.).
  • Typical size: the 1,084-byte header is fixed; the samples are almost all of the file.
  • Extensions: S3M (Scream Tracker), XM (FastTracker II), IT (Impulse Tracker) — each adding channels, finer envelopes, more samples.

File structure

A standard 31-instrument 4-channel MOD has a fixed layout:

Offset Size Field
$0000 20 bytes Song name (zero-padded ASCII)
$0014 31 × 30 bytes Instrument records (see below)
$03B6 1 byte Number of song positions (1-128)
$03B7 1 byte Restart byte (legacy field, usually 127)
$03B8 128 bytes Pattern order table (which pattern plays at each song position)
$0438 4 bytes Format signature: M.K. (4-channel), 4CHN, 6CHN, 8CHN, etc.
$043C N × 1024 bytes Pattern data (N = highest pattern index + 1)
(after) variable Sample data — raw 8-bit signed PCM

The 1084-byte ($043C) header is followed by patterns and then samples. Older 15-instrument MODs have no signature: the pattern table ends at offset 600 ($0258) and the pattern data starts there. Who put the M.K. there is disputed even in the community documentation — the 1993 Usenet compilation says Mahoney & Kaktus inserted it “when they increased the number of samples from 15 to 31”; Andrew Scott’s later revision of the same text says the initials belong to Unknown of D.O.C. Either way the byte is a fingerprint of a hacked Soundtracker, not of Obarski’s original. StarTrekker writes FLT4 or FLT8, and ProTracker 2.3 writes M!K! when a song has more than 64 patterns.

Instrument record (30 bytes)

Offset Size Field
0 22 Instrument name (zero-padded ASCII)
22 2 Sample length in words (so byte length = ×2)
24 1 Finetune (-8 to +7, signed nibble)
25 1 Volume (0-64)
26 2 Loop start in words
28 2 Loop length in words (1 if no loop)

All multi-byte values are big-endian (Motorola 68000 native).

Pattern data (1024 bytes per pattern)

Each pattern is 64 rows × 4 channels × 4 bytes:

Row 0: ch0 ch1 ch2 ch3
Row 1: ch0 ch1 ch2 ch3
...
Row 63: ch0 ch1 ch2 ch3

Each cell is 4 bytes encoding the note, sample, and effect:

   Byte 0          Byte 1          Byte 2          Byte 3
+------------+ +------------+ +------------+ +------------+
| sample.hi  | | period.lo  | | sample.lo  | | effect     |
| period.hi  | |            | | effect.cmd | | parameter  |
+------------+ +------------+ +------------+ +------------+

Decoded:
- sample number: bits (byte0 & $F0) | (byte2 >> 4)
- period:        ((byte0 & $0F) << 8) | byte1
- effect command: (byte2 & $0F)
- effect param:   byte3

The period is the Paula playback period — directly written to AUDxPER. Smaller period = higher pitch. A note table maps musical notes to periods based on the sample’s finetune. Lars Hamre’s 1993 explanation: the sample rate is 7,093,789.2 / (period × 2) on a PAL machine, so “the most normal rate” — C-3, period 214 — plays at 16,574 Hz, and the same sample an octave lower doubles the period and halves the rate.

Effect commands

The effect nibble selects one of 16 commands:

Code Command Behaviour
0 Arpeggio Cycle between three notes within the row
1 Slide up Decrease period (higher pitch)
2 Slide down Increase period (lower pitch)
3 Tone portamento Glide toward target note
4 Vibrato Sine modulation of period
5 Tone portamento + volume slide
6 Vibrato + volume slide
7 Tremolo Sine modulation of volume
8 Not used
9 Set sample offset Skip into sample by param × 256
A Volume slide Add/subtract from volume
B Position jump Jump to song position
C Set volume Direct volume set
D Pattern break Jump to next pattern at row param
E Extended Sub-effects in upper nibble of param
F Set speed/tempo $00-$1F sets speed in ticks per row; $20-$FF sets tempo, where 125 is the 50 Hz VBlank rate. ProTracker’s replayer treats F00 as stop

Paula playback

A MOD player runs at the pattern’s tempo (default 50 ticks/second on PAL Amiga, divided by the speed value). Each tick:

  1. Process effect for each active channel (volume slide, portamento, etc.)
  2. Every speed ticks, advance to the next row
  3. New row: load sample, period, volume into AUDxLC/AUDxLEN/AUDxPER/AUDxVOL, enable DMA

The four MOD channels map directly to Paula’s four DMA channels:

MOD ch Paula ch Stereo side
1 0 Left
2 1 Right
3 2 Right
4 3 Left

This stereo split is hardwired in Paula and gives MODs their distinctive “channels 1+4 left, 2+3 right” panning. Some players add a software mixer to soften it.

The Tracker saga

The format’s history is the history of a program nobody could legally copy and everybody did. Obarski’s Ultimate Soundtracker was a commercial product — MichTron/MicroDeal were promoting it alongside their A.M.A.S. sampler at the World of Commodore show in Toronto in December 1988 — and Amiga Format’s November 1989 review of Games Music Creator recalled “the complaints that surrounded the original Sound Tracker”, starting with the separate “Preset List” editor its instruments had to be declared through. The versions in use were the hacked ones. A reader wrote to Amiga Format in March 1990 that he had bought the original, “but since then I’ve got hold of many other hackers’ versions that are much better”, and asked whether he could pass them on; the editors’ answer was that even if the hackers had rewritten the code from scratch, “Sound Tracker (in all its incarnations) still remains on dodgy ground. Legally, Sound Tracker is still a commercial product”. Amiga Computing’s sequencer roundup that November put it the other way round: Soundtracker “has become famous among both crackers and demo writers”, “chances are that even the games you buy contain tunes produced using Sound Tracker”, yet “due to its legal position — nobody seems to know whether Sound Tracker is now PD or not — the program has been almost impossible to obtain”. The legal alternative it went on to review was TFMX, the in-house tool DemonWare had written for its own games.

The lineage the magazines saw arriving on PD disks is the one the file format records. Amiga Format’s December 1990 PD column found NoiseTracker, StarTrekker (“Noisetracker V2.12, rewritten by a Norwegian who goes by the alias Exolon of Fairlight”) and “Protracker V1.0, which bears a distinct resemblance to the infamous SoundTracker” together on one Amiganuts disk, and called the lot “a noble continuation of the Tracker saga”. The M.K., FLT4 and M!K! signatures at offset 1080 are those programs’ initials. By 1993 the scene had its own press: the AM/FM disk magazine, edited by MED and OctaMED’s author Teijo Kinnunen, ran an interview with Obarski in its eleventh issue.

Format extensions

Format Origin Key additions
MOD Soundtracker (Amiga) Original
S3M Scream Tracker 3 (PC) Up to 32 channels, multiple effect columns, GM/MIDI mapping
XM FastTracker II (PC) Volume/panning envelopes, instrument multi-sample, up to 32 channels
IT Impulse Tracker (PC) New volume column, NNA (new note actions), 64 channels, finer effects

Modern players (libxmp, OpenMPT) handle all four, often with sample-accurate playback. The chiptune scene continues to produce work in all these formats.

See also

Not yet fact-checked. This entry was drafted by an AI and nobody has verified it. The dates, figures and technical details may be wrong. Use it to find your bearings, then confirm anything that matters against a primary source.