home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 January / Chip_2003-01_cd2.bin / editors / others / MadTracker / mt2.txt < prev   
Text File  |  2002-11-06  |  8KB  |  333 lines

  1. ========================================================================
  2.  
  3. =======================================
  4.   MadTracker 2.0 Module Format (.MT2)
  5. =======================================
  6.                                                              Version 2.5
  7.                                                Last-modified: 1999-04-26
  8.  
  9. ========================================================================
  10.  
  11. This is the official MT2 file format document.
  12. WARNING: This is valid for 2.5 modules only!
  13.  
  14. The latest version of this document can be downloaded from:
  15.   http://madtracker.i4music.net/madtracker
  16.  
  17. . PERSONAL AND NON-PROFIT USE ONLY!
  18.   IF YOU WANT TO USE THE RELATED INFORMATION IN SHAREWARE OR COMMERCIAL
  19.   SOFTWARE, PLEASE CONTACT THE AUTHOR.
  20. . DO NOT MODIFY THIS DOCUMENT WITHOUT THE WRITTEN PERMISSION OF THE
  21.   AUTHOR.
  22.  
  23. ========================================================================
  24.  
  25. == Main structure ==
  26. ====================
  27.  
  28.   Header
  29.   if (drums) Drums datas
  30.   Additional datas
  31.   Patterns (* number of patterns)
  32.   if (drums) Drums Patterns (* number of drums patterns)
  33.   Automation (* number of patterns)
  34.   Instruments (* 255)
  35.   Samples (* 256)
  36.   Groups (=parts of instruments that link to samples)
  37.   Sample datas
  38.  
  39.  
  40. == Header ==
  41. ============
  42.  
  43. Offset    Length    Description
  44. ------------------------------------------------------------------------
  45. +0    4    Identificator = "MT20"
  46. +4    4    Safe to ignore
  47. +8    2    Version (hi = 2, lo = 5)
  48. +10    32    Tracker name ("MadTracker 2.0")
  49. +42    64    Module title
  50. +106    2    Number of positions
  51. +108    2    Restart position
  52. +110    2    Number of patterns
  53. +112    2    Number of tracks
  54. +114    2    Samples Per Tick
  55. +116    1    Ticks per line
  56. +117    1    Lines Per Beat
  57. +118    4    Flags
  58.             bit 0 = Packed patterns
  59.             bit 1 = Automation
  60.             bit 2 = Reserved
  61.             bit 3 = Drums Automation
  62.             bit 4 = Master Automation
  63. +122    2    Number of instruments
  64. +124    2    Number of samples
  65. +126    256    Patterns order
  66. +382    2    Drums datas length (0 = no drums)
  67. +384    ?    Drums datas
  68. +384+?    4    Additional datas length
  69. +388+?    ?    Additional datas
  70.  
  71.  
  72. == Drums datas ==
  73. =================
  74.  
  75. Offset    Length    Description
  76. ------------------------------------------------------------------------
  77. +0    2    Number of drums patterns
  78. +2    16    Drums samples (8 words)
  79. +18    256    Drums patterns order
  80.  
  81.  
  82. == Additional datas ==
  83. ======================
  84.  
  85. Offset    Length    Description
  86. ------------------------------------------------------------------------
  87. The additional datas are stored as chunks.
  88.  
  89. . Chunk structure:
  90.  
  91. +0    4    Chunk ID
  92. +4    4    Size
  93. +8    size    Chunk datas
  94.  
  95. . Valid chunks:
  96.  
  97. "TRKS"        Tracks datas
  98.  
  99.   +0    2    Master volume
  100.   +2    ?    Tracks information
  101.   Track information:
  102.   +0    2    Track volume
  103.   +2    1    Effect buffer
  104.             0 = No
  105.             1 = Yes
  106.   +3    1    Output track
  107.             0 = Self
  108.             x = Output track
  109.   +4    2    Track effect ID
  110.   +6    16    Track parameters (8 words)
  111.  
  112. "MSG"        Message
  113.  
  114.   +0    1    Show message
  115.             0 = No
  116.             1 = Yes
  117.   +1    ?    Message (length must be odd)
  118.  
  119. "SUM"    Summary
  120.  
  121.   +0    6    Build summary mask
  122.   +6    ?    Build summary content (total length must be odd)
  123.  
  124.  
  125. == Patterns ==
  126. ==============
  127.  
  128. Offset    Length    Description
  129. ------------------------------------------------------------------------
  130. +0    2    Number of lines
  131. +2    4    Data length
  132. if data length > 0 then
  133.   +6    ?    Pattern data
  134.  
  135. . Pattern structure:
  136.  
  137. +0    1    Note
  138.              0 = Nothing
  139.             97 = Note off
  140. +1    1    Instrument
  141. +2    1    Volume column
  142.             10 - 90 = Set volume
  143.             A0 - AF    = Volume slide down
  144.             B0 - BF = Volume slide up
  145.             C0 - CF = Fine volume slide down
  146.             D0 - DF    = Fine volume slide up
  147. +3    1    Panning column
  148. +4    1    Effect number
  149. +5    2    Effect parameter
  150.  
  151. . Packed pattern structure:
  152.  
  153. Datas are scanned track per track then line per line.
  154.  
  155. +0    1    Bitmask for following datas
  156.             bit 0 = Note follows
  157.             bit 1 = Instrument follows
  158.             bit 2 = Volume follows
  159.             bit 3 = Panning follows
  160.             bit 4 = Effect number follows
  161.             bit 5 = Effect parameter node 1 follows
  162.             bit 6 = effect parameter node 2 follows
  163. +1    ?    Datas (if any)
  164.  
  165. If the bitmask value is 255, then you must follow the following scheme:
  166.  
  167. +0    1    255
  168. +1    1    Repeat count
  169. +2    1    Bitmask (see above)
  170. +3    x    Datas (if any)
  171.  
  172.  
  173. == Drums patterns ==
  174. ====================
  175.  
  176. Offset    Length    Description
  177. ------------------------------------------------------------------------
  178. +0    2    Reserved
  179. +2    256*32    Drums pattern data (256 rows, 8 samples)
  180.  
  181. . Drums pattern structure:
  182.  
  183. +0    1    Note & tick offset
  184.             bit 0-4 = Tick offset (0-31)
  185.             bit   7 = Note on
  186. +1    1    Volume
  187. +2    1    Panning (not supported in the interface)
  188. +3    1    Reserved
  189.  
  190.  
  191.  
  192. == Automation ==
  193. ================
  194.  
  195. Offset    Length    Description
  196. ------------------------------------------------------------------------
  197. +0    4    Automation flags
  198.             bit 0-7 = Track effects parameters
  199.             bit   8 = Track volume
  200.             bit   9 = Track panning
  201.             bit  10 = Instrument cutoff
  202.             bit  11 = Instrument resonance
  203.             bit  12 = Instrument attack
  204.             bit  13 = Instrument decay
  205. +4    4    Track effect ID
  206. +8    ?    Envelopes
  207.   +0    4    Number of points
  208.   +4    256    Envelope points
  209.  
  210.  
  211. == Instruments ==
  212. =================
  213.  
  214. Offset    Length    Description
  215. ------------------------------------------------------------------------
  216. +0    32    Instrument name
  217. +32    4    Instrument data length
  218. if data length > 0 then
  219.   +0    2    Number of samples
  220.   +2    96    Groups mapping
  221.   +98    1    Vibrato type
  222.   +99    1    Vibrato sweep
  223.   +100    1    Vibrato depth
  224.   +101    1    Vibrato rate
  225.   +102    2    Fadeout
  226.   +104    2    New Note Action
  227.             NNA = New Note Action
  228.             DCT = Duplicate Check Type
  229.             DCA = Duplicate Check Action
  230.             bit 0-7 =    0 = NNA = Note cut
  231.                     1 = NNA = Continue
  232.                     2 = NNA = Note off
  233.                     3 = NNA = Fadeout
  234.             bit 8-11 =    0 = DCT = Disabled
  235.                     1 = DCT = Note
  236.                     2 = DCT = Sample
  237.                     3 = DCT = Instrument
  238.             bit 12-15 =    0 = DCA = Note cut
  239.                     1 = DCA = Continue
  240.                     2 = DCA = Note off
  241.                     3 = DCA = Fadeout
  242.   +106    2    Instrument flags
  243.             bit 0 = Wave Synthesis on/off
  244.             bit 1 = Effect on/off
  245.   +108    4    Envelopes flags
  246.             bit 0 = Volume envelope
  247.             bit 1 = Panning envelope
  248.             bit 2 = Pitch envelope
  249.             bit 3 = Filter envelope
  250.   +112    ?    Envelopes
  251.     +0    1    Flags
  252.             bit 0 = Envelope on/off
  253.             bit 1 = Sustain on/off
  254.             bit 2 = Loop on/off
  255.     +1    1    Number of points
  256.     +2    1    Sustain position
  257.     +3    1    Loop start position
  258.     +4    1    Loop end position
  259.     +5    3    Reserved
  260.     +8    64    Envelope points
  261. if instrument flags <> 0 then
  262.     +0    1    Synthetiser ID
  263.     +1    1    Effect ID
  264.     +2    2    Cutoff frequency
  265.     +4    1    Resonance
  266.     +5    1    Attack
  267.     +6    1    Decay
  268.     +7    25    Reserved
  269.  
  270.  
  271. == Samples ==
  272. =============
  273.  
  274. Offset    Length    Description
  275. ------------------------------------------------------------------------
  276. +0    32    Sample name
  277. +32    4    Sample data length
  278. if data length > 0 then
  279.   +0    4    Length
  280.   +4    4    Frequency
  281.   +8    1    Quality
  282.             1 = 8-bit
  283.             2 = 16-bit
  284.   +9    1    Number of channels
  285.             1 = Mono
  286.             2 = Stereo
  287.   +10    1    Sample flags
  288.             bit 0 = Reserved
  289.             bit 1 = Synchronized
  290.             bit 2 = Keep on disk
  291.   +11    1    Loop type
  292.             0 = No loop
  293.             1 = Forward
  294.             2 = Pingpong
  295.   +12    4    Loop start
  296.   +16    4    Loop end
  297.   +20    2    Volume
  298.   +22    1    Panning
  299.             0    = Middle
  300.             -127 = Leftmost
  301.             +127 = Rightmost
  302.             -128 = Surround
  303.   +23    1    Sampled note
  304.   +24    2    Samples Per Beat
  305.  
  306.  
  307. == Groups ==
  308. ============
  309.  
  310. Offset    Length    Description
  311. ------------------------------------------------------------------------
  312. +0    1    Sample number
  313. +1    1    Volume
  314. +2    1    Fine pitch
  315. +3    5    Reserved
  316.  
  317.  
  318. == Samples datas ==
  319. ===================
  320.  
  321. Offset    Length    Description
  322. ------------------------------------------------------------------------
  323. if (sample flags & 5) = 0 then
  324.   +0    ?    Sample data (stored as delta values)
  325. else
  326.   +0    4    File name size
  327.   +4    12    Reserved
  328.   +16    ?    File name
  329.  
  330. ========================================================================
  331.                                             ⌐ 1998-2000 Yannick Delwiche
  332.                                                       madhouse@skynet.be
  333.