S3M module format (.s3m)

scream-tracker-3's format (1994), documented by sami-tammilehto in TECH.DOC (summary: s-st3-tech-doc). Compared with mod-format it added per-sample tuning (C4Spd, the frequency of middle C), up to 32 channels (16 digital in ST3 itself: 8 left, 8 right — plus 9 AdLib melody and 5 drum channels), a volume column, packed pattern data, initial tempo, speed, global volume and channel panning, and its own effect alphabet AZ; it is the only classic format that mixes samples with OPL2 FM instruments (sources: s-st3-tech-doc, s-openmpt-manual-module-formats). impulse-tracker's it-format extends it.

Limits and header facts#

  • Song name 28 characters; "created with" version (0x1300 = ST 3.00 with volume slides on every frame, 0x1320 = 3.20); flags for 0-volume optimisation, Amiga limits, ST 3.00 volume slides; global volume, initial speed and tempo, master volume with a stereo bit, GUS ultra-click channels; up to 255 orders (255 = end --, 254 = skip ++), 100 patterns of 64 rows × 32 channels; 99 instruments (source: s-st3-tech-doc, s-st3-manual).
  • Samples: 8-bit, unsigned in files since 3.0x, ≤ 64,000 bytes in ST3 (stereo and 16-bit flags exist but "not supported by ST3.01"), loop begin/end (end = one past the last byte), volume 0–64, C2Spd — "actually the frequency in herz for the note C4 … originally in ST2 the middle note was C2 and the name stuck"; 8363 Hz = no finetune (source: s-st3-tech-doc).
  • Pitch: period table C…B = 1712 … 907 for middle octave 4, st3period = 8363 × 16 × (period >> octave) ÷ C2Spd, Amiga period = st3period ÷ 4, Hz = 14317056 ÷ st3period — periods four times finer than the Amiga's, hence extra-fine slides (source: s-st3-tech-doc).
  • Patterns are packed per row (what byte: channel, then note+instrument, volume, command+info as flagged); note 254 = key off (AdLib), 255 = empty (source: s-st3-tech-doc).
  • AdLib instruments store the 11 OPL register bytes per operator pair plus type (melody / bass drum / snare / tom / cymbal / hi-hat) — see opl-fm-instruments (source: s-st3-tech-doc).

Effects#

The AV set of scream-tracker-3 (cheat sheet there). Players later extended it — channel volume Mxx/Nxy, pan slide Pxy, 7-bit pan Xxx, Wxy, Yxy, Zxx, volume-column pan — none original to ST3; OpenMPT marks them as such (source: s-openmpt-manual-effect-reference). Quirks worth knowing: most effects share one parameter memory (only vibrato and tone portamento have their own), effects on muted channels are ignored, Kxy/Lxy cannot fine-slide, a portamento right after an arpeggio continues from the last arpeggiated note, and the GUS driver applies a new sample's volume but not the sample on tone portamento while the Sound Blaster driver swaps samples (source: s-openmpt-manual-compatible-playback). Linear slides do not exist in S3M (source: s-openmpt-manual-effect-reference).

Writing S3M from other trackers#

IT saves S3M only under ST3's limits — 64-row patterns, 16 channels, notes C-1B-8, Amiga slides, no instruments, sustain or ping-pong loops, sample vibrato; newer commands silently dropped (source: s-it-manual); OpenMPT writes S3M with all compatibility settings and can include OPL instruments since 1.28 (sources: s-openmpt-manual-compatible-playback, s-tracker-history-notes).

The format in the scene (1996–97)#

S3M stayed the interchange format after IT appeared: vegas (June 1996) tracked in IT but saved as .s3m "until .IT's are supported by a couple popular players" (source: s-tw062-interview-vegas; see it-format), and mikmak, author of MikMod and MikIT, was running ST3 itself in June 1997 for "s3m replaying research" — the tracker as the reference for how the format should sound (source: s-tw103-interview-mikmak).

scream-tracker-3 · it-format · mod-format · xm-format · openmpt · opl-fm-instruments · effect-command-crosswalk · detune · mikmak

Sources#

s-st3-tech-doc · s-st3-manual · s-openmpt-manual-module-formats · s-openmpt-manual-effect-reference · s-openmpt-manual-compatible-playback · s-it-manual · s-tracker-history-notes · s-tw062-interview-vegas · s-tw103-interview-mikmak

source file wiki/entities/s3m-format.md · graph