Music File format (.tmu)

From TriloTracker
Jump to: navigation, search
+1        Version ('6') (lower 4 bits format version, upper 4 bits TT chipsetup)
+32       Song name
+32       Song creator
+1        Speed
+1        Order restart position
+1        Order length
+<length> Order list
+496      Instrument names (31*16)
+<??>     Instrument macro's (31*<variable length>)
             +1          Macro length
             +1          Restart position
             +1          Macro waveform < ONLY FOR PSG+SCC >
             +1          FM Voice < ONLY FOR PSG+FM and SN+FM >
             +<length*4> Macro data
+1024     Waveforms (32*32)   < ONLY FOR PSG+SCC >
+128      Custom Voices (16*8)   [ ONLY FOR PSG+FM and SN+FM ]
+320      Drum macro names {16*20) [ ONLY FOR PSG+FM and SN+FM ]
+<??>     Drum macros (19*<variable length>)      [ ONLY FOR PSG+FM and SN+FM ]
             +1          Macro length
             +<length*7> Macro data
+<??>     Patterns (compressed)
             +1         pattern number
             +2         length
             +<length> compressed data
+1        255 - end delimiter


Version chipsetup:
0000xxxx  PSG (AY-3-8910) + SCC/SCC+ (K051649)
0001xxxx  PSG (AY-3-8910) + FM (YM2413)
0011xxxx  PSG (SN76489)   + FM (YM2413)


Compressed pattern example.

Below is an example of a compressed pattern.

TTCOMPRESSEDPATTERN.PNG

Blue = pattern number (FF means en of pattern data).
Red = length (number of bytes of compressed data folowing).
Green = compressed data. (00,06 represents 00,00,00,00,00,00 (6 times 00)).
Pink = end of compressed data for this pattern (00,00 is a delimiter).