Advertisement
Guest User

Untitled

a guest
Jun 24th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.75 KB | None | 0 0
  1. By: Gerald Gutierrez
  2. ----------------------------------------------------------------------
  3. > I'd appreciate recieving this mail also, if it's converning Sound
  4. > Blaster/Adlib or .MOD files. Just leave mail to Joshua Kersey in the
  5. > NETMail echo and I should get it, no need to post it twice.
  6.  
  7. There's no such thing as a 'NETMail echo' 8) Just netmail, and echos.
  8. Seeing as sooOOooOoOoo many people seem to want this structure ( good luck
  9. writing your mod player.. you'll need it BADLY ):
  10.  
  11. Protracker 1.1B Song/Module Format:
  12. -----------------------------------
  13. Offset Bytes Description
  14. ------ ----- -----------
  15. 0 20 Songname. Remember to put trailing null bytes at the end...
  16.  
  17. Information for sample 1-31:
  18.  
  19. Offset Bytes Description
  20. ------ ----- -----------
  21. 20 22 Samplename for sample 1. Pad with null bytes.
  22. 42 2 Samplelength for sample 1. Stored as number of words.
  23. Multiply by two to get real sample length in bytes.
  24. 44 1 Lower four bits are the finetune value, stored as a signed
  25. four bit number. The upper four bits are not used, and
  26. should be set to zero.
  27. Value: Finetune:
  28. 0 0
  29. 1 +1
  30. 2 +2
  31. 3 +3
  32. 4 +4
  33. 5 +5
  34. 6 +6
  35. 7 +7
  36. 8 -8
  37. 9 -7
  38. A -6
  39. B -5
  40. C -4
  41. D -3
  42. E -2
  43. F -1
  44.  
  45. 45 1 Volume for sample 1. Range is $00-$40, or 0-64 decimal.
  46. 46 2 Repeat point for sample 1. Stored as number of words offset
  47. from start of sample. Multiply by two to get offset in bytes.
  48. 48 2 Repeat Length for sample 1. Stored as number of words in
  49. loop. Multiply by two to get replen in bytes.
  50.  
  51. Information for the next 30 samples starts here. It's just like the info for
  52. sample 1.
  53.  
  54. Offset Bytes Description
  55. ------ ----- -----------
  56. 50 30 Sample 2...
  57. 80 30 Sample 3...
  58. .
  59. .
  60. .
  61. 890 30 Sample 30...
  62. 920 30 Sample 31...
  63.  
  64. Offset Bytes Description
  65. ------ ----- -----------
  66. 950 1 Songlength. Range is 1-128.
  67. 951 1 Well... this little byte here is set to 127, so that old
  68. trackers will search through all patterns when loading.
  69. Noisetracker uses this byte for restart, but we don't.
  70. 952 128 Song positions 0-127. Each hold a number from 0-63 that
  71. tells the tracker what pattern to play at that position.
  72. 1080 4 The four letters "M.K." - This is something Mahoney & Kaktus
  73. inserted when they increased the number of samples from
  74. 15 to 31. If it's not there, the module/song uses 15 samples
  75. or the text has been removed to make the module harder to
  76. rip. Startrekker puts "FLT4" or "FLT8" there instead.
  77.  
  78. Offset Bytes Description
  79. ------ ----- -----------
  80. 1084 1024 Data for pattern 00.
  81. .
  82. .
  83. .
  84. xxxx Number of patterns stored is equal to the highest patternnumber
  85. in the song position table (at offset 952-1079).
  86.  
  87. Each note is stored as 4 bytes, and all four notes at each position in
  88. the pattern are stored after each other.
  89.  
  90. 00 - chan1 chan2 chan3 chan4
  91. 01 - chan1 chan2 chan3 chan4
  92. 02 - chan1 chan2 chan3 chan4
  93. etc.
  94.  
  95. Info for each note:
  96.  
  97. _____byte 1_____ byte2_ _____byte 3_____ byte4_
  98. / \ / \ / \ / \
  99. 0000 0000-00000000 0000 0000-00000000
  100.  
  101. Upper four 12 bits for Lower four Effect command.
  102. bits of sam- note period. bits of sam-
  103. ple number. ple number.
  104.  
  105. Periodtable for Tuning 0, Normal
  106. C-1 to B-1 : 856,808,762,720,678,640,604,570,538,508,480,453
  107. C-2 to B-2 : 428,404,381,360,339,320,302,285,269,254,240,226
  108. C-3 to B-3 : 214,202,190,180,170,160,151,143,135,127,120,113
  109.  
  110. To determine what note to show, scan through the table until you find
  111. the same period as the one stored in byte 1-2. Use the index to look
  112. up in a notenames table.
  113.  
  114. This is the data stored in a normal song. A packed song starts with the
  115. four letters "PACK", but i don't know how the song is packed: You can
  116. get the source code for the cruncher/decruncher from us if you need it,
  117. but I don't understand it; I've just ripped it from another tracker...
  118.  
  119. In a module, all the samples are stored right after the patterndata.
  120. To determine where a sample starts and stops, you use the sampleinfo
  121. structures in the beginning of the file (from offset 20).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement