home *** CD-ROM | disk | FTP | other *** search
-
- ╓─────────────────────────────────────────────────────────────╖
- ║ ╓ ╖
- ╟─── ╓────╖ ╖────╖ ╓────╖ ╖────╖ ╓────║ ╓────╖ ║ ╓────╖
- ║ ╓─── ║ ║ ╓─── ║ ║ ║ ║ ║ ║ ║ ║ ║ ───╜
- ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║
- ╜ ╙────╜ ╜ ╙────╜ ╜ ╙ ╙────╙ ╙────╜ ╙ ╙────╜
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
- ──────══════ COMPOSER
- ╓ ╥
- ║ ─╥─ ╖ ║ ╓──╖ ─╥─
- ╓──║ ╥ ╓──╖ ╥ ║ ╓──╖ ║ ║ ╖──╖ ║─ ╥ ╖──╖ ╥ ║ ╖ ╓
- ╙──╜ ╨ ╙──║ ╨ ╙ ╙──╙ ╙ ╙ ╜ ╙ ╙ ╨ ╜ ╙ ╨ ╙ ╙──╢
- ╜ ╜ 93!
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-
-
-
- Format Specifications!!
- by Daniel Potter
-
-
- -----------------------------------------------------------------------------
-
- Well, as you probably know, this is a pretty exciting program already. However,
- it would be nothing to a lot of people who would use it in their games, demos,
- etc, if I did not include the format specs. Besides that, I intend that this
- format, which although is CERTAINLY not the most efficient (basically a dump
- of the internals of the composer's editing mem), they will perhaps serve as
- a standard 16 channel format, with ease of use on the level of a MOD. Remember
- that this format is for EDITING purposes (storing EVERYTHING you're working on)
- so it may include information not completely neccessary. You can even see into
- the last moments of creation of the song through some of these variables :)
- You may process this info as you see fit, such as the scrolltext, which is not
- even supported in the current version of the composer. You could simply display
- it on the screen, or you could be creative, and have a scroller at the top of
- the screen while it's playing (that's the idea, for things like musicdisks).
-
-
- Farandole .FAR file (16 channel tracker) format
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Header
-
- Note that with the way the file magic(s) are set up, you can see the name of
- the song by TYPEing it from DOS. For example, if the song name was
- "StarLit MoonRise" then you would see when you typed it out:
-
- FAR■StarLit MoonRise
-
-
- len desc
- -----------------------------------------------------------------------------
- 4 "FAR■" (file magic number 1)
- 40 Song name
- 3 13,10,26 (bytes) (file magic number 2, end of file chars)
- 2 Remaining length of header in bytes
- 1 Version number, major/minor upper/lower nybbles (0x10)
- 16 Channel ON/OFF map
- 1 Current editing octave
- 1 Current editing voice
- 1 Current editing row
- 1 Current editing pattern
- 1 Current editing order
- 1 Current editing sample
- 1 Current editing volume
- 1 Current top of screen display (top row visible)
- 1 Current editing area of the screen (0=sample,1=pattern,2=order)
- 1 Current tempo (default tempo)
- 16 Panning map, from 0-F for each channel
- 1 MarkTop (block)
- 1 MarkBot (block)
- 1 Grid granularity (default 4)
- 1 Edit Mode
- 2 Song text length
- (above) Song text of length STLen (field above)
- 256 Order bytes
- 1 Number of patterns stored in the file
- 1 Length of order used
- 1 LoopTo location
- 2*256 Length in bytes of each pattern - Determine number of rows stored
- for this pattern with this formula:
-
- Rows=((PatSize-2)/(16*4))
-
- The -2 will be explained below.
-
- If the file is of a newer format than this one, then there might be extra
- stuff down here. The original header here will NEVER have anything new
- inserted before this space, to maintain a somewhat compatible file. The
- original header, described about will always be 869 bytes long+SongText
- len. So you should seek up HdLen-(869+STLen) bytes after reading the header
- in case there is more.
-
-
- Patterns
-
- len desc
- ----------------------------------------------------------------------------
- 1 Break location in the pattern (length in rows)
- 1 Tempo for this pattern. ** THIS VALUE IS *NOT* USED ANYMORE!!! ** DO
- NOT SUPPORT IT!!
- Rows*16*4 Pattern data-
-
-
- len desc
- --------------------------------------------
- 1 Note value - (Octave*12+Note)+1 or 0 for no note
- 1 Instrument/sample value
- 1 Volume - reversed byte. MSN is stored as LSN, LSN as MSN. This is
- for compatibility purposes. Basically, the lower nybble is the
- major volume adjust, upper nybble for minor adjust.
- 1 Effect, upper nybble is effect, lower nybble is parameter
-
- Current no provisions are made in this format to remove unused channels from
- the file.
-
-
-
- Sample Map
-
- This is an array of 0-7 (8 bytes) which is a set of 256 flags. Each flag
- corresponds to a sample, and these flags are packed into bytes. If the bit
- is set, the sample record IS stored in the file. Otherwise, it is not (and
- therefore should NOT be read). You can check to see if its present like this:
-
- if (SMap[SampleNumber/8] & (1<<(SampleNumber%8))) ReadSample(SampleNumber);
-
-
- Samples/records
-
- All samples are stored just like they are in FSM format on disk. Each one is
- header-data-header-data, etc. Here is the header format:
-
- len desc
- ---------------------------------------------------------------------------
- 32 Name of sample
- 4 Length of sample (currently only support up to 64k samples)
- 1 Finetune (also not supported right now)
- 1 Volume ... yet another unsupported feature
- 4 Repeat Start
- 4 Repeat End - If the sample is looping, this should be set to the repeat
- end value. Otherwise, it should be set to the length of the sample.
- 1 Sample Type byte
-
- 1<<0 8/16 bit (8=0 16=1)
-
- 1 Looping mode byte
-
- 1<<3 On=looped, Off=not looped
-
- (len) Sample data in SIGNED format
-
-
-
-
- Farandole .FSM Sample/instrument format
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Header
-
- This format is almost identical to the one described above for samples in .FAR
- files. Note also that this format is set up like .FAR, where you can type
- out the file to see the long name for it.
-
- len desc
- ----------------------------------------------------------------------------
- 4 "FSM■" - File magic #1
- 32 Sample name
- 3 (10,13,26)
- 4 Length of sample (currently only support up to 64k samples)
- 1 Finetune (also not supported right now)
- 1 Volume ... yet another unsupported feature
- 4 Repeat Start
- 4 Repeat End - If the sample is looping, this should be set to the repeat
- end value. Otherwise, it should be set to the length of the sample.
- 1 Sample Type byte
-
- 1<<0 8/16 bit (8=0 16=1)
-
- 1 Looping mode byte
-
- 1<<3 On=looped, Off=not looped
-
- (len) Sample data in SIGNED format
-
-
-
- Farandole .USM Sample/instrument format
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- (len) Sample data in UNSIGNED format
-
-
-