An S3M module starts with a 96-byte header, followed by the order list, parapointers and
an optional panning table. The format is little-endian. Offsets are hexadecimal. It is
defined in TECH.DOC, the technical notes that come with Scream Tracker 3.
Layout
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 00 | 28 | text | song name | Terminated by a zero byte. |
| 1C | 1 | u8 | marker | Always 1A. |
| 1D | 1 | u8 | type | 16 (10) for an S3M module. |
| 1E | 2 | – | reserved | |
| 20 | 2 | u16 | OrdNum | Number of orders. Should be even. |
| 22 | 2 | u16 | InsNum | Number of instruments. |
| 24 | 2 | u16 | PatNum | Number of patterns. |
| 26 | 2 | u16 | Flags | Song options. |
| 28 | 2 | u16 | Cwt/v | The tracker that wrote the file: high four bits the tracker, low twelve bits the version. |
| 2A | 2 | u16 | Ffi | Sample format: 1 for the very old signed samples, 2 for unsigned samples. |
| 2C | 4 | ASCII | signature | SCRM. |
| 30 | 1 | u8 | GV | Global volume, 0 to 64. |
| 31 | 1 | u8 | IS | Initial speed (command A). 0 or 255 means keep the value from the last song. |
| 32 | 1 | u8 | IT | Initial tempo (command T). Values below 33 are ignored. |
| 33 | 1 | u8 | MV | Master volume, low seven bits, 16 to 127. Bit 7 set means stereo. |
| 34 | 1 | u8 | UC | Ultra-click removal, for the Gravis Ultrasound: 8, 12 or 16. Scream Tracker’s order screen shows half the value. |
| 35 | 1 | u8 | DP | 252 (FC) if a panning table follows the header; anything else means there is none. |
| 36 | 8 | – | reserved | Some trackers put their own data here. |
| 3E | 2 | u16 | Special | Parapointer to custom data, valid when Flags bit 7 is set. |
| 40 | 32 | u8 × 32 | Channel settings | One byte per channel. |
| 60 | OrdNum | u8 | Orders | The order list. |
| … | InsNum × 2 | u16 | Instrument parapointers | |
| … | PatNum × 2 | u16 | Pattern parapointers | |
| … | 32 | u8 × 32 | Pan table | When DP is 252. |
Flags
| Bit | Value | Meaning when set |
|---|---|---|
| 0 | 1 | ST2 vibrato. Before Scream Tracker 3.01 only. |
| 1 | 2 | ST2 tempo. Before 3.01 only. |
| 2 | 4 | Amiga slides. Before 3.01 only. |
| 3 | 8 | Zero-volume optimisation: looping notes that stay at volume 0 for more than two rows are turned off. |
| 4 | 16 | Amiga limits: notes beyond the Amiga’s range are not played. The period range is 113 to 856. |
| 5 | 32 | Enable filter and sound effects on the Sound Blaster. Before 3.01 only. |
| 6 | 64 | Scream Tracker 3.00 volume slides: slides also run on the first tick. Set automatically when Cwt/v is 1300. |
| 7 | 128 | Special custom data is present. |
Tracker versions
| Cwt/v | Program |
|---|---|
1xyy | Scream Tracker 3.xx: 3.00 is 1300, 3.01 1301, 3.03 1303, 3.20 1320 |
2xyy | Imago Orpheus |
3xyy | Impulse Tracker |
4xyy | Schism Tracker, with its own numbering |
5xyy | OpenMPT |
Other programs reuse these numbers: Liquid Tracker shares OpenMPT’s, for example. The list is not closed.
Channel settings
Each of the 32 channels has one byte. FF means the channel is unused. Bit
7 set means the channel is disabled.
| Low seven bits | Channel |
|---|---|
| 0–7 | Left sample channels 1 to 8. |
| 8–15 | Right sample channels 1 to 8. |
| 16–24 | AdLib melody channels 1 to 9. |
| 25–29 | AdLib percussion: bass drum, snare, tom, cymbal, hi-hat. Scream Tracker 3 does not implement them. |
Two pattern channels can feed one output channel. Only Scream Tracker supports this fully, and only the last channel’s effects are applied.
Order list
OrdNum bytes from offset 60, each a pattern number. 255 ends the tune, and
254 is a marker skipped during playback. OrdNum should be even.
Parapointers
Instruments and patterns are found through parapointers: 16-bit values giving the file offset divided by 16. The file offset is parapointer × 16.
| Table | Starts at | Entries |
|---|---|---|
| Instruments | 60 + OrdNum | InsNum |
| Patterns | 60 + OrdNum + InsNum × 2 | PatNum |
| Pan table | 60 + OrdNum + (InsNum + PatNum) × 2 | 32 |
Scream Tracker places the sample data at the end of the file, but the parapointers can point anywhere.
Panning table
When DP is 252, 32 pan bytes follow the parapointers.
| Bits | Meaning |
|---|---|
| 0–3 | The pan position. |
| 5 | Set: use this pan position. Clear: use the default. |
| 6–7 | Reserved. |
The default is 7 for a mono song, or 3 (left) and 12 (right) for a stereo song.
Timing
A tick lasts 2.5 ÷ tempo seconds, so at speed S each row takes 2.5 × S ÷ tempo seconds.