home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / liqdt127.zip / FORMAT.DOC < prev    next >
Text File  |  1997-01-11  |  6KB  |  134 lines

  1.  
  2.  
  3.          ╓─────────────────────────────────────────────────────────────╖
  4.          ║          Liquid Tracker module (LIQ) file format            ║
  5.          ╙─────────────────────────────────────────────────────────────╜
  6.  
  7.      (C) Nir Oren, 1995. May be freely used by any programmer.
  8.  
  9.     ╒═════════╕
  10.     │ Header  │
  11.     ╘═════════╛
  12.  
  13.    Offset  Length   Description
  14.    ------------------------------------------
  15.      00h     14     'Liquid Module:' (Magic ID)
  16.      0Eh     30     ASCIIZ module name
  17.      2Ch     20     Artist Name
  18.      40h      1     1Ah
  19.      41h     20     Tracker Name
  20.      55h      2     Format Version - currently 0100h   (Read note*)
  21.      57h      2     Initial speed
  22.      59h      2     Initial BPM
  23.      5Bh      2     Lowest note (Amiga Period*4)
  24.      5Dh      2     Uppest note (Amiga Period*4)
  25.      5Fh      2     Number of tracks
  26.      61h      4     Module flags (1=cut upon limit  2=ST3 compatibility mode)
  27.                                   The loader should mask out the unused bits
  28.      65h      2     Number of Patterns in file
  29.      67h      2     Number of Instruments in file
  30.      69h      2     Number of Sequence Table entries in file
  31.      6Bh      2     Module header size (usually 6Dh+(Number of Tracks)*2+
  32.                                         Number of Sequence Table entries)
  33.      6Dh  NumTracks    Initial Channel Panning setup
  34.      ...  NumTracks    Initial Channel Volume setup
  35.      ...  NumSequence  Sequence Table Data
  36.   
  37.   *  A note about the Format Version - a loader should try loading even
  38.      if the LSB of the Format Version is different from what it knows
  39.      (used when wanting to add more info to the header but leaving the
  40.      format compatible) only if the MSB byte is different, the loader
  41.      is not able to handle it.
  42.  
  43.  
  44.   ╒════════════════════╕
  45.   │  Patterns data     │
  46.   ╘════════════════════╛
  47.  
  48.       - For empty patterns, a 4-byte value of '!!!!' will be found here
  49.  
  50.         else:
  51.  
  52.       ?       4     Magic "L","P",00h,00h  (ID, for recovery purposes)
  53.    +04h      30     ASCIIZ Pattern name
  54.    +22h       2     Number of Intervals per Track (usually 64)
  55.    +24h       4     Size of packed Pattern
  56.    +28h       4     Reserved
  57.    +2Ch       ?     Packed Pattern data
  58.  
  59.    Packed pattern data is stored full Track after full Track from the left to
  60.    the right (all Intervals in Track and then going Track right). You should
  61.    expect 0C0h on any pattern end, and then your Unpacked Patterndata Pointer
  62.    should be equal to the value in offset [24h]; if it's not, you should exit
  63.    with an error.
  64.  
  65.  
  66.       Each row in track consists of 5 bytes:
  67.  
  68.       1-Note (0-107 representing 9 octaves)  -1 = No note   -2 = Note Off
  69.       2-Instrument (0-99)    -1 = No instrument
  70.       3-Volume (0-64)        -1 = No volume change
  71.       4-Effect ('A' to 'Z')  -1 = No effect
  72.       5-Parameter (0-255)
  73.  
  74.       Unless:
  75.       -------
  76.       if NOTE = 0C0h then STOP PATTERN DECODING, go to next
  77.       if NOTE = 0A0h then STOP TRACK DECODING, go to next
  78.       if NOTE = 0E0h then SKIP xx EMPTY NOTES (xx-1 specifies in next byte)
  79.       if NOTE = 080h then SKIP ONE EMPTY NOTE
  80.       if NOTE = 0E1h then SKIP xx EMPTY TRACKS (xx-1 specifies in next byte)
  81.  
  82.       if (NOTE > C0h) and (NOTE < E0h) then
  83.  
  84.                          if NOTE & 1 then NOTE follows
  85.                          if NOTE & 2 then INSTRUMENT follows
  86.                          if NOTE & 4 then VOLUME follows
  87.                          if NOTE & 8 then EFFECT follows
  88.                          if NOTE & 16 then PARAMETER follows
  89.  
  90.       if (NOTE > A0h) and (NOTE < 0C0h) then
  91.        same as before, except there is a byte following specifies
  92.        how many Intervals(-1) this packing method will last.
  93.  
  94.       if (NOTE > 80h) and (NOTE < 0A0h)
  95.        same as before ( NOTE & 31 indicates packing method, and
  96.        byte after there's Intervals count(-1) indicator), but there's just
  97.        one note specified after, which is duplicated on all the Intervals.
  98.  
  99.    ╒═════════════════╕
  100.    │ Instrment data  │
  101.    ╘═════════════════╛
  102.  
  103.       - Just a series of LDSS files (Read in LDSS.DOC)
  104.  
  105.       - For empty instruments, a 4-byte value of '????' will be found.
  106.  
  107.  
  108.       Currently, the Liquid Tracker only supports DIGITIZED INSTRUMENTS,
  109.       The samples format used here is the LDSS (Liquid Digital Sample
  110.       Specification) so you will simply found here a series of LDSS files,
  111.       in the sum specifies in "Number of instruments" in the header.
  112.       NOTE that any file offset indicated in the LDSS header is relative
  113.       to it's header start position, of course.
  114.  
  115.  ╓───────────────────────────────= CONTACTS =───────────────────────────────╖
  116.  ║                                                                          ║
  117.  ║  Fear Of The Dark BBS - (972)-3-9690371 - 28k - 24 Hrs                   ║
  118.  ║  Anesthesia (A) BBS   - (972)-7-9971505 - 28k - 24 Hrs                   ║
  119.  ║                         (972)-7-9954490 - 14k - 24 Hrs                   ║                             ║
  120.  ║                                                                _______   ║
  121.  ║                                                               \     \_\  ║
  122.  ║                                                               / \_______\║
  123.  ║   You can cont(r)act the author by:    │      SnailMail:  ||__\       |  ║
  124.  ║                                        │                 (°° ________/   ║
  125.  ║ FidoNET: 97:200/215, 2:403/442         │   Nir Oren                      ║
  126.  ║ -------------------------------------  │   P.O. box 8180                 ║
  127.  ║ InterNET: nir.oren@tbu.excellnet.co.il │   Petah Tikva 49181             ║
  128.  ║                                        │   Israel  <reply guaranteed!>   ║
  129.  ║                                        │   (The SNAIL is (C) !!! ;-)     ║
  130.  ╙──────────────────────────────────────────────────────────────────────────╜
  131.  
  132.                                ---- EOF ----
  133.  
  134.