home *** CD-ROM | disk | FTP | other *** search
/ Groovy Bytes: Behind the Moon / groovybytes.iso / GROOVY / SND_TOOL / FAR08G.ZIP / FORMATS.DOC < prev    next >
Encoding:
Text File  |  1993-10-09  |  7.3 KB  |  195 lines

  1.  
  2.      ╓─────────────────────────────────────────────────────────────╖
  3.      ║                                          ╓          ╖
  4.      ╟───  ╓────╖  ╖────╖  ╓────╖  ╖────╖  ╓────║  ╓────╖  ║  ╓────╖
  5.      ║     ╓─── ║  ║       ╓─── ║  ║    ║  ║    ║  ║    ║  ║  ║ ───╜
  6.      ║     ║    ║  ║       ║    ║  ║    ║  ║    ║  ║    ║  ║  ║    ║
  7.      ╜     ╙────╜  ╜       ╙────╜  ╜    ╙  ╙────╙  ╙────╜  ╙  ╙────╜
  8.      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  9.                                                ──────══════ COMPOSER
  10.               ╓                      ╥
  11.               ║         ─╥─     ╖    ║      ╓──╖        ─╥─
  12.            ╓──║ ╥ ╓──╖ ╥ ║ ╓──╖ ║    ║ ╖──╖ ║─  ╥ ╖──╖ ╥ ║ ╖  ╓
  13.            ╙──╜ ╨ ╙──║ ╨ ╙ ╙──╙ ╙    ╙ ╜  ╙ ╙   ╨ ╜  ╙ ╨ ╙ ╙──╢
  14.                      ╜                                        ╜  93!
  15.      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  16.  
  17.  
  18.  
  19.                        Format Specifications!!
  20.                           by Daniel Potter
  21.  
  22.  
  23. -----------------------------------------------------------------------------
  24.  
  25. Well, as you probably know, this is a pretty exciting program already. However,
  26. it would be nothing to a lot of people who would use it in their games, demos,
  27. etc, if I did not include the format specs. Besides that, I intend that this
  28. format, which although is CERTAINLY not the most efficient (basically a dump
  29. of the internals of the composer's editing mem), they will perhaps serve as
  30. a standard 16 channel format, with ease of use on the level of a MOD. Remember
  31. that this format is for EDITING purposes (storing EVERYTHING you're working on)
  32. so it may include information not completely neccessary. You can even see into
  33. the last moments of creation of the song through some of these variables :)
  34. You may process this info as you see fit, such as the scrolltext, which is not
  35. even supported in the current version of the composer. You could simply display
  36. it on the screen, or you could be creative, and have a scroller at the top of
  37. the screen while it's playing (that's the idea, for things like musicdisks).
  38.  
  39.  
  40.              Farandole .FAR file (16 channel tracker) format
  41.              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42.  
  43. Header
  44.  
  45. Note that with the way the file magic(s) are set up, you can see the name of
  46. the song by TYPEing it from DOS. For example, if the song name was
  47. "StarLit MoonRise" then you would see when you typed it out:
  48.  
  49. FAR■StarLit MoonRise
  50.  
  51.  
  52. len      desc
  53. -----------------------------------------------------------------------------
  54.  4       "FAR■" (file magic number 1)
  55.  40      Song name
  56.  3       13,10,26 (bytes) (file magic number 2, end of file chars)
  57.  2       Remaining length of header in bytes
  58.  1       Version number, major/minor upper/lower nybbles (0x10)
  59.  16      Channel ON/OFF map
  60.  1       Current editing octave
  61.  1       Current editing voice
  62.  1       Current editing row
  63.  1       Current editing pattern
  64.  1       Current editing order
  65.  1       Current editing sample
  66.  1       Current editing volume
  67.  1       Current top of screen display (top row visible)
  68.  1       Current editing area of the screen (0=sample,1=pattern,2=order)
  69.  1       Current tempo (default tempo)
  70.  16      Panning map, from 0-F for each channel
  71.  1       MarkTop (block)
  72.  1       MarkBot (block)
  73.  1       Grid granularity (default 4)
  74.  1       Edit Mode
  75.  2       Song text length
  76.  (above) Song text of length STLen (field above)
  77.  256     Order bytes
  78.  1       Number of patterns stored in the file
  79.  1       Length of order used
  80.  1       LoopTo location
  81.  2*256   Length in bytes of each pattern - Determine number of rows stored
  82.          for this pattern with this formula:
  83.  
  84.          Rows=((PatSize-2)/(16*4))
  85.  
  86.          The -2 will be explained below.
  87.  
  88.  If the file is of a newer format than this one, then there might be extra
  89.  stuff down here. The original header here will NEVER have anything new
  90.  inserted before this space, to maintain a somewhat compatible file. The
  91.  original header, described about will always be 869 bytes long+SongText
  92.  len. So you should seek up HdLen-(869+STLen) bytes after reading the header
  93.  in case there is more.
  94.  
  95.  
  96. Patterns
  97.  
  98. len      desc
  99. ----------------------------------------------------------------------------
  100.  1       Break location in the pattern (length in rows)
  101.  1       Tempo for this pattern. ** THIS VALUE IS *NOT* USED ANYMORE!!! ** DO
  102.            NOT SUPPORT IT!!
  103.  Rows*16*4  Pattern data-
  104.  
  105.  
  106.    len      desc
  107.    --------------------------------------------
  108.     1       Note value - (Octave*12+Note)+1 or 0 for no note
  109.     1       Instrument/sample value
  110.     1       Volume - reversed byte. MSN is stored as LSN, LSN as MSN. This is
  111.             for compatibility purposes. Basically, the lower nybble is the
  112.             major volume adjust, upper nybble for minor adjust.
  113.     1       Effect, upper nybble is effect, lower nybble is parameter
  114.  
  115. Current no provisions are made in this format to remove unused channels from
  116. the file.
  117.  
  118.  
  119.  
  120. Sample Map
  121.  
  122. This is an array of 0-7 (8 bytes) which is a set of 256 flags. Each flag
  123. corresponds to a sample, and these flags are packed into bytes. If the bit
  124. is set, the sample record IS stored in the file. Otherwise, it is not (and
  125. therefore should NOT be read). You can check to see if its present like this:
  126.  
  127. if (SMap[SampleNumber/8] & (1<<(SampleNumber%8))) ReadSample(SampleNumber);
  128.  
  129.  
  130. Samples/records
  131.  
  132. All samples are stored just like they are in FSM format on disk. Each one is
  133. header-data-header-data, etc. Here is the header format:
  134.  
  135. len     desc
  136. ---------------------------------------------------------------------------
  137.  32     Name of sample
  138.  4      Length of sample (currently only support up to 64k samples)
  139.  1      Finetune (also not supported right now)
  140.  1      Volume ... yet another unsupported feature
  141.  4      Repeat Start
  142.  4      Repeat End - If the sample is looping, this should be set to the repeat
  143.         end value. Otherwise, it should be set to the length of the sample.
  144.  1      Sample Type byte
  145.  
  146.    1<<0   8/16 bit (8=0 16=1)
  147.  
  148.  1      Looping mode byte
  149.  
  150.    1<<3   On=looped, Off=not looped
  151.  
  152.  (len)  Sample data in SIGNED format
  153.  
  154.  
  155.  
  156.  
  157.                    Farandole .FSM Sample/instrument format
  158.                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  159.  
  160. Header
  161.  
  162. This format is almost identical to the one described above for samples in .FAR
  163. files. Note also that this format is set up like .FAR, where you can type
  164. out the file to see the long name for it.
  165.  
  166. len      desc
  167. ----------------------------------------------------------------------------
  168.  4       "FSM■" - File magic #1
  169.  32      Sample name
  170.  3       (10,13,26)
  171.  4      Length of sample (currently only support up to 64k samples)
  172.  1      Finetune (also not supported right now)
  173.  1      Volume ... yet another unsupported feature
  174.  4      Repeat Start
  175.  4      Repeat End - If the sample is looping, this should be set to the repeat
  176.         end value. Otherwise, it should be set to the length of the sample.
  177.  1      Sample Type byte
  178.  
  179.    1<<0   8/16 bit (8=0 16=1)
  180.  
  181.  1      Looping mode byte
  182.  
  183.    1<<3   On=looped, Off=not looped
  184.  
  185.  (len)  Sample data in SIGNED format
  186.  
  187.  
  188.  
  189.                   Farandole .USM Sample/instrument format
  190.                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  191.  
  192.  (len)  Sample data in UNSIGNED format
  193.  
  194.  
  195.