* * Format of NoiseTracker IIgs v1.0 modules. * * Written by Olivier Goguel of FTA, 1991. * * Translation and editing by Ian Schmidt. * This version copyright (c) 1993 Two Meg Software. * * Note that this is the SAVE MODULE format, not the SAVE MUSIC format. * (SAVE MUSIC uses compression and has the wave/instrument data in a separate * file, but is otherwise similar). * NTGS MODULE FORMAT (all values are words unless otherwise noted) Offset Name What +000 Null Two zero bytes. +002 Signature The ASCII bytes "FTA MODULEFILE" (without the quotes). +016 Tempo The Frequency Lo value to feed to a DOC timing oscillator. +018 Loop mode BOOLEAN flag: nonzero if music loops. +020 Raw mode BOOLEAN flag: selects Raw or Sync mode. +022 Num. Pos Number of positions in the block table. +024 NBlks Def Number of defined blocks. +026 NInst DOC Number of DOCRAM based instruments. +028 NInst RAM Number of RAM based (swapped) instruments. +030 Mode 4K BOOLEAN flag: FALSE for 2k swap buffers, TRUE for 4k. +032 ISize DOC Size of DOCRAM based instruments (in pages). +034 ISize RAM Size of RAM based instruments (in pages) +036 Num RAM Trk Number of RAM based tracks. +038 BlkSize Size of a block structure (unlike SS, it's variable size) +040 Unused Reserved. +042 Mus. Size Total size of music (longword). +046 Unused Reserved. +048 Unused (16 bytes) +052 Stereo Tab 30 bytes: stereo information table just like SoundSmith's. +082 Blk List 512 bytes: table of BYTES indicating which block maps to which position. +594 Blocks (in numerical ascending order: block 0 is first followed by block 1 and so on). NoiseTracker GS encodes notes using 3 bytes per note, arranged as follows: %nnnnnnnn %aabbbbbb %ffffffff N is the note, in standard SoundSmith format (MIDI note number offset by 1 octave). A is the effect nibble: 00 is no effect, 01 is volume set, 10 is tempo change, and 11 is undefined and should not be used. F is the effect parameter. There are always 64 lines of music per block; hence a block's size is (number of tracks)*3*64. The first NumRAMTrk tracks in a line are the RAM based (swap) tracks; remaining tracks in a line are DOCRAM based. Instrument numbers should be interpreted accordingly. Following the blocks are the instrument definitions. The instrument definitions require ((NInst DOC)+(NInstRAM))*32 bytes. (Each instrument definition is 32 bytes). Instrument definition format: +000 InstName Name of the instrument: a 13 byte ASCII string. +013 InstID The ASCII character "-" followed by 2 ASCII bytes indicating the instrument's number. +017 InstSize Size of the instrument in pages. +019 InstPos Position of the instrument within the file, in pages. +021 InstVol Default volume setting for this instrument. Although this parameter is a word, legal values range from 0 to 255. +023 InstType FFFF for RAM based (swap) instruments, else the address in DOCRAM of this instrument. +025 InstLeft BOOLEAN: TRUE if instrument should play on the left. +027 InstRight BOOLEAN: TRUE if instrument should play on the right. +029 InstSMode BOOLEAN: TRUE if instrument should use it's track's stereo information. (InstLeft and InstRight are then ignored). Following the instrument definitions are the waveforms, each aligned on a page boundry and padded with zeros if necessary to insure page alignment. To find the wave belonging to each instrument, use the instrument's InstPos parameter. Questions/Comments: INet: irsman@aol.com irsman@iastate.edu AOL: IRSMan USMail: 2207 E. Locust Davenport, IA, 52803