home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Servis / FFE / MOD.SWG / 0017_MTR.pas < prev    next >
Pascal/Delphi Source File  |  1996-09-04  |  9KB  |  194 lines

  1.  
  2. MASTERTRACKER FORMAT
  3.  
  4. This  program  don't support the mtr files  larger than 64 Kb because of
  5. the  segmentation in real mode. In  fact, MASTERTRACKER 2.x use the REAL
  6. FLAT MODE for making music larger than 64 Kb.
  7.  
  8. The old music files formats .MTR (v1.x) consist of:
  9. ---------------------------------------------------
  10. '-------------------------
  11. 'FILE FORMAT:      LENGTH
  12. '-------------------------
  13. 'INFORMATION      | 0050 | MTRACK NOM_MUSIQUE (20 CHAR) 00 (NBVOICES%-1) 00 (NB PATTERN-1) 00 (LENGTH) 01F3 (RESTART)
  14.  00000000 (LONGUEUR) + CHR(1AH)
  15. 'SPEED            | 0002 |
  16. 'DEVICE           | 0001 | 0=SPK 1=ADL 2=SBP ;NOT USED NOW
  17. 'POSITIONS        | 0256 |
  18. 'VOICES TYPE      | 0256 |
  19. '-------------------------
  20. 'INSTRUMENTS:     | 4096 | (TOTAL BYTES, 64 INSTRUMENTS)
  21. '-------------------------
  22. 'INSTRUM NAME     | 0020 |
  23. 'DATAS            | 0044 | (TOTAL BYTES, 1 INSTRUMENT
  24. 'IDENTIFICATION---|------|------|
  25. '                 | 0001 | 0001 | IDENTIFICATION: THIS BYTE=02 WHEN IT IS USED OR 00 WHEN NOT.
  26. '1° OPPERATOR-----|------|------|
  27. '                 |      | 0004B| MODULATOR FREQUECY MULTIPLE
  28. '                 |      | 0001B| KSR
  29. '                 |      | 0001B| EG TYPE
  30. '                 |      | 0001B| VIBRATO
  31. '                 |      | 0001B| AMPLITUDE MODULATION
  32. '                 |      |      |
  33. '                 |      | 0006B| TOTAL LEVEL
  34. '                 |      | 0002B| SCALING LEVEL
  35. '                 |      |      |
  36. '                 |      | 0004B| DECAY RATE
  37. '                 |      | 0004B| ATTACK RATE
  38. '                 |      |      |
  39. '                 |      | 0004B| RELEASE RATE
  40. '                 |      | 0004B| SUBSTAIN LEVEL
  41. '                 |      |      |
  42. '                 |      | 0001B| ALGORITHM
  43. '                 |      | 0003B| CONNECTION
  44. '                 |      |      |
  45. '                 |      | 0002B| WAVEFORM SELECT
  46. '                 |      | 0004B| MODULATOR FREQUECY MULTIPLE
  47. '                 |      | 0001B| KSR
  48. '                 |      | 0001B| EG TYPE
  49. '                 |      | 0001B| VIBRATO
  50. '                 |      | 0001B| AMPLITUDE MODULATION
  51. '2° OPPERATOR-----|------|------|
  52. '                 |      | 0006B| TOTAL LEVEL
  53. '                 |      | 0002B| SCALING LEVEL
  54. '                 |      |      |
  55. '                 |      | 0004B| DECAY RATE
  56. '                 |      | 0004B| ATTACK RATE
  57. '                 |      |      |
  58. '                 |      | 0004B| RELEASE RATE
  59. '                 |      | 0004B| SUBSTAIN LEVEL
  60. '                 |      |      |
  61. '                 |      | 0001B| ALGORITHM
  62. '                 |      | 0003B| CONNECTION
  63. '                 |      |      |
  64. '                 |      | 0002B| WAVEFORM SELECT
  65. ' OTHER BYTES UNUSED     |      |
  66. '-------------------------
  67. 'PATTERN          | ???? | ????=NUMBER OF VOICES * NUMBER OF PATTERN * 256 -> MAX=65536
  68. '-------------------------
  69.  
  70. The new music files formats .MTR (v2.x) consist of:
  71.  
  72. ---------------------------------------------------
  73. '-------------------------
  74. 'FILE FORMAT:      LENGTH
  75. '-------------------------
  76. 'INFORMATION      | 0050 | MTRACK MUSICNAME (20 CHAR) 00 (NBVOICES%-1) 00 (NBDIGITVOICES%) 00 (NB PATTERN-1) 00 (LENGTH) 00
  77.  (NB INSTRUM)  01F3 (RESTART)  00000000 (LENGHT) + CHR(1AH)
  78. 'POSITIONS        | 0256 |
  79. '-------------------------
  80. 'INSTRUM NAME     | 0020 |
  81. 'DATAS            | 0044 | (TOTAL BYTES, 1 INSTRUMENT
  82. 'IDENTIFICATION---|------|------|
  83. '                 | 0001 | 0001 | IDENTIFICATION: THIS BYTE=02 WHEN IT IS USED OR 00 WHEN NOT.
  84. '1° OPPERATOR-----|------|------|
  85. '                 |      | 0004B| MODULATOR FREQUECY MULTIPLE
  86. '                 |      | 0001B| KSR
  87. '                 |      | 0001B| EG TYPE
  88. '                 |      | 0001B| VIBRATO
  89. '                 |      | 0001B| AMPLITUDE MODULATION
  90. '                 |      |      |
  91. '                 |      | 0006B| TOTAL LEVEL
  92. '                 |      | 0002B| SCALING LEVEL
  93. '                 |      |      |
  94. '                 |      | 0004B| DECAY RATE
  95. '                 |      | 0004B| ATTACK RATE
  96. '                 |      |      |
  97. '                 |      | 0004B| RELEASE RATE
  98. '                 |      | 0004B| SUBSTAIN LEVEL
  99. '                 |      |      |
  100. '                 |      | 0001B| ALGORITHM
  101. '                 |      | 0003B| CONNECTION
  102. '                 |      |      |
  103. '                 |      | 0002B| WAVEFORM SELECT
  104. '                 |      | 0004B| MODULATOR FREQUECY MULTIPLE
  105. '                 |      | 0001B| KSR
  106. '                 |      | 0001B| EG TYPE
  107. '                 |      | 0001B| VIBRATO
  108. '                 |      | 0001B| AMPLITUDE MODULATION
  109. '2° OPPERATOR-----|------|------|
  110. '                 |      | 0006B| TOTAL LEVEL
  111. '                 |      | 0002B| SCALING LEVEL
  112. '                 |      |      |
  113. '                 |      | 0004B| DECAY RATE
  114. '                 |      | 0004B| ATTACK RATE
  115. '                 |      |      |
  116. '                 |      | 0004B| RELEASE RATE
  117. '                 |      | 0004B| SUBSTAIN LEVEL
  118. '                 |      |      |
  119. '                 |      | 0001B| ALGORITHM
  120. '                 |      | 0003B| CONNECTION
  121. '                 |      |      |
  122. '                 |      | 0002B| WAVEFORM SELECT
  123. ' OTHER BYTES UNUSED     |      |
  124. '-------------------------
  125. 'PATTERN          | ???? | ????=NUMBER OF VOICES * NUMBER OF PATTERN * 256 -> MAX=65536
  126. '-------------------------
  127.  
  128. '-------------------------
  129. 'NEW FILE FORMAT           MTRACK NC 00 00 00 00 00 00 0000 00000000
  130. '-------------------------
  131. 'INFORMATIONS     | 0050 | MTRACK NC (NO CRUNCHED) MUSICNAME (20 CHAR) 00 (NBVOICES%-1) 00 (NBDIGITVOICES%) 00 (NB PATTERN-1) 00 (LENGTH) 00 (NB INSTRUM)  01F3 (RESTART)  00000000 (LENGHT) + CHR(1AH)
  132. 'MUSIC NAME       | 0020 |
  133. 'POSITIONS        | 0256 |
  134. '-------------------------
  135. 'INSTRUMENTS:
  136. '-------------------------
  137. 'SAMPLENAME       | 0020 | SAMPLES TOTAL MAX=16384, 1 SAMPLE=64 BYTES
  138. 'DATAS            | 0044 | (TOTAL BYTES, 1 INSTRUMENT
  139. 'IDENTIFICATION---|------|------|
  140. '                 | 0001 | 0001 | IDENTIFICATION: THIS BYTE=02 WHEN IT IS USED OR 00 WHEN NOT.
  141. '1° OPPERATOR-----|------|------|
  142. '                 |      | 0004B| MODULATOR FREQUECY MULTIPLE
  143. '                 |      | 0001B| KSR
  144. '                 |      | 0001B| EG TYPE
  145. '                 |      | 0001B| VIBRATO
  146. '                 |      | 0001B| AMPLITUDE MODULATION
  147. '                 |      |      |
  148. '                 |      | 0006B| TOTAL LEVEL
  149. '                 |      | 0002B| SCALING LEVEL
  150. '                 |      |      |
  151. '                 |      | 0004B| DECAY RATE
  152. '                 |      | 0004B| ATTACK RATE
  153. '                 |      |      |
  154. '                 |      | 0004B| RELEASE RATE
  155. '                 |      | 0004B| SUBSTAIN LEVEL
  156. '                 |      |      |
  157. '                 |      | 0001B| ALGORITHM
  158. '                 |      | 0003B| CONNECTION
  159. '                 |      |      |
  160. '                 |      | 0002B| WAVEFORM SELECT
  161. '                 |      | 0004B| MODULATOR FREQUECY MULTIPLE
  162. '                 |      | 0001B| KSR
  163. '                 |      | 0001B| EG TYPE
  164. '                 |      | 0001B| VIBRATO
  165. '                 |      | 0001B| AMPLITUDE MODULATION
  166. '2° OPPERATOR-----|------|------|
  167. '                 |      | 0006B| TOTAL LEVEL
  168. '                 |      | 0002B| SCALING LEVEL
  169. '                 |      |      |
  170. '                 |      | 0004B| DECAY RATE
  171. '                 |      | 0004B| ATTACK RATE
  172. '                 |      |      |
  173. '                 |      | 0004B| RELEASE RATE
  174. '                 |      | 0004B| SUBSTAIN LEVEL
  175. '                 |      |      |
  176. '                 |      | 0001B| ALGORITHM
  177. '                 |      | 0003B| CONNECTION
  178. '                 |      |      |
  179. '                 |      | 0002B| WAVEFORM SELECT
  180. ' OTHER BYTES UNUSED     |      |
  181. '-------------------------
  182. 'PATTERN          | ???? | NB VOICES * NB PATTERN * 256 -> MAX=256 PATTERN 2097152 BYTES
  183. '-------------------------
  184.  
  185. Now  you can use easilly this new  ADLIB player in your demos and create
  186. yourself your music.
  187.  
  188. Attention:  if  you  encounter  some synchro  problem  when  you do some
  189. animation,  you  can  increment or decrement  the  value  of the 'PUBLIC
  190. SPEED:WORD'  because  the interruption is  generaly  called 70 times per
  191. second as your monitor in several screens modes!
  192.  
  193.  
  194.