home *** CD-ROM | disk | FTP | other *** search
- ProTracker file formats
- ------------------------
- Note: Throughout this file, the term 'SoundTracker' (or ST) is used to
- stand for any application capable of processing song data in a manner
- similar to Arc ProTracker.
-
- Arc ProTracker uses optimised new-format SoundTracker modules
- (TFF - Tracker file format)
-
- ProTracker can load the following format files directly without conversion:
-
- ST Modules
- ----------
-
- Source Filetype Format Tracks Samples
- ------ -------- ------ ------ -------
- Tracker 1.0 &CB6 New 1-8 36
- Oktalyser 1.1 &CB6 Oktal 4-8 36
- Arc ProTracker 0.2 &CB6 New 1-8 0-47
- TechTracker 2.0 &CB6 New 1-8 0-47 (forthcoming)
- Sonic City 1.0 &CB6 New 1-8 0-47 (forthcoming)
- StarTrekker 1.3 &CB6/&CC5 Old 4/8 31
- SoundTracker 2.5 &701/&CB6 Old 4 15/31
- ProTracker 1.1 ... &701/&CB6/&CC5 Old 4 31
- NoiseTracker &701/&CB6/&CC5 Old 4 31
-
- Where &701 = "ProTrack"
- &CB6 = "STModule"
- &CC5 = "TeqMusic"
-
- Samples
- -------
-
- Source Filetype Format
- ------ -------- ------
- AudioMaster III (IFF) &7B4 Linear signed
- Tracker 1.0 (TFF) &CB5 Logarithmic
- ProTracker (TFF) &CB5 Logarithmic
- Armadeus &D3C Logarithmic/Linear signed
-
- Where &7B4 = "IFF Samp"
- &CB5 = "STSample"
- &D3C = "Sample"
-
- Note: IFF Samples take account of the name, length, and loop points
- Note: TFF Samples take account of the name, length, volume, finetune
- and loop points
- Note: Armadeus samples take account of the sample rate (stored as the first
- byte of the file)
- Note: ProTracker generally hasn't a clue about the data format. Use the
- 'Log samples' option is the 'Options' sub-menu to select the data
- type for loading samples
-
- Patterns
- --------
-
- Source Filetype Format
- ------ -------- ------
- Tracker 1.0 (TFF) &FF1 Fixed width 8 tracks, fixed length 64 events
- ProTracker (TFF) &7B3 Variable width, variable length
-
- Where &7B3 = "Pattern"
- &FF1 = "RawData"
-
- ProTracker can save the following format module files:
-
- Source Filetype Tracks Samples
- ------ -------- ------ -------
- Arc ProTracker 0.2 &CB6 1-8 0-47 (TechTracker/Sonic City)
- StarTrekker 1.3 &CC5 4/8 31
- SoundTracker 2.5 &CC5 4 31
- ProTracker 1.1 ... &CC5 4 31
- NoiseTracker &CC5 4 31
-
- Saving old format tunes with Arc ProTracker
- -------------------------------------------
- If the tune contains 4 or less tracks, then the first 4 tracks and first
- 31 instruments will be saved, and the string 'M.K.' will be inserted into the
- file.
- If the tune contains 5 or more tracks, then all 8 will be saved, along with
- 31 instruments, and the string 'FLT8' will be inserted into the file.
- N.B. these files can only be used by Fairlight's StarTrekker.
-
- The following will be ommitted from the old format file:
-
- 1. Author name
- 2. 'P' commands (set stereo)
- 3. 'L' commands (line jump)
- 4. 'R' commands (set sample rate)
- 5. 'X' commands (extra)
-
- Also any 'G' and 'H' commands will be converted into 'A' commands. As old
- format does not support 'G' and 'H', this is the nearest approximation. In
- most cases, there is very little difference anyway!
- Old format also does not support 'V' commands, so they will also be rounded
- to the nearest 'C' commands.
-
- But you will be able to load the file into the present generation of Amiga
- SoundTrackers. Future versions will support new format directly (we hope!)
-
- .---------------------------------------------------------------------------.
- | WE SUGGEST YOU ALWAYS KEEP A COPY OF TUNE IN THE NEW FORMAT, |
- | AS ALL THE DATA FROM OTHER FORMATS IS PRESERVED !!!! |
- '---------------------------------------------------------------------------'
-
- New format module file structure (&CB6)
- ---------------------------------------
- A new format module consists of a number of four byte chunks and the offset
- to the next chunk (in bytes). This makes for a very flexible file structure.
- (And it also makes the file human readable!!)
-
- MUSX - music extent TINF - tune information
- MVOX - music voices STER - default stereo positions
- MNAM - music name ANAM - author name
- MLEN - music length (& restart pos.) PNUM - patterns (number)
- PLEN - pattern lengths SEQU - sequence
- PATT - pattern data
- SAMP - indicates a sample SNAM - sample name
- SVOL - sample volume (& finetune) SLEN - sample length
- ROFS - repeat offset RLEN - repeat length
- SDAT - sample data follows
-
- There now follows a byte by byte analysis of a new format file (from the very
- beginning):
-
- Offset Chunk Offset Bytes Description
- ------ ----- ------ ----- -----------
- 0 MUSX 4 length (eXtent) of the music
- 8 TINF 04 00 00 00 4 source of tune (see below)
- 20 MVOX 04 00 00 00 4 number of tracks
- 28 STER 08 00 00 00 8 defualt stereo positions list (1-7 per track)
- 44 MNAM 20 00 00 00 32 music name (zero-terminated)
- 84 ANAM 20 00 00 00 32 author name (zero-terminated)
- 124 MLEN 04 00 00 00 4 LSB - music length (no. of positions)
- MSB - restart position
- 136 PNUM 04 00 00 00 4 number of patterns
- 148 PLEN 40 00 00 00 64 pattern lengths for patterns 0-63
- 220 SEQU 80 00 00 00 128 sequence list (positions 0-127)
- each byte contains the pattern no. for that
- position
- 356... PATT YY XX 00 00 &XXYY pattern data. &XXYY is the length of the
- pattern (ie. pattern length x 4 x tracks)
-
- There are as many PATT chunks in the file as the PNUM indicates.
- The sample data immediately follows the PATTs.
-
- A new format tune can consist of from 1 to 8 tracks, and each pattern can
- consist of 1 to 64 events. Each note in the pattern is stored as 4 bytes, and
- all the notes at each event in the pattern are stored after each other.
-
- eg. for four tracks 00 - chan1 chan2 chan3 chan4
- 01 - chan1 chan2 chan3 chan4
- 02 - chan1 chan2 chan3 chan4
- eg. for eight tracks 00 - chan1 chan2 chan3 chan4 chan5 chan6 chan7 chan8
- 01 - chan1 chan2 chan3 chan4 chan5 chan6 chan7 chan8
- 02 - chan1 chan2 chan3 chan4 chan5 chan6 chan7 chan8
-
- Info for each note:
-
- byte 1 byte 2 byte 3 byte 4
- / \ / \ / \ / \
- 00000000 00000000 00000000 00000000
-
- Parameter Effect Sample No. Note No.
-
- The reason for the apparent backwards-ness of this arrangement is that an
- Archimedes word is stored LSB first - therefore an entire note can be loaded
- as a word and the data appears in that word in the correct order
- ie. 'Note No. - Sample No. - Effect - Parameter'
-
- Sample data (TFF)
- -----------------
- The sample data immediately follows the pattern data in a new format module.
- There may be up to 47 SAMP chunks for each of the 47 samples a module can
- contain. Not all need to be present. The 'All' option on the 'Save Samp.s'
- sub-menu of the 'Options' sub-menu (from PT's iconbar menu) toggles whether
- all 47 are saved, or whether the samples up to the last one used are saved.
-
- Chunk Bytes Description
- ----- ----- -----------
-
- SAMP ZZ YY XX 00 0 sample identifier: &XXYYZZ is the block length
- SNAM XX 00 00 00 &XX sample name &XX bytes long (not nesc. zero
- terminated, so beware!)
- SVOL 04 00 00 00 4 LSB - volume (0-&FF)
- MSB - finetune value (4 bit 2s complement)
- SLEN 04 00 00 00 4 the exact length of the sample (in bytes)
- ROFS 04 00 00 00 4 repeat offset in bytes
- RLEN 04 00 00 00 4 repeat length in bytes
- SDAT ZZ YY XX 00 &XXYYZZ sample data: &XXYYZZ is the exact length
-
- The finetune byte only uses the least significant nibble, so the most
- significant nibble should be set to zero.
-
- Old format module file structure (&701/&CC5/&CB6)
- -------------------------------------------------
- There now follows a byte by byte analysis of an old-format file
- (ProTracker 1.1B song/module format with NoiseTracker extensions)
-
- Offset Bytes Description
- ------ ----- -----------
- 0 20 music name (zero-terminated)
-
- Information for sample 1-31:
-
- Offset Bytes Description
- ------ ----- -----------
- 20 22 sample name for sample 1: fixed length 22 characters
- 42 2 sample length for sample 1. Stored as number of Amiga words.
- Multiply by two to get real sample length in bytes.
- 44 1 LSN - finetune value (4 bit 2s complement).
- MSN - should be set to zero.
- 45 1 log volume for sample 1. Range is &00-&40.
- 46 2 repeat offset for sample 1. Stored as number of Amiga words
- Multiply by two to get offset in bytes.
- 48 2 repeat length for sample 1. Stored as number of Amiga words in
- loop. Multiply by two to get length in bytes.
-
- Information for the next 30 or 14 samples starts here. It's just like the
- info for sample 1.
-
- Offset Bytes Description
- ------ ----- -----------
- 50 30 Sample 2...
- 80 30 Sample 3...
- .
- .
- .
- 890 30 Sample 30... (assuming 31 instruments)
- 920 30 Sample 31...
-
- Offset Bytes Description (assuming 31 instruments)
- ------ ----- -----------
- 950 1 music length (no. of positions)
- 951 1 restart position
- 952 128 sequence list (positions 0-127) each byte contains the pattern no. for that position
- 1080 4 The four letters "M.K." - This is something Mahoney & Kaktus
- inserted when they increased the number of samples from
- 15 to 31. If it's not there, the module/song uses 15 samples
- or the text has been removed to make the module harder to
- rip. StarTrekker puts "FLT4" or "FLT8" there instead.
-
- Offset Bytes Description (assuming 31 instruments)
- ------ ----- -----------
- 1084... 1024 data for pattern 0.
-
- There are as many patterns as the highest number+1 in the sequence list.
- A 15 instruments module will contain exactly the same data, only the offsets
- listed above will be 480 bytes less as there are 16 less samples and the
- 'M.K.' string does not exist.
-
- An old format tune can consist of only 4 tracks and each pattern is a fixed
- 64 events long. Each note in the pattern is stored as 4 bytes, and all four
- notes at each event in the pattern are stored after each other.
-
- 00 - chan1 chan2 chan3 chan4
- 01 - chan1 chan2 chan3 chan4
- 02 - chan1 chan2 chan3 chan4
-
- Info for each note:
-
- ______byte 1______ byte 2 ______byte 3______ byte 4
- / \ / \ / \ / \
- 0000 0000-00000000 0000 0000 00000000
-
- Upper four 12 bits for Lower four Effect Parameter.
- bits of sample note period. bits of sample
- number. number.
-
- The sample data immediately follows the pattern data in an old format module.
- As each sample is un-headered (unlike new-format, and Oktalyser) its start
- and end positions must be calculated by adding the lengths of the previous
- samples for the start, and adding the sample's length itself for the end.
-
- Note: The Amiga words that exist in the sample information block at the
- beginning of the module are only 16 bits long and are stored MSB
- first. To convert to an Archimedes word, load both as separate bytes
- and EOR the left byte shifted left 8 times, with the second.
- The reverse is also the case.
-
- StarTrekker 8 channel files
- ---------------------------
- With StarTrekker 8 channel format, only even pattern numbers are allowed
- ie. 0,2,4 etc. The odd patterns store the latter 4 channels of the previous
- pattern, eg. Pattern 0's first 4 channels exist in pattern 0, and the
- latter 4 channels are stored in pattern 1.
- The format of the module is identical to a 31 instrument SoundTracker file.
-
- Oktalyser 1.1 files
- -------------------
- Oktalyser files are very similar to Arc ProTracker files, in that the tune
- is composed of several human readable chunks.
-
- Offset Bytes Description (Tune data)
- ------ ----- -----------
- &00 4 TINF = "OKTA"
- &04 4 Identifier = "SONG"
- &08 8 Chunk "CMOD" & length
- &10 8 4 channel pairs (T) = Number of voices
- &18 8 Chunk "SAMP" & length
-
- Offset Bytes Description (Sample info data)
- ------ ----- -----------
- &00 22 Sample name
- &16 2 Sample length (MSB first) (S)
- &18 2 Repeat offset (MSB first)
- &1A 2 Repeat length (MSB first)
- &1C 2 Log. volume (MSB first)
- &1E 2 Mode flag
-
- Offset Bytes Description (Tune data)
- ------ ----- -----------
- &4A0 8 Chunk "SPEE" & length
- &4A8 2 Speed (MSB first)
- &4AA 8 Chunk "SLEN" & length
- &4B2 2 Number of PBOD chunks in file
- &4B4 8 Chunk "PLEN" & length
- &4BC 2 Music length (MSB first)
- &4BE 8 Chunk "PATT" & length
- &4C0 L Pattern data
-
- Offset Bytes Description (Pattern data)
- ------ ----- -----------
- ... 8 Chunk "PBOD" & length
- ...+8 2 Pattern length (MSB first) (L)
- ...+10 T*4*L Actual pattern data
-
- Offset Bytes Description (Sample data)
- ------ ----- -----------
- ... 8 Chunk "SBOD" & length
- ...+8 Sr Actual sample data
-
- Note: All chunk lengths are MSB first 32bit words.
- Sr is a two-byte aligned version of S.
- The volume and repeat values are only loaded if the mode flag is
- non-zero. (Therefore their values are meaningless if the flag is zero)
-
- TFF Sample file format (&CB5)
- -----------------------------
- When individual samples are saved by PT, the format of the file is
- exactly the same as a single SAMP block in a module. The 'Block length'
- word must still be valid even though there aren't any more SAMPs!!!
-
- Alternative sample formats
- --------------------------
- Although the sample data stored in a module is of TFF format, there is no
- reason why you should not load samples of other types into TT.
- Currently supported types are: Raw logarithmic, Raw linear, TFF Log,
- TFF Linear, Armadeus Log, Armadeus Linear, IFF Log, IFF Linear
-
- IFF Sample file format (&7B4)
- -----------------------------
- IFF Samples are a common format for interchanging sample data between
- applications/computers. ProTracker can load standard IFF samples of the
- following format:
-
- FORM - indicates an IFF file VHDR - header
- NAME - sample name ANNO - annotation (eg. source)
- BODY - sample data
-
- Offset Chunk Offset Bytes Description
- ------ ----- ------ ----- -----------
- 0 FORM 00 00 XX YY 4 sample identifier: &XXYY is the block length
- data bytes: unique to each sample
- 8 VHDR 00 00 00 14 20 header information
- 40 NAME 00 00 00 14 20 sample name (zero-terminated)
- 68 ANNO 00 00 00 14 20 name of source program
- 96 BODY 00 00 XX YY &XXYY sample data: &XXYY is exact length
-
- TFF Pattern file format (&7B3)
- ------------------------------
- The individual patterns that make up a song can be saved out individually,
- for instance to create a pattern library, or as a intermediate stage in
- transferring a pattern from one song to another in concurrently loaded
- versions of ProTracker. The TFF pattern file format used takes account of
- the number of tracks and the pattern length. When loading a pattern, the
- pattern length is automatically snapped to the correct value.
-
- TTPX - pattern extent PVOX - pattern voices
- PATT - pattern data
-
- There now follows a byte by byte analysis of a ProTracker pattern file:
-
- Offset Chunk Offset Bytes Description
- ------ ----- ------ ----- -----------
- 0 TTPX 4 length of the file
- 8 PVOX 04 00 00 00 4 number of tracks
- 20 PATT YY XX 00 00 &XXYY pattern data. &XXYY is the length of the
- pattern (ie. pattern length x 4 x tracks)
-
- New format song file structure (&7B7)
- -------------------------------------
- A new format song is functionally equivalent to an old format song, in that
- it contains all the data that a module contains, but without actually
- containing any sample data.
-
- SONG - song extent TINF - tune information
- MVOX - music voices STER - default stereo positions
- MNAM - music name ANAM - author name
- MLEN - music length (& restart pos.) PNUM - patterns (number)
- PLEN - pattern lengths SEQU - sequence
- PATT - pattern data
- SSID - indicates a 'Song Sample ID' SNAM - sample name
- SVOL - sample volume (& finetune) SLEN - sample length
- ROFS - repeat offset RLEN - repeat length
-
- There now follows a byte by byte analysis of a new format song (from the very
- beginning):
-
- Offset Chunk Offset Bytes Description
- ------ ----- ------ ----- -----------
- 0 SONG 4 length of the song
- 8 TINF 04 00 00 00 4 source of tune (see below)
- 20 MVOX 04 00 00 00 4 number of tracks
- 28 STER 08 00 00 00 8 defualt stereo positions list (1-7 per track)
- 44 MNAM 20 00 00 00 32 music name (zero-terminated)
- 84 ANAM 20 00 00 00 32 author name (zero-terminated)
- 124 MLEN 04 00 00 00 4 LSB - music length (no. of positions)
- MSB - restart position
- 136 PNUM 04 00 00 00 4 number of patterns
- 148 PLEN 40 00 00 00 64 pattern lengths for patterns 0-63
- 220 SEQU 80 00 00 00 128 sequence list (positions 0-127)
- each byte contains the pattern no. for that
- position
- 356... PATT YY XX 00 00 &XXYY pattern data. &XXYY is the length of the
- pattern (ie. pattern length x 4 x tracks)
-
- There are as many PATT chunks in the file as the PNUM indicates.
- No sample data is contained in a song.
- The samples will be loaded using their SNAM filename after the song has been
- loaded. If the samples to be loaded have TFF headers then the data contained
- in such headers will be ignored in favour of the TFF data in the song.
- See the ProTracker help pages for information about possible types of sample
- filename.
-
- Tune information
- ----------------
- The TINF chunk in the main tune header information contains a 4 byte code
- to identify the origin of the tune, as shown below:
-
- Hex value Text Origin
- --------- ---- ------
- 2E562E4F O.V. Archimedes ProTracker 0.2
- 2E4B2E4D M.K. Ex-Sound/Noise/ProTracker 31 instruments file
- 34544C46 FLT4 Ex-StarTrekker file
- 38544C46 FLT8 Ex-StarTrekker 8 channel file
- 41544B4F OKTA Ex-Oktalyser 1.1 file
- 19111990 Tracker 1.0: the date 19/11/1990(!)
- 2E54582E .XT. Converted Tracker 1.0 file
- 2E74742E .tt. TechTracker 1.7
- 2E74732E .st. ST Convertor
- 2E746D2E .mt. MegaTracker 2.3
- 312E4353 SC.1 Sonic City 1.0
- 3444454D MED4 Ex-MED file
- 3844454D MED8 Ex-OctaMED file
- 27101991 Coconizer convertor: the date 27/10/1991(!)
- 546B7344 DskT Ex-Desktop Tracker file
- 214B214D M!K! Ex-ProTracker 2.3 100 patternĀ file
-
- ----------------------------------------------------------------------------
-