

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.amigaos.net/w/index.php?action=history&amp;feed=atom&amp;title=TRKR_IFF_Tracker_Music_Module</id>
	<title>TRKR IFF Tracker Music Module - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.amigaos.net/w/index.php?action=history&amp;feed=atom&amp;title=TRKR_IFF_Tracker_Music_Module"/>
	<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=TRKR_IFF_Tracker_Music_Module&amp;action=history"/>
	<updated>2026-05-06T17:06:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=TRKR_IFF_Tracker_Music_Module&amp;diff=2115&amp;oldid=prev</id>
		<title>Steven Solie: Created page with &quot;= TRKR =  &lt;pre&gt;                               IFF FORM TRKR                 Proposal for an IFF Tracker Song File Format                   (revision 1.1, as of January 1, 1993...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=TRKR_IFF_Tracker_Music_Module&amp;diff=2115&amp;oldid=prev"/>
		<updated>2012-05-10T19:48:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= TRKR =  &amp;lt;pre&amp;gt;                               IFF FORM TRKR                 Proposal for an IFF Tracker Song File Format                   (revision 1.1, as of January 1, 1993...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= TRKR =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                              IFF FORM TRKR&lt;br /&gt;
&lt;br /&gt;
               Proposal for an IFF Tracker Song File Format&lt;br /&gt;
                  (revision 1.1, as of January 1, 1993)&lt;br /&gt;
&lt;br /&gt;
     Designed and written by Darren Schebek, Full Tilt Entertainment&lt;br /&gt;
                    Usenet: dschebek@outb.wimsey.bc.ca&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since releasing my original draft, I have heard comments that an IFF tracker&lt;br /&gt;
module file format would &amp;quot;balloon&amp;quot; the original tracker module out with a lot&lt;br /&gt;
of header overhead.  This is not so.  In fact, this IFF TRKR file format&lt;br /&gt;
eliminates a *great deal* of unnecessary and redundant file data inherent in&lt;br /&gt;
typical module file formats (Noisetracker v2.0 being the worst I&amp;#039;ve seen so&lt;br /&gt;
far).  Much of this space is used up in trailing note events at the end of&lt;br /&gt;
patterns (eg, for modules that only use the first 48 notes in a pattern),&lt;br /&gt;
duplication of patterns at the individual channel level (which Noisetracker&lt;br /&gt;
v2.0 is notorious for), and unnecessarily padding out the play sequence table&lt;br /&gt;
to a constant size, regardless of how many elements in the table are actually&lt;br /&gt;
used.&lt;br /&gt;
&lt;br /&gt;
I have attempted to design this file format with the idea utmost in mind of&lt;br /&gt;
allowing as many possible tracker formats to be upward-compatible with it.&lt;br /&gt;
&lt;br /&gt;
I have also decided to all but eliminate MIDI support, while still trying to&lt;br /&gt;
allow for MIDI extensions to the format.  I do this partly in order to more&lt;br /&gt;
accurately define the essence of a tracker module, but also because I feel&lt;br /&gt;
unqualified to define an effective template for MIDI support.  However, MIDI&lt;br /&gt;
extensions can always be added to the format later on.&lt;br /&gt;
&lt;br /&gt;
On the other hand, I have deliberately designed this draft of the IFF TRKR&lt;br /&gt;
format to be much more powerful and flexible than a &amp;quot;standard&amp;quot; tracker module.&lt;br /&gt;
It is always easier to trim down a design than to expand it. &lt;br /&gt;
&lt;br /&gt;
One of the major changes I have made is to never assume a specific size for a&lt;br /&gt;
given pattern of notes.  With this draft, patterns can be any length at all.&lt;br /&gt;
There is a slight downside to this.  Whereas with the old Noisetracker format,&lt;br /&gt;
all patterns were 64 notes in length (thus ensuring that new patterns for each&lt;br /&gt;
audio channel started simultaneously), my file format loses this convenience.&lt;br /&gt;
New patterns can start at any given time in any given audio channel without&lt;br /&gt;
regard to any new patterns in any other audio channel.  As you may notice,&lt;br /&gt;
this plays havoc with repeat commands and other commands that reference to&lt;br /&gt;
specific points in the song.&lt;br /&gt;
&lt;br /&gt;
To solve this problem, I came up with the idea of adding a &amp;quot;marker&amp;quot; chunk to&lt;br /&gt;
the file format.  Each bookmark defines a specific poosition in the song for&lt;br /&gt;
each audio channel, recording (for each audio channel) pattern number and note&lt;br /&gt;
offset into that pattern.  A player program can read in the song, read in the&lt;br /&gt;
bookmark chunk(s), then pre-calculate appropriate pointers for each bookmark&lt;br /&gt;
prior to playing the song.  Any commands that refer to these bookmarks (eg, a&lt;br /&gt;
REPEAT command) will reference the bookmark by number in the same way that&lt;br /&gt;
instruments are referenced.&lt;br /&gt;
&lt;br /&gt;
Another idea I came up with was a resolution to the timing problems&lt;br /&gt;
inherent with PAL/NTSC songs (since no such timing information is stored in&lt;br /&gt;
most tracker formats).  Timing in my format is now specified in &amp;quot;note&lt;br /&gt;
events per minute&amp;quot;.  With this method of timing, calculations for CIA timer&lt;br /&gt;
frequency become trivial.  It is, however, still up to the player program&lt;br /&gt;
to determine whether it is running on a PAL or NTSC Amiga and to compensate&lt;br /&gt;
for the slight difference in CIA clock frequency (most players that use the&lt;br /&gt;
CIA timers do not make this compensation).  So a 60Hz playback frequency&lt;br /&gt;
now becomes 3600 note events per minute, and 50 Hz becomes 3000 note&lt;br /&gt;
events/minute.  With this timing method, it is also possible to create a&lt;br /&gt;
new song command that allows you to change the playback frequency (and I have&lt;br /&gt;
done so.&lt;br /&gt;
&lt;br /&gt;
The longword that comprises a &amp;quot;note event&amp;quot; has also been modified drastically,&lt;br /&gt;
and now contains a 13-bit operand field.  This allows for greater resolution&lt;br /&gt;
for commands such as SAMPLE OFFSET.  It also facilitates the command for&lt;br /&gt;
setting the number of note events per minute.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll start with a sort of visual summary of the format, and then explain the&lt;br /&gt;
various chunks and fields.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
------------------------------&lt;br /&gt;
&lt;br /&gt;
FORM size&lt;br /&gt;
&lt;br /&gt;
TRKR&lt;br /&gt;
&lt;br /&gt;
TRHD size&lt;br /&gt;
   ubyte numsongs    Number of TRSG chunks in this FORM TRKR.&lt;br /&gt;
   ubyte numinsts    Number of TINS chunks in this FORM TRKR.&lt;br /&gt;
   uword numpatts    Number of PATT chunks in this FORM TRKR.&lt;br /&gt;
&lt;br /&gt;
[NAME]               Optional NAME chunk.&lt;br /&gt;
[AUTH]               Optional AUTH chunk.&lt;br /&gt;
[ANNO]               Optional ANNO chunk.&lt;br /&gt;
[(c) ]               Optional (c)  chunk.&lt;br /&gt;
&lt;br /&gt;
TRSG size            Required chunk.  May be more than one TRSG chunk.&lt;br /&gt;
&lt;br /&gt;
   SGHD  size                 Required Song header chunk.&lt;br /&gt;
      uword ticksperminute    Number of &amp;quot;ticks&amp;quot; (interrupts) per minute.&lt;br /&gt;
      ubyte tickspernote      Number of &amp;quot;ticks&amp;quot; between successive note events.&lt;br /&gt;
      ubyte iterations        Default number of iterations to play this song.&lt;br /&gt;
      ubyte numchannels       Number of audio channels used by this song.&lt;br /&gt;
      ubyte flags             Various flags for this song.&lt;br /&gt;
      FIXED volume            Default global volume of this entire song.&lt;br /&gt;
      char  songname[]        Title of this song.&lt;br /&gt;
&lt;br /&gt;
   CSEQ  size                 Required channel sequence chunk. One per channel.&lt;br /&gt;
      uword pattarray[]       Word array of PATT #&amp;#039;s to play for channel #0.&lt;br /&gt;
   CSEQ  size&lt;br /&gt;
      uword pattarray[]       Word array of PATT #&amp;#039;s to play for channel #1.&lt;br /&gt;
   .&lt;br /&gt;
   .&lt;br /&gt;
   .&lt;br /&gt;
   CSEQ  size&lt;br /&gt;
      uword pattarray[]       Array of PATT #&amp;#039;s to play for&lt;br /&gt;
                               channel #(numchannels-1).&lt;br /&gt;
&lt;br /&gt;
   [MRKR]  size               Opt. marker chunk for recording repeat points.&lt;br /&gt;
      ulong noteoffset        Offset in notes to marker&amp;#039;s position in song.&lt;br /&gt;
      ubyte register          Register number for referencing this marker.&lt;br /&gt;
      char  markername[]      Name of the marker (for referencing by name).&lt;br /&gt;
&lt;br /&gt;
   [MRKR]  size               There is no limit to the number of MRKR chunks.&lt;br /&gt;
      etc.&lt;br /&gt;
&lt;br /&gt;
TINS  size                    Required instrument chunk.&lt;br /&gt;
&lt;br /&gt;
   TIHD  size                 Required instrument header chunk.&lt;br /&gt;
      ubyte register          Register number of this instrument&lt;br /&gt;
      ubyte type              Type of instrument. 0 = 8SVX.&lt;br /&gt;
      FIXED volume            Default relative volume of this instrument.&lt;br /&gt;
      ubyte data1             MIDI channel # if type = 1.&lt;br /&gt;
      ubyte data2             MIDI preset # if type = 1.&lt;br /&gt;
      char  instname[]        Name of this instrument (or filename).&lt;br /&gt;
&lt;br /&gt;
   [FORM size 8SVX...]        Optional Instrument data for this instrument.&lt;br /&gt;
&lt;br /&gt;
TINS  size                    There can be up to 63 TINS chunks in the file.&lt;br /&gt;
&lt;br /&gt;
   TIHD  size ...&lt;br /&gt;
   [FORM size 8SVX...]&lt;br /&gt;
&lt;br /&gt;
PATT  size                    Required pattern data chunk.&lt;br /&gt;
   ulong nevents[]            Longword array of note events comprising pattern.&lt;br /&gt;
&lt;br /&gt;
PATT  size                    There can be up to 65536 PATT chunks in the FORM.&lt;br /&gt;
   ulong nevents[]            PATT chunks are the last chunks in the FORM TRKR.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
------------------------------&lt;br /&gt;
&lt;br /&gt;
Here now is an explanation of all chunks and their corresponding fields:&lt;br /&gt;
&lt;br /&gt;
==============================&lt;br /&gt;
&lt;br /&gt;
TRHD chunk - Required:&lt;br /&gt;
&lt;br /&gt;
The TRHD chunk contains information global to the file.  It contains the&lt;br /&gt;
following fields...&lt;br /&gt;
&lt;br /&gt;
   ubyte numsongs&lt;br /&gt;
&lt;br /&gt;
   Specifies how many TRSG chunks (ie, songs) are contained within the FORM&lt;br /&gt;
   TRKR.  There is no limit to the number of TRSG chunks that can exist,&lt;br /&gt;
   although 256 of them should be a reasonable limit (or perhaps even less).&lt;br /&gt;
   &lt;br /&gt;
   ubyte numinsts&lt;br /&gt;
&lt;br /&gt;
   Specifies how many TINS chunks (ie, instrument definitions) exist within&lt;br /&gt;
   the FORM TRKR.  There can be up to 63 TINS chunks in a FORM TRKR, since&lt;br /&gt;
   the note event has enough bits allocated to support that many instruments.&lt;br /&gt;
   Instruments are shared by all songs in the FORM TRKR.&lt;br /&gt;
&lt;br /&gt;
   uword numpatts&lt;br /&gt;
&lt;br /&gt;
   Specifies the number of PATT chunks (ie, patterns, or note event arrays)&lt;br /&gt;
   that exist within the FORM TRKR.  Like instruments, all patterns are&lt;br /&gt;
   shared by all songs in the FORM.  There can be up to 65536 PATT chunks in&lt;br /&gt;
   a single FORM TRKR.&lt;br /&gt;
&lt;br /&gt;
==============================&lt;br /&gt;
&lt;br /&gt;
Optional &amp;quot;NAME&amp;quot;, &amp;quot;AUTH&amp;quot;, &amp;quot;ANNO&amp;quot;, &amp;quot;(c) &amp;quot; chunks&lt;br /&gt;
&lt;br /&gt;
These standard chunks are optional, and should appear immediately after&lt;br /&gt;
the TRHD chunk in the FORM TRKR.&lt;br /&gt;
&lt;br /&gt;
==============================&lt;br /&gt;
&lt;br /&gt;
TRSG chunk - Required&lt;br /&gt;
&lt;br /&gt;
The TRSG chunk defines the parameters and patterns that comprise a single&lt;br /&gt;
song.  There must be at least one TRSG chunk in the FORM TRKR, appearing&lt;br /&gt;
immediately after the TRHD chunk and any of the optional chunks mentioned&lt;br /&gt;
above (ie, &amp;quot;NAME&amp;quot;, &amp;quot;AUTH&amp;quot;, &amp;quot;ANNO&amp;quot;, &amp;quot;(c) &amp;quot;).&lt;br /&gt;
&lt;br /&gt;
This chunk is made up of several sub-chunks:&lt;br /&gt;
&lt;br /&gt;
   SGHD chunk - Required song header chunk.&lt;br /&gt;
&lt;br /&gt;
   This chunk contains parameters necessary for playing this particular song.&lt;br /&gt;
   The fields are as follows:&lt;br /&gt;
&lt;br /&gt;
      uword ticksperminute&lt;br /&gt;
&lt;br /&gt;
      This field specifies the interrupt frequency of the player in &amp;quot;ticks&amp;quot;&lt;br /&gt;
      per minute, where a &amp;quot;tick&amp;quot; refers to the occurrence of the player&lt;br /&gt;
      interrupt (it is naturally assumed that the player interrupt will be&lt;br /&gt;
      running as a CIA timer interrupt, and not a vertical blank interrupt).&lt;br /&gt;
      This parameter, then, specifies the CIA interrupt frequency.  For&lt;br /&gt;
      example, a value of 3600 ticks/minute (60Hz interrupt frequency), would&lt;br /&gt;
      result in a CIA timer value of 42954540/3600 = 11932 (approx.) for NTSC&lt;br /&gt;
      Amiga platforms and 42562740/3600 = 11823 for PAL Amiga platforms.&lt;br /&gt;
      Defining interrupt frequency in this way eliminates timing differences&lt;br /&gt;
      between NTSC- and PAL-composed songs.  The range for this parameter is&lt;br /&gt;
      700-6000 inclusive.  Slower tempos than 700 can be achieved through&lt;br /&gt;
      subdividing the interrupt (see tickspernote below).&lt;br /&gt;
&lt;br /&gt;
      ubyte tickspernote&lt;br /&gt;
&lt;br /&gt;
      This field is an interrupt subdivider, and corresponds directly to the&lt;br /&gt;
      SET TEMPO command on Noisetracker and other formats.  This specifies&lt;br /&gt;
      the number of &amp;quot;ticks&amp;quot; (interrupts) that must elapse after procesing a&lt;br /&gt;
      note event before processing the next note event.&lt;br /&gt;
&lt;br /&gt;
      ubyte iterations&lt;br /&gt;
&lt;br /&gt;
      Specifies the default number of iterations to play thge song for.  A&lt;br /&gt;
      value of 0 means to repeat the song endlessly.  This value can be&lt;br /&gt;
      overridden by commands embedded in the note events (eg, a REPEAT&lt;br /&gt;
      command at the end of the song with a repeat count of 0 (loop forever)&lt;br /&gt;
      may cause the song to loop forever even though the iterations field&lt;br /&gt;
      here says to play the song only once.&lt;br /&gt;
&lt;br /&gt;
      ubyte numchannels&lt;br /&gt;
&lt;br /&gt;
      This field indicates the number of audio channels this song uses.  It&lt;br /&gt;
      must have a value of 1 or greater.  The value here also specifies the&lt;br /&gt;
      number of CSEQ chunks (channel sequence arrays) that are defined in&lt;br /&gt;
      this TRSG chunk.&lt;br /&gt;
&lt;br /&gt;
      ubyte flags&lt;br /&gt;
&lt;br /&gt;
      This flags field currently has no defined bits, but could have flags&lt;br /&gt;
      indicating such things as fading the song out on the last iteration of&lt;br /&gt;
      play (via reducing the global volume of the song), among other things.&lt;br /&gt;
&lt;br /&gt;
      FIXED volume&lt;br /&gt;
&lt;br /&gt;
      Specifies the global volume at which the piece is to be played.&lt;br /&gt;
      Implementing this may require appropriately re-scaling the default&lt;br /&gt;
      volumes of the intruments.  This means that it is rather important to&lt;br /&gt;
      keep track of the original instrument default volumes in their&lt;br /&gt;
      unit-value forms (ie, FIXED format, 0..1).&lt;br /&gt;
&lt;br /&gt;
      char songname[]&lt;br /&gt;
&lt;br /&gt;
      This is the title of this song.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   CSEQ chunk - Required&lt;br /&gt;
&lt;br /&gt;
   A CSEQ chunk is simply an array of pattern numbers to play for a given&lt;br /&gt;
   audio channel. The first CSEQ chunk in a TRSG chunk corresponds to audio&lt;br /&gt;
   channel #0, the next one corresponds to channel #1, etc.  The number of&lt;br /&gt;
   CSEQ chunks in the TRSG chunk must match the number specified by the&lt;br /&gt;
   &amp;quot;numchannels&amp;quot; parameter in the SGHD (song header) chunk.  These pattern&lt;br /&gt;
   number arrays should be ordered such that the most important CSEQ&amp;#039;s appear&lt;br /&gt;
   first.  This is because future Amiga platforms will support more than the&lt;br /&gt;
   current 4 audio channels.  FORM TRKR songs that take advantage of more&lt;br /&gt;
   channels will still be able to be played on an older 4-channel platform,&lt;br /&gt;
   with the extra CSEQ chunks being ignored.&lt;br /&gt;
&lt;br /&gt;
   The CSEQ chunk&amp;#039;s array consists of any number of word elements. Each&lt;br /&gt;
   element refers to a pattern array (see PATT chunk below) to play for a&lt;br /&gt;
   given audio channel.  Pattern numbers are derived from the order of PATT&lt;br /&gt;
   chunks in the FORM TRKR (ie, the first PATT chunk in the file is pattern&lt;br /&gt;
   #0, then next PATT chunk is pattern #1, etc).&lt;br /&gt;
&lt;br /&gt;
   MRKR chunk - Optional&lt;br /&gt;
&lt;br /&gt;
   The MRKR (ie, marker) chunk records a specific global position in the song.&lt;br /&gt;
   It is used by any embedded song commands that cause a change in the&lt;br /&gt;
   position of the song (eg, the REPEAT command).  These position-control&lt;br /&gt;
   commands specify the new position in the song by referring to one of these&lt;br /&gt;
   markers.  Since patterns can be any length at all, there is no gaurantee&lt;br /&gt;
   that new patterns will start in all audio channels at the same time.&lt;br /&gt;
   Rather, new patterns can start in any audio channel at any time.&lt;br /&gt;
   Therefore, the MRKR chunks exist so that, prior to playing the song, a&lt;br /&gt;
   player program can process each MRKR chunk and precalculate positions in&lt;br /&gt;
   the song (since some markers may result in a position in the middle of an&lt;br /&gt;
   arbitrary pattern).&lt;br /&gt;
&lt;br /&gt;
   The fields of the MRKR chunk are as follows:&lt;br /&gt;
&lt;br /&gt;
      ulong noteoffset&lt;br /&gt;
&lt;br /&gt;
      This specifies where in the song the marker lies as an offset in note&lt;br /&gt;
      events from the beginning of the song.  Calculating the exact position&lt;br /&gt;
      of a marker involves examining (for each CSEQ chunk in the song) all&lt;br /&gt;
      pattern numbers and the length in notes of those patterns.  It is then&lt;br /&gt;
      necessary to calculate an offset into the corresponding CSEQ array, as&lt;br /&gt;
      well as an offset into the pattern to the precise position of the&lt;br /&gt;
      marker.  This must be done for each audio channel (each CSEQ chunk) that&lt;br /&gt;
      will be used prior to playing a song.  This is a rather tedious thing to&lt;br /&gt;
      be doing on-the-fly, so pre-calculating these offsets is much more&lt;br /&gt;
      desirable.&lt;br /&gt;
&lt;br /&gt;
      ubyte register&lt;br /&gt;
&lt;br /&gt;
      This is the register number of the marker.  It is by this number that&lt;br /&gt;
      all embedded song commands reference a given marker.  Each marker in a&lt;br /&gt;
      TRSG chunk must have a unique register number, but they can be re-used&lt;br /&gt;
      in successive TRSG chunks in the FORM TRKR if so desired.&lt;br /&gt;
&lt;br /&gt;
      char  markername[]&lt;br /&gt;
&lt;br /&gt;
      This is the name of the marker.  Some music editors may wish to allow&lt;br /&gt;
      users to reference markers by name rather than number (which may get&lt;br /&gt;
      somewhat confusing with multiple songs in memory).  It can be left out&lt;br /&gt;
      if desired, since the name is only meaningful to an editor and not used&lt;br /&gt;
      by a simple player program (a player program would reference markers by&lt;br /&gt;
      their register number).&lt;br /&gt;
&lt;br /&gt;
==============================&lt;br /&gt;
&lt;br /&gt;
TINS chunk - Required&lt;br /&gt;
&lt;br /&gt;
The TINS chunk (Tracker INStrument) defines the nature and parameters of an&lt;br /&gt;
instrument, and may optionally contain the actual instrument data (eg, it may&lt;br /&gt;
optionally include a FORM 8SVX).&lt;br /&gt;
&lt;br /&gt;
If the actual instrument data is not contained within the TINS chunk, then&lt;br /&gt;
the IFF loader program will have to go to disk (or other medium) to acquire&lt;br /&gt;
the instrument data.  I&amp;#039;m not sure if it&amp;#039;s considered good form to embed a&lt;br /&gt;
FORM 8SVX within a TINS chunk.  I suspect it&amp;#039;s not, but I&amp;#039;ve done it anyway.&lt;br /&gt;
&lt;br /&gt;
The TINS chunk contains the following required TIHD (Tracker Instrument&lt;br /&gt;
HeaDer) chunk:&lt;br /&gt;
&lt;br /&gt;
   TIHD chunk - Required&lt;br /&gt;
&lt;br /&gt;
   This header chunk desribes the parameters of an instrument.  It contains&lt;br /&gt;
   the following fields:&lt;br /&gt;
&lt;br /&gt;
      ubyte register&lt;br /&gt;
&lt;br /&gt;
      Contains the register number of this instrument.  Instruments are&lt;br /&gt;
      referenced from within the song by this number, and so each&lt;br /&gt;
      instrument&amp;#039;s register number must be unique, and in the range 1..63&lt;br /&gt;
      inclusive.&lt;br /&gt;
&lt;br /&gt;
      ubyte type&lt;br /&gt;
&lt;br /&gt;
      This specifies the type of the instrument (ie, the nature of the&lt;br /&gt;
      instrument&amp;#039;s data).  A type of 0 means that the instrument is an IFF&lt;br /&gt;
      FORM 8SVX sample.  A type of 1 means that the instrument is a MIDI&lt;br /&gt;
      instrument.  No extra values for the type field have been defined thus&lt;br /&gt;
      far.  A type not understood by a player should cause the player to&lt;br /&gt;
      either ignore all references to that instrument, or the player could&lt;br /&gt;
      have default instruments prepared to replace those that are defined but&lt;br /&gt;
      not understood.&lt;br /&gt;
&lt;br /&gt;
      FIXED volume&lt;br /&gt;
&lt;br /&gt;
      This is the default volume of this instrument in FIXED format (ie, a&lt;br /&gt;
      &amp;quot;unit-value&amp;quot; fixed-point integer in the range 0..1).  It should be&lt;br /&gt;
      scaled appropriately based on the global volume of any song that uses&lt;br /&gt;
      it (eg, if global volume is 48, then this FIXED value represents a value&lt;br /&gt;
      from 0..48, where unity is represented by 48).&lt;br /&gt;
&lt;br /&gt;
      ubyte data1&lt;br /&gt;
&lt;br /&gt;
      If the &amp;quot;type&amp;quot; field is 1, then this field contains the MIDI channel #&lt;br /&gt;
      to be used for this intrument.&lt;br /&gt;
&lt;br /&gt;
      ubyte data2&lt;br /&gt;
&lt;br /&gt;
      If &amp;quot;type&amp;quot; = 1, then this field contains the MIDI preset # to be used&lt;br /&gt;
      for this instrument.&lt;br /&gt;
&lt;br /&gt;
      char  instname[]&lt;br /&gt;
&lt;br /&gt;
      This is the name of the instrument.  If the instrument data itself (eg,&lt;br /&gt;
      a FORM 8SVX) is not included in the TINS chunk, then this name field&lt;br /&gt;
      can contain a filename to be used to search for the instrument data&lt;br /&gt;
      elsewhere.  Editors and player programs should have the facility to&lt;br /&gt;
      search various user-defined paths for such instruments.  No path should&lt;br /&gt;
      *ever* be specified in the instname[] field. Only the filename of the&lt;br /&gt;
      instrument data.&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
   Optional instrument data chunk (eg, IFF 8SVX)&lt;br /&gt;
&lt;br /&gt;
   Optionally, the actual instrument data chunk can appear here as part of the&lt;br /&gt;
   TINS chunk.  The presence of instrument data can be determined by examining&lt;br /&gt;
   the number of bytes in the TINS chunk less the size of the TIHD chunk&lt;br /&gt;
   inside it (ie, the entire TIHD chunk, including ID field and size field).&lt;br /&gt;
&lt;br /&gt;
My goals in creating this new IFF format have been:&lt;br /&gt;
&lt;br /&gt;
   - To resolve timing conflicts between PAL and NTSC Amiga systems by&lt;br /&gt;
     standardizing tempo and timing.&lt;br /&gt;
&lt;br /&gt;
   - To redesign the note event format to allow greater flexibility and&lt;br /&gt;
     expandability for future enhancements and extensions to the format.&lt;br /&gt;
&lt;br /&gt;
   - To provide a specification for support of IFF 8SVX samples that contain&lt;br /&gt;
     data for up to three octaves.&lt;br /&gt;
&lt;br /&gt;
   - And finally, to try to combine the best features of many of the popular&lt;br /&gt;
     module formats so that as many different formats as possible can be&lt;br /&gt;
     converted to the new IFF tracker format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                       NOTE EVENT DESIGN AND LAYOUT&lt;br /&gt;
                       ----------------------------&lt;br /&gt;
&lt;br /&gt;
   I have redesigned the structure of a note event to allow for greater&lt;br /&gt;
flexibility and expandability.  The note event no longer contains&lt;br /&gt;
Amiga-specific period values to represent note pitch, but has been changed to&lt;br /&gt;
a note number in the range 0..127.  This is to facilitate support for MIDI&lt;br /&gt;
instruments in the future.  Standard tracker module period values map into&lt;br /&gt;
this range as 1..36 inclusive (a note number of 0 means no note is to be&lt;br /&gt;
played).  Players that support five-octave 8SVX instruments can extend the&lt;br /&gt;
range of notes to 1..60 (five octaves).&lt;br /&gt;
&lt;br /&gt;
   The note event allows specification of up to 63 different commands, with&lt;br /&gt;
as many as 12 bits of operand available for each command.  Also, up to 63&lt;br /&gt;
instruments can be specified.&lt;br /&gt;
&lt;br /&gt;
   The note event is a longword value.  Its bits are allocated as follows:&lt;br /&gt;
&lt;br /&gt;
                           High word of note event:&lt;br /&gt;
              +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+&lt;br /&gt;
      Bit #31 |n6|n5|n4|n3|n2|n1|n0|i5|i4|i3|i2|i1|i0|c5|c4|c3| Bit #16&lt;br /&gt;
              +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+&lt;br /&gt;
&lt;br /&gt;
                           Low word of note event:&lt;br /&gt;
              +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+&lt;br /&gt;
      Bit #15 |c2|c1|c0|oC|oB|oA|o9|o8|o7|o6|o5|o4|o3|o2|o1|o0| Bit #0&lt;br /&gt;
              +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+&lt;br /&gt;
&lt;br /&gt;
Bit descriptions of the note event:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bits n0-n7: Contains the note number to play, which is a value from 0..127&lt;br /&gt;
            inclusive.  For simple, one octave 8SVX instruments, only values&lt;br /&gt;
            from 1..36 are used (1..60 for 5-octave 8SVX insts, and the entire&lt;br /&gt;
            range can be used for future MIDI support.  To determine the&lt;br /&gt;
            octave at which to play the note (0, 1, or 2), simply subtract 1&lt;br /&gt;
            and divide the result by 12.  The remainder of this division gives&lt;br /&gt;
            you the note to play relative to this octave.  If the note number&lt;br /&gt;
            field is 0, then no note is to be played.&lt;br /&gt;
&lt;br /&gt;
            Notes are allocated as follows (for 1-octave 8SVX):&lt;br /&gt;
&lt;br /&gt;
                                 Amiga&lt;br /&gt;
            Octave    Note    Period value    &lt;br /&gt;
&lt;br /&gt;
               0       C          856         &lt;br /&gt;
               0       C#         808         &lt;br /&gt;
               0       D          762         &lt;br /&gt;
               0       D#         720         &lt;br /&gt;
               0       E          678         &lt;br /&gt;
               0       F          640         &lt;br /&gt;
               0       F#         604         &lt;br /&gt;
               0       G          570         &lt;br /&gt;
               0       G#         538         &lt;br /&gt;
               0       A          508         &lt;br /&gt;
               0       A#         480         &lt;br /&gt;
               0       B          453         &lt;br /&gt;
               1       C          428         &lt;br /&gt;
               1       C#         404         &lt;br /&gt;
               1       D          381         &lt;br /&gt;
               1       D#         360         &lt;br /&gt;
               1       E          339         &lt;br /&gt;
               1       F          320         &lt;br /&gt;
               1       F#         302         &lt;br /&gt;
               1       G          285         &lt;br /&gt;
               1       G#         269         &lt;br /&gt;
               1       A          254         &lt;br /&gt;
               1       A#         240         &lt;br /&gt;
               1       B          226         &lt;br /&gt;
               2       C          214         &lt;br /&gt;
               2       C#         202         &lt;br /&gt;
               2       D          190         &lt;br /&gt;
               2       D#         180         &lt;br /&gt;
               2       E          170         &lt;br /&gt;
               2       F          160         &lt;br /&gt;
               2       F#         151         &lt;br /&gt;
               2       G          143         &lt;br /&gt;
               2       G#         135         &lt;br /&gt;
               2       A          127         &lt;br /&gt;
               2       A#         120         &lt;br /&gt;
               2       B          113         &lt;br /&gt;
&lt;br /&gt;
Bits i0-i5: Specifies a new instrument to use.  If this value is 0, then no new&lt;br /&gt;
            instrument is to be selected.  Otherwise, it is an instrument&lt;br /&gt;
            register number from 1..63 inclusive (instrument register numbers&lt;br /&gt;
            start at 1, not 0) that specifies a new instrument to be selected.&lt;br /&gt;
            Note that the new instrument is not to be actually played at this&lt;br /&gt;
            time unless a note number has been specified, or if an included&lt;br /&gt;
            command says otherwise.&lt;br /&gt;
&lt;br /&gt;
Bits c0-c5: Specifies a command to be executed.  A value of 0 means no command&lt;br /&gt;
            is to be executed.  A value of 1..63 specifies a command to be&lt;br /&gt;
            executed (commands themselves are discussed further on).&lt;br /&gt;
&lt;br /&gt;
Bits o0-oC: This is the operand field used by the various commands supported&lt;br /&gt;
            by FORM &amp;quot;TRKR&amp;quot;.  Although this is a thirteen-bit field, some&lt;br /&gt;
            commands may not use the entire twelve bits for their operand.&lt;br /&gt;
            Also, other commands may partition the field if they require more&lt;br /&gt;
            than a single input operand.  Typically, signed operands use only&lt;br /&gt;
            the lowest eight bits of the operand field, since it&amp;#039;s a bit (pun&lt;br /&gt;
            not intended) of a pain to have to sign-extend a thirteen-bit&lt;br /&gt;
            field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 Command Specification for IFF FORM &amp;quot;TRKR&amp;quot;&lt;br /&gt;
                 -----------------------------------------&lt;br /&gt;
&lt;br /&gt;
   As a result of certain features of this file format, certain commands from&lt;br /&gt;
tracker-style module file formats have become obsolete.  For example, the&lt;br /&gt;
&amp;quot;Pattern Break&amp;quot; command is no longer needed, as patterns can be any length at&lt;br /&gt;
all.  &amp;quot;Pattern Break&amp;quot; was required in tracker-style formats because patterns&lt;br /&gt;
were always 64 note events long.  If composing a song in 3/4 time (typically&lt;br /&gt;
using only the first 48 notes in a pattern) then the &amp;quot;Pattern Break&amp;quot; was&lt;br /&gt;
required to skip past the remaining unused note events in the 64-note pattern.&lt;br /&gt;
&lt;br /&gt;
   In order to fully describe the function of each command, it is necessary to&lt;br /&gt;
break down the commands into categories.&lt;br /&gt;
&lt;br /&gt;
   First of all, a &amp;quot;tick&amp;quot; refers to the occurrence of the player interrupt.&lt;br /&gt;
The player interrupt occurs on every tick, but it only processes the next note&lt;br /&gt;
event in the current pattern on every nth tick (where n is determined by the&lt;br /&gt;
current &amp;quot;ticks per note&amp;quot; setting).&lt;br /&gt;
&lt;br /&gt;
   The &amp;quot;tick&amp;quot; that occurs in which a new note event is fetched shall&lt;br /&gt;
henceforth be referred to as the &amp;quot;note tick&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
   Some commands are simply processed once on the note tick (ie, as soon as&lt;br /&gt;
they are fetched).  A good example would be the &amp;quot;Set Channel Volume&amp;quot; command,&lt;br /&gt;
which modifies the current volume of an audio channel immediately.  The&lt;br /&gt;
command is then finished.&lt;br /&gt;
&lt;br /&gt;
   Other commands stay active for longer periods of time.  For example, the&lt;br /&gt;
&amp;quot;Arpeggio&amp;quot; command must play three notes cyclicly in an audio channel.  It&lt;br /&gt;
starts playing these notes on the note tick that the command was found, and&lt;br /&gt;
plays a different note (of the three notes) on *every* tick after that, until&lt;br /&gt;
the next note tick.&lt;br /&gt;
&lt;br /&gt;
   I will do my best to explain how each command works in detail in this&lt;br /&gt;
section, including possible suggestions for implementation in a player&lt;br /&gt;
program.&lt;br /&gt;
&lt;br /&gt;
   First, a summary of the commands with a brief description of each, along&lt;br /&gt;
with each command&amp;#039;s number:&lt;br /&gt;
&lt;br /&gt;
                               Command Summary&lt;br /&gt;
&lt;br /&gt;
Cmd #   Name                    Description&lt;br /&gt;
&lt;br /&gt;
  0   No Command                No command.&lt;br /&gt;
  1   Arpeggio                  Play a three-note arpeggio.&lt;br /&gt;
  2   Pitch Bend                Raise/lower current note pitch on every tick.&lt;br /&gt;
  3   One-Time Pitch Bend       Raise/lower pitch by specified amount once only.&lt;br /&gt;
  4   Portamento                Slide from cur. pitch up/down to specified note.&lt;br /&gt;
  5   Vibrato                   Apply vibrato on current note.&lt;br /&gt;
  6   Portamento+Volume Bend    Slide from cur. note to new note with volume bend.&lt;br /&gt;
  7   Vibrato+Volume Bend       Apply vibrato to current note with volume bend.&lt;br /&gt;
  8   Tremolo                   Apply tremolo to current note.&lt;br /&gt;
  9   Set Sample Offset         Set data start offset for current instrument.&lt;br /&gt;
 10   Volume Bend               Bend current channel volume up or down.&lt;br /&gt;
 11   One-Time Volume Bend Up   Increase volume by specified amount.&lt;br /&gt;
 12   One-Time Volume Bend Down Decrease volume by specified amount.&lt;br /&gt;
 13   Set Volume                Set this channel&amp;#039;s volume to a specified value.&lt;br /&gt;
 14   Set Filter                Turn low-pass filter on/off.&lt;br /&gt;
 15   Set Ticks Per Note        Set new ticks/note (aka &amp;quot;Tempo&amp;quot;).&lt;br /&gt;
 16   Set Ticks Per Minute      Set ticks/minute (range 700-6000, 3000 = 50Hz).&lt;br /&gt;
 17   Restart Note              Restart note n ticks from now.&lt;br /&gt;
 18   Delay Note                Delay playing this note for n ticks.&lt;br /&gt;
 19   Cut-off Note              Cut off current note n ticks from now.&lt;br /&gt;
 20   Pause                     Suspend play at this position for n note events.&lt;br /&gt;
 21   Repeat                    Repeat from specified marker n times.&lt;br /&gt;
 22   Glissando Control         Turn Glissando on/off for this channel.&lt;br /&gt;
 23   Set Vibrato Waveform      Select vibrato waveform type.&lt;br /&gt;
 24   Set Tremolo Waveform      Select tremolo waveform type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    I must thank you for taking the time to review what I have come up with so&lt;br /&gt;
far.  I would greatly appreciate your opinion on the various design issues and&lt;br /&gt;
solutions I have raised throughout this document.&lt;br /&gt;
&lt;br /&gt;
    This is the IFF FORM &amp;quot;TRKR&amp;quot; documentation as it stands at the moment.  The&lt;br /&gt;
next draft of this proposal will include detailed specs on each note-event&lt;br /&gt;
command, as well as a section concerning memory representation of an IFF TRKR&lt;br /&gt;
file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   Darren Schebek&lt;br /&gt;
   Full Tilt Entertainment&lt;br /&gt;
&lt;br /&gt;
   5620 Sherwood Blvd.&lt;br /&gt;
   Delta, B.C.&lt;br /&gt;
   CANADA&lt;br /&gt;
   V4L-2C5&lt;br /&gt;
&lt;br /&gt;
   usenet: dschebek@outb.wimsey.bc.ca&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Steven Solie</name></author>
	</entry>
</feed>