A StarTrekker 8-channel module starts with a 1,084-byte header: the song title, a header for each of the 31 samples, the song length, the restart byte, the order table and the signature. It is laid out exactly as a ProTracker module’s, but the order table names pairs of patterns. The patterns follow straight after it. All numbers are big-endian, and the header has no padding.
Layout
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 20 | text | title | The song title. |
| 20 | 930 | 31 × 30 bytes | samples | The sample headers, sample 1 first. |
| 950 | 1 | u8 | song length | How many positions of the order table are played. |
| 951 | 1 | u8 | restart | A restart position, or a value the player ignores. |
| 952 | 128 | u8 × 128 | order | For each position, the even pattern of the pair played. |
| 1080 | 4 | ASCII | signature | FLT8 or EXO8. |
Title
The first 20 bytes are the song title, as single-byte text padded with zero bytes. A title of exactly 20 characters has no zero after it.
Sample headers
From offset 20 come 31 sample headers of 30 bytes each. Sample numbers in the patterns count from 1, so the header of sample n is at 20 + (n − 1) × 30. A sample that is not used has a length of 0.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 22 | text | name | The sample name, padded with zero bytes. |
| 22 | 2 | u16 | length | The length in words of 2 bytes, so the data is 2 × length bytes. 0 means no sample. |
| 24 | 1 | u8 | finetune | The low four bits are a signed finetune, −8 to +7 eighths of a semitone. The high four bits are unused. |
| 25 | 1 | u8 | volume | The default volume, 0 to 64 (40). |
| 26 | 2 | u16 | loop start | Where the loop starts, in words. |
| 28 | 2 | u16 | loop length | The length of the loop in words. 1 means no loop. |
00000014 62 61 73 73 00 00 00 00 00 00 00 00 00 00 00 00 bass............
00000024 00 00 00 00 00 00 04 00 00 40 00 00 04 00 .........@....
The name is “bass”; the length 04 00 is 1,024 words, 2,048 bytes; finetune
0, volume 64; the loop starts at 0 and is 1,024 words long, so the whole sample
repeats.
Finetune
The low four bits of byte 24 are a signed finetune in eighths of a semitone:
| Low four bits | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Finetune | 0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | −8 | −7 | −6 | −5 | −4 | −3 | −2 | −1 |
The note’s period is looked up in ProTracker’s table for the sample’s finetune (see periods). The explorer reports a byte with any of the high four bits set.
Loops
Both loop fields count words. As the explorer plays them, following ProTracker:
- If the loop length is 1 (or 0), there is no loop: the sample plays once, from its start to its length.
- If the loop start is 0 and the loop length is more than 1, the sample plays its
first
lengthwords, then repeats its firstloop lengthwords. - If the loop start is not 0, the sample plays from its start to the end of the loop,
loop start + loop lengthwords, then repeats the loop. Data after the end of the loop is never played.
A loop that ends after the end of its sample is a fault of the file, which the explorer reports.
Song length
The byte at offset 950 is the number of positions in the song, 1 to 128: positions 0 to song length − 1 of the order table are played, in order. The explorer reports a value of 0 or above 128.
Restart
The byte at offset 951 is, in NoiseTracker’s use, the position to go back to after the
last one; ProTracker writes 127 (7F) there and ignores it. What StarTrekker
wrote here is not recorded in the sources used for this page. The explorer’s player
does not use the byte.
Order table
The 128 bytes from offset 952 give, for each position, the number of the first
stored pattern of the pair to play. The entries are even: 0 means the pair of stored
patterns 0 and 1, 2 the pair 2 and 3, and so on, so the 8-channel pattern played is the
entry divided by two. OpenMPT’s loader puts it plainly: “FLT8 has only even order
items, so divide by two”. Only the first song length entries are played;
the explorer reports an odd entry among them.
The number of stored patterns is worked out as for a ProTracker module, from the highest number in all 128 entries, and rounded up to whole pairs:
pairs = (highest entry ÷ 2, rounded down) + 1
stored = 2 × pairs 4-channel patterns of 1,024 bytes
000003B6 05 7F 00 02 04 02 06 00 00 00 …
The song is 5 positions long and plays the 8-channel patterns 0, 1, 2, 1 and 3. The highest entry is 6, so 4 pairs, 8 stored patterns, are in the file, and the sample data starts at 1084 + 8 × 1,024 = 9,276.
Signature
The four bytes at offset 1080 are FLT8 or EXO8:
| Signature | Bytes | Meaning |
|---|---|---|
FLT8 | 46 4C 54 38 | StarTrekker, 8 channels as pairs of 4-channel patterns |
EXO8 | 45 58 4F 38 | The same, as OpenMPT reads it |
FLT4 and EXO4, StarTrekker’s 4-channel signatures, mark
files laid out as ProTracker modules. Other
8-channel signatures, such as 8CHN, CD81 and
OKTA, store 8 cells in each row and belong to the
multichannel format.
00000438 46 4C 54 38 FLT8
438 in hexadecimal)