Each pattern is found through the pattern parapointers and has 64 rows of up to 32 channels.
Packed pattern
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | u16 | Length | Total packed length, including these two bytes. |
| 2 | Length − 2 | bytes | data | Rows, packed as below. |
Packing
Each row is a run of channel entries ended by a zero byte. An entry starts with a “what” byte:
| Bits | Meaning |
|---|---|
| All zero | End of the row. |
0–4 (&31) | The channel number, 0 to 31. |
5 (&32) | Note and instrument follow, one byte each. |
6 (&64) | Volume follows, one byte. |
7 (&128) | Command and info follow, one byte each. |
E0 50 01 30 01 06 00
Fields
| Field | Values |
|---|---|
| Note | High four bits the octave, low four bits the note (0 = C to 11 = B). 255 means no note, 254 means a key off. |
| Instrument | 1 to 99; 0 means none. |
| Volume | 0 to 64; 255 means use the instrument’s default. |
| Command | 1 to 26 for A to Z; 255 means none. See Effects. |
| Info | The command’s parameter. |
Scream Tracker keeps a 5-byte form of these fields in memory: 32 channels × 64 rows × 5 bytes, about 10 KB per pattern. That is internal and does not appear in the file.
Volume column
Scream Tracker’s volume column sets the volume only. OpenMPT adds panning in the same
column (pxx, 0 to 64), which is not original Scream Tracker behaviour.
Notes and periods
The period table used from C to B is 1712, 1616, 1524, 1440, 1356, 1280, 1208, 1140, 1076, 1016, 960, 907. A note’s period is:
period = 8363 × 16 × (table[note] >> octave) ÷ C2Spd
The clock is 14,317,456 Hz. TECH.DOC’s 14,317,056 is wrong.