The following is a summary of the MultiTracker Module (MTM) fromat. It is intended for programmers who wish to support the format in any manner. Note that all effects are defined as the current Protracker effects standard. A short summary of this standard is provided in the documentation file for the Multitracker Module Editor. ÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Position³Length³Description ÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 0 ³3 ³"MTM" file marker 3 ³BYTE ³version number - upper nybble is major version #, lower is ³ ³ minor version number 4 ³20 ³ASCIIZ songname 24 ³WORD ³number of tracks saved 26 ³BYTE ³last pattern number saved 27 ³BYTE ³last order number to play (songlength-1) 28 ³WORD ³length of extra comment field 30 ³BYTE ³number of samples saved (NOS) 31 ³BYTE ³attribute byte (currently defined as 0) 32 ³BYTE ³beats per track 33 ³BYTE ³number of tracks to be played back 34 ³32 ³voice pan positions ÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 66 ³NOS*37³Instrument data: ÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³22 ³sample name ³DWORD ³sample length in bytes ³DWORD ³offset of beginning of sample loop in bytes ³DWORD ³offset of end of sample loop in bytes ³BYTE ³finetune value ³BYTE ³standard volume of sample ³BYTE ³attribute byte: bit meaning ³ ³ 0 0=8 bit sample 1=16 bit sample ³ ³ 1-7 undefined (set to zero) ÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 66+ ³128 ³Pattern order data (NOS*37)³ ³ ÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 194+ ³trks* ³Track data: (NOS*37)³192 ³Each track is saved independently and takes exactly 192 bytes. ³ ³The tracks are arranged as 64 consecutive 3-byte notes. These ³ ³notes have the following format: ³ ³ ³ ³ ³ ³ BYTE 0 BYTE 1 BYTE 2 ³ ³ ppppppii iiiieeee aaaaaaaa ³ ³ ³ ³ p = pitch value (0=no pitch stated) ³ ³ i = instrument number (0=no instrument number) ³ ³ e = effect number ³ ³ a = effect argument ³ ³ ÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 194+ ³ ³Track sequencing data NOS*37+ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ trks*192³(last pattern saved + 1)*32 WORDS³ ÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³The track sequencing data is really just a listing of which ³ ³track is used as which voice in each saved pattern. This is ³ ³necessary since one track may be a part of many different ³ ³patterns. (not orders) Doing this saves much of the memory ³ ³wasted in a normal MOD by repetition of certain tracks over ³ ³and over again throughout the file. ³ ³ ³ ³Note that track zero is never saved, but always considered as ³ ³an empty track. Therefore, track numbering for the saved ³ ³tracks really starts at one. ³ ³ ³ ³The data is organized in sets of 32 voices. First comes a ³ ³WORD representing which track is in pattern 0, voice 0. The ³ ³next WORD is pattern 0, voice 1, etc. This is repeated for ³ ³each pattern saved, giving a total track sequencing size of ³ ³32 WORDS per pattern saved. ³ ³ ³ ³If your code uses MOD-style memory organization, you can still ³ ³play MTM's. You merely jump to the track sequencing data, and ³ ³then load each pattern separately by jumping back and forth ³ ³between the track sequences and the actual track data. ÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 194+ ³Header³Extra comment field NOS*37+ ³says. ³(Length specified in the header) trks*192ÀÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +(last pattern saved + 1)*32*2 ³ ÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 194+ ³sample³Raw sample data NOS*37+ ³length³(unsigned) trks*192ÀÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +(last pattern saved + 1)*32*2+ ³ length of extra comment field ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ