.1 DigiTrekker Module Format (*.DTM) rev1.0                             page 1
-------------------------------------------------------------------------------

This documentation describes the DigiTrekker Module Format. This format was
first introduces with DigiTrekker 3.0, anyway 3.0 was the first version ever
published.

All number below are given in decimal format. Hexadecimal numbers are given
the prefix '0x'.

Symbols given in brackets [] are used to refer to the value of this field for
later use.

Module characteristics:
-----------------------
o no limit on channels
o up to 255 instruments
o up to 255 patterns
o up to 255 sequence positions
o patterns split up into tracks
o any number of rows per track
o 8/16 bit samples


The DigiTrekker Modules (DTM's) are organized in the IFF chunk format. The
chunk length and all other integer and long values are stored in Intel
byte order with the LSB first and the MSB last.

A chunk is built like this:
4 byte ID, eg. "SONG"
4 byte length, eg. 0x05680100

The whole file is a sequence of such chunks. The main advantage of this tech-
nique is that the module format can be easyly enhanced without the need of re-
organization. Therefore only a new chunk would be added. If you encounter any
chunk ID you don't know, don't care and forget the chunk.

The song itself uses cascaded chunks, which means that some chunks are built
up by chunks again.


Terminology
------------------
Module:   the file which contains a song
Song:     everything necessary to play your composition
Sequence: the sequence (=order) tells you when to play which pattern
Pattern:  a table with 1 entry for each channel which maps a track to it
Track:    (64) rows of notes which are played one after the other
Channel:  the voice on which the sound is calculated and played
Row:      the notes of the tracks which are played at the same time
Frame:    the time a row is played is divided into frames


Overview
==========================