home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Extras / IFF / IFF_Forms / TRKR.proposal < prev    next >
Encoding:
Text File  |  1993-03-01  |  27.6 KB  |  611 lines

  1. TRacKeR style music module format proposal
  2.  
  3.  
  4.                               IFF FORM TRKR
  5.  
  6.                Proposal for an IFF Tracker Song File Format
  7.                   (revision 1.1, as of January 1, 1993)
  8.  
  9.      Designed and written by Darren Schebek, Full Tilt Entertainment
  10.                     Usenet: dschebek@outb.wimsey.bc.ca
  11.  
  12.  
  13. Since releasing my original draft, I have heard comments that an IFF tracker
  14. module file format would "balloon" the original tracker module out with a lot
  15. of header overhead.  This is not so.  In fact, this IFF TRKR file format
  16. eliminates a *great deal* of unnecessary and redundant file data inherent in
  17. typical module file formats (Noisetracker v2.0 being the worst I've seen so
  18. far).  Much of this space is used up in trailing note events at the end of
  19. patterns (eg, for modules that only use the first 48 notes in a pattern),
  20. duplication of patterns at the individual channel level (which Noisetracker
  21. v2.0 is notorious for), and unnecessarily padding out the play sequence table
  22. to a constant size, regardless of how many elements in the table are actually
  23. used.
  24.  
  25. I have attempted to design this file format with the idea utmost in mind of
  26. allowing as many possible tracker formats to be upward-compatible with it.
  27.  
  28. I have also decided to all but eliminate MIDI support, while still trying to
  29. allow for MIDI extensions to the format.  I do this partly in order to more
  30. accurately define the essence of a tracker module, but also because I feel
  31. unqualified to define an effective template for MIDI support.  However, MIDI
  32. extensions can always be added to the format later on.
  33.  
  34. On the other hand, I have deliberately designed this draft of the IFF TRKR
  35. format to be much more powerful and flexible than a "standard" tracker module.
  36. It is always easier to trim down a design than to expand it. 
  37.  
  38. One of the major changes I have made is to never assume a specific size for a
  39. given pattern of notes.  With this draft, patterns can be any length at all.
  40. There is a slight downside to this.  Whereas with the old Noisetracker format,
  41. all patterns were 64 notes in length (thus ensuring that new patterns for each
  42. audio channel started simultaneously), my file format loses this convenience.
  43. New patterns can start at any given time in any given audio channel without
  44. regard to any new patterns in any other audio channel.  As you may notice,
  45. this plays havoc with repeat commands and other commands that reference to
  46. specific points in the song.
  47.  
  48. To solve this problem, I came up with the idea of adding a "marker" chunk to
  49. the file format.  Each bookmark defines a specific poosition in the song for
  50. each audio channel, recording (for each audio channel) pattern number and note
  51. offset into that pattern.  A player program can read in the song, read in the
  52. bookmark chunk(s), then pre-calculate appropriate pointers for each bookmark
  53. prior to playing the song.  Any commands that refer to these bookmarks (eg, a
  54. REPEAT command) will reference the bookmark by number in the same way that
  55. instruments are referenced.
  56.  
  57. Another idea I came up with was a resolution to the timing problems
  58. inherent with PAL/NTSC songs (since no such timing information is stored in
  59. most tracker formats).  Timing in my format is now specified in "note
  60. events per minute".  With this method of timing, calculations for CIA timer
  61. frequency become trivial.  It is, however, still up to the player program
  62. to determine whether it is running on a PAL or NTSC Amiga and to compensate
  63. for the slight difference in CIA clock frequency (most players that use the
  64. CIA timers do not make this compensation).  So a 60Hz playback frequency
  65. now becomes 3600 note events per minute, and 50 Hz becomes 3000 note
  66. events/minute.  With this timing method, it is also possible to create a
  67. new song command that allows you to change the playback frequency (and I have
  68. done so.
  69.  
  70. The longword that comprises a "note event" has also been modified drastically,
  71. and now contains a 13-bit operand field.  This allows for greater resolution
  72. for commands such as SAMPLE OFFSET.  It also facilitates the command for
  73. setting the number of note events per minute.
  74.  
  75. I'll start with a sort of visual summary of the format, and then explain the
  76. various chunks and fields.
  77.  
  78.  
  79. ------------------------------
  80.  
  81. FORM size
  82.  
  83. TRKR
  84.  
  85. TRHD size
  86.    ubyte numsongs    Number of TRSG chunks in this FORM TRKR.
  87.    ubyte numinsts    Number of TINS chunks in this FORM TRKR.
  88.    uword numpatts    Number of PATT chunks in this FORM TRKR.
  89.  
  90. [NAME]               Optional NAME chunk.
  91. [AUTH]               Optional AUTH chunk.
  92. [ANNO]               Optional ANNO chunk.
  93. [(c) ]               Optional (c)  chunk.
  94.  
  95. TRSG size            Required chunk.  May be more than one TRSG chunk.
  96.  
  97.    SGHD  size                 Required Song header chunk.
  98.       uword ticksperminute    Number of "ticks" (interrupts) per minute.
  99.       ubyte tickspernote      Number of "ticks" between successive note events.
  100.       ubyte iterations        Default number of iterations to play this song.
  101.       ubyte numchannels       Number of audio channels used by this song.
  102.       ubyte flags             Various flags for this song.
  103.       FIXED volume            Default global volume of this entire song.
  104.       char  songname[]        Title of this song.
  105.  
  106.    CSEQ  size                 Required channel sequence chunk. One per channel.
  107.       uword pattarray[]       Word array of PATT #'s to play for channel #0.
  108.    CSEQ  size
  109.       uword pattarray[]       Word array of PATT #'s to play for channel #1.
  110.    .
  111.    .
  112.    .
  113.    CSEQ  size
  114.       uword pattarray[]       Array of PATT #'s to play for
  115.                                channel #(numchannels-1).
  116.  
  117.    [MRKR]  size               Opt. marker chunk for recording repeat points.
  118.       ulong noteoffset        Offset in notes to marker's position in song.
  119.       ubyte register          Register number for referencing this marker.
  120.       char  markername[]      Name of the marker (for referencing by name).
  121.  
  122.    [MRKR]  size               There is no limit to the number of MRKR chunks.
  123.       etc.
  124.  
  125. TINS  size                    Required instrument chunk.
  126.  
  127.    TIHD  size                 Required instrument header chunk.
  128.       ubyte register          Register number of this instrument
  129.       ubyte type              Type of instrument. 0 = 8SVX.
  130.       FIXED volume            Default relative volume of this instrument.
  131.       ubyte data1             MIDI channel # if type = 1.
  132.       ubyte data2             MIDI preset # if type = 1.
  133.       char  instname[]        Name of this instrument (or filename).
  134.  
  135.    [FORM size 8SVX...]        Optional Instrument data for this instrument.
  136.  
  137. TINS  size                    There can be up to 63 TINS chunks in the file.
  138.  
  139.    TIHD  size ...
  140.    [FORM size 8SVX...]
  141.  
  142. PATT  size                    Required pattern data chunk.
  143.    ulong nevents[]            Longword array of note events comprising pattern.
  144.  
  145. PATT  size                    There can be up to 65536 PATT chunks in the FORM.
  146.    ulong nevents[]            PATT chunks are the last chunks in the FORM TRKR.
  147. .
  148. .
  149. .
  150.  
  151. ------------------------------
  152.  
  153. Here now is an explanation of all chunks and their corresponding fields:
  154.  
  155. ==============================
  156.  
  157. TRHD chunk - Required:
  158.  
  159. The TRHD chunk contains information global to the file.  It contains the
  160. following fields...
  161.  
  162.    ubyte numsongs
  163.  
  164.    Specifies how many TRSG chunks (ie, songs) are contained within the FORM
  165.    TRKR.  There is no limit to the number of TRSG chunks that can exist,
  166.    although 256 of them should be a reasonable limit (or perhaps even less).
  167.    
  168.    ubyte numinsts
  169.  
  170.    Specifies how many TINS chunks (ie, instrument definitions) exist within
  171.    the FORM TRKR.  There can be up to 63 TINS chunks in a FORM TRKR, since
  172.    the note event has enough bits allocated to support that many instruments.
  173.    Instruments are shared by all songs in the FORM TRKR.
  174.  
  175.    uword numpatts
  176.  
  177.    Specifies the number of PATT chunks (ie, patterns, or note event arrays)
  178.    that exist within the FORM TRKR.  Like instruments, all patterns are
  179.    shared by all songs in the FORM.  There can be up to 65536 PATT chunks in
  180.    a single FORM TRKR.
  181.  
  182. ==============================
  183.  
  184. Optional "NAME", "AUTH", "ANNO", "(c) " chunks
  185.  
  186. These standard chunks are optional, and should appear immediately after
  187. the TRHD chunk in the FORM TRKR.
  188.  
  189. ==============================
  190.  
  191. TRSG chunk - Required
  192.  
  193. The TRSG chunk defines the parameters and patterns that comprise a single
  194. song.  There must be at least one TRSG chunk in the FORM TRKR, appearing
  195. immediately after the TRHD chunk and any of the optional chunks mentioned
  196. above (ie, "NAME", "AUTH", "ANNO", "(c) ").
  197.  
  198. This chunk is made up of several sub-chunks:
  199.  
  200.    SGHD chunk - Required song header chunk.
  201.  
  202.    This chunk contains parameters necessary for playing this particular song.
  203.    The fields are as follows:
  204.  
  205.       uword ticksperminute
  206.  
  207.       This field specifies the interrupt frequency of the player in "ticks"
  208.       per minute, where a "tick" refers to the occurrence of the player
  209.       interrupt (it is naturally assumed that the player interrupt will be
  210.       running as a CIA timer interrupt, and not a vertical blank interrupt).
  211.       This parameter, then, specifies the CIA interrupt frequency.  For
  212.       example, a value of 3600 ticks/minute (60Hz interrupt frequency), would
  213.       result in a CIA timer value of 42954540/3600 = 11932 (approx.) for NTSC
  214.       Amiga platforms and 42562740/3600 = 11823 for PAL Amiga platforms.
  215.       Defining interrupt frequency in this way eliminates timing differences
  216.       between NTSC- and PAL-composed songs.  The range for this parameter is
  217.       700-6000 inclusive.  Slower tempos than 700 can be achieved through
  218.       subdividing the interrupt (see tickspernote below).
  219.  
  220.       ubyte tickspernote
  221.  
  222.       This field is an interrupt subdivider, and corresponds directly to the
  223.       SET TEMPO command on Noisetracker and other formats.  This specifies
  224.       the number of "ticks" (interrupts) that must elapse after procesing a
  225.       note event before processing the next note event.
  226.  
  227.       ubyte iterations
  228.  
  229.       Specifies the default number of iterations to play thge song for.  A
  230.       value of 0 means to repeat the song endlessly.  This value can be
  231.       overridden by commands embedded in the note events (eg, a REPEAT
  232.       command at the end of the song with a repeat count of 0 (loop forever)
  233.       may cause the song to loop forever even though the iterations field
  234.       here says to play the song only once.
  235.  
  236.       ubyte numchannels
  237.  
  238.       This field indicates the number of audio channels this song uses.  It
  239.       must have a value of 1 or greater.  The value here also specifies the
  240.       number of CSEQ chunks (channel sequence arrays) that are defined in
  241.       this TRSG chunk.
  242.  
  243.       ubyte flags
  244.  
  245.       This flags field currently has no defined bits, but could have flags
  246.       indicating such things as fading the song out on the last iteration of
  247.       play (via reducing the global volume of the song), among other things.
  248.  
  249.       FIXED volume
  250.  
  251.       Specifies the global volume at which the piece is to be played.
  252.       Implementing this may require appropriately re-scaling the default
  253.       volumes of the intruments.  This means that it is rather important to
  254.       keep track of the original instrument default volumes in their
  255.       unit-value forms (ie, FIXED format, 0..1).
  256.  
  257.       char songname[]
  258.  
  259.       This is the title of this song.
  260.  
  261.  
  262.    CSEQ chunk - Required
  263.  
  264.    A CSEQ chunk is simply an array of pattern numbers to play for a given
  265.    audio channel. The first CSEQ chunk in a TRSG chunk corresponds to audio
  266.    channel #0, the next one corresponds to channel #1, etc.  The number of
  267.    CSEQ chunks in the TRSG chunk must match the number specified by the
  268.    "numchannels" parameter in the SGHD (song header) chunk.  These pattern
  269.    number arrays should be ordered such that the most important CSEQ's appear
  270.    first.  This is because future Amiga platforms will support more than the
  271.    current 4 audio channels.  FORM TRKR songs that take advantage of more
  272.    channels will still be able to be played on an older 4-channel platform,
  273.    with the extra CSEQ chunks being ignored.
  274.  
  275.    The CSEQ chunk's array consists of any number of word elements. Each
  276.    element refers to a pattern array (see PATT chunk below) to play for a
  277.    given audio channel.  Pattern numbers are derived from the order of PATT
  278.    chunks in the FORM TRKR (ie, the first PATT chunk in the file is pattern
  279.    #0, then next PATT chunk is pattern #1, etc).
  280.  
  281.    MRKR chunk - Optional
  282.  
  283.    The MRKR (ie, marker) chunk records a specific global position in the song.
  284.    It is used by any embedded song commands that cause a change in the
  285.    position of the song (eg, the REPEAT command).  These position-control
  286.    commands specify the new position in the song by referring to one of these
  287.    markers.  Since patterns can be any length at all, there is no gaurantee
  288.    that new patterns will start in all audio channels at the same time.
  289.    Rather, new patterns can start in any audio channel at any time.
  290.    Therefore, the MRKR chunks exist so that, prior to playing the song, a
  291.    player program can process each MRKR chunk and precalculate positions in
  292.    the song (since some markers may result in a position in the middle of an
  293.    arbitrary pattern).
  294.  
  295.    The fields of the MRKR chunk are as follows:
  296.  
  297.       ulong noteoffset
  298.  
  299.       This specifies where in the song the marker lies as an offset in note
  300.       events from the beginning of the song.  Calculating the exact position
  301.       of a marker involves examining (for each CSEQ chunk in the song) all
  302.       pattern numbers and the length in notes of those patterns.  It is then
  303.       necessary to calculate an offset into the corresponding CSEQ array, as
  304.       well as an offset into the pattern to the precise position of the
  305.       marker.  This must be done for each audio channel (each CSEQ chunk) that
  306.       will be used prior to playing a song.  This is a rather tedious thing to
  307.       be doing on-the-fly, so pre-calculating these offsets is much more
  308.       desirable.
  309.  
  310.       ubyte register
  311.  
  312.       This is the register number of the marker.  It is by this number that
  313.       all embedded song commands reference a given marker.  Each marker in a
  314.       TRSG chunk must have a unique register number, but they can be re-used
  315.       in successive TRSG chunks in the FORM TRKR if so desired.
  316.  
  317.       char  markername[]
  318.  
  319.       This is the name of the marker.  Some music editors may wish to allow
  320.       users to reference markers by name rather than number (which may get
  321.       somewhat confusing with multiple songs in memory).  It can be left out
  322.       if desired, since the name is only meaningful to an editor and not used
  323.       by a simple player program (a player program would reference markers by
  324.       their register number).
  325.  
  326. ==============================
  327.  
  328. TINS chunk - Required
  329.  
  330. The TINS chunk (Tracker INStrument) defines the nature and parameters of an
  331. instrument, and may optionally contain the actual instrument data (eg, it may
  332. optionally include a FORM 8SVX).
  333.  
  334. If the actual instrument data is not contained within the TINS chunk, then
  335. the IFF loader program will have to go to disk (or other medium) to acquire
  336. the instrument data.  I'm not sure if it's considered good form to embed a
  337. FORM 8SVX within a TINS chunk.  I suspect it's not, but I've done it anyway.
  338.  
  339. The TINS chunk contains the following required TIHD (Tracker Instrument
  340. HeaDer) chunk:
  341.  
  342.    TIHD chunk - Required
  343.  
  344.    This header chunk desribes the parameters of an instrument.  It contains
  345.    the following fields:
  346.  
  347.       ubyte register
  348.  
  349.       Contains the register number of this instrument.  Instruments are
  350.       referenced from within the song by this number, and so each
  351.       instrument's register number must be unique, and in the range 1..63
  352.       inclusive.
  353.  
  354.       ubyte type
  355.  
  356.       This specifies the type of the instrument (ie, the nature of the
  357.       instrument's data).  A type of 0 means that the instrument is an IFF
  358.       FORM 8SVX sample.  A type of 1 means that the instrument is a MIDI
  359.       instrument.  No extra values for the type field have been defined thus
  360.       far.  A type not understood by a player should cause the player to
  361.       either ignore all references to that instrument, or the player could
  362.       have default instruments prepared to replace those that are defined but
  363.       not understood.
  364.  
  365.       FIXED volume
  366.  
  367.       This is the default volume of this instrument in FIXED format (ie, a
  368.       "unit-value" fixed-point integer in the range 0..1).  It should be
  369.       scaled appropriately based on the global volume of any song that uses
  370.       it (eg, if global volume is 48, then this FIXED value represents a value
  371.       from 0..48, where unity is represented by 48).
  372.  
  373.       ubyte data1
  374.  
  375.       If the "type" field is 1, then this field contains the MIDI channel #
  376.       to be used for this intrument.
  377.  
  378.       ubyte data2
  379.  
  380.       If "type" = 1, then this field contains the MIDI preset # to be used
  381.       for this instrument.
  382.  
  383.       char  instname[]
  384.  
  385.       This is the name of the instrument.  If the instrument data itself (eg,
  386.       a FORM 8SVX) is not included in the TINS chunk, then this name field
  387.       can contain a filename to be used to search for the instrument data
  388.       elsewhere.  Editors and player programs should have the facility to
  389.       search various user-defined paths for such instruments.  No path should
  390.       *ever* be specified in the instname[] field. Only the filename of the
  391.       instrument data.
  392.  
  393.    
  394.    Optional instrument data chunk (eg, IFF 8SVX)
  395.  
  396.    Optionally, the actual instrument data chunk can appear here as part of the
  397.    TINS chunk.  The presence of instrument data can be determined by examining
  398.    the number of bytes in the TINS chunk less the size of the TIHD chunk
  399.    inside it (ie, the entire TIHD chunk, including ID field and size field).
  400.  
  401. My goals in creating this new IFF format have been:
  402.  
  403.    - To resolve timing conflicts between PAL and NTSC Amiga systems by
  404.      standardizing tempo and timing.
  405.  
  406.    - To redesign the note event format to allow greater flexibility and
  407.      expandability for future enhancements and extensions to the format.
  408.  
  409.    - To provide a specification for support of IFF 8SVX samples that contain
  410.      data for up to three octaves.
  411.  
  412.    - And finally, to try to combine the best features of many of the popular
  413.      module formats so that as many different formats as possible can be
  414.      converted to the new IFF tracker format.
  415.  
  416.  
  417.                        NOTE EVENT DESIGN AND LAYOUT
  418.                        ----------------------------
  419.  
  420.    I have redesigned the structure of a note event to allow for greater
  421. flexibility and expandability.  The note event no longer contains
  422. Amiga-specific period values to represent note pitch, but has been changed to
  423. a note number in the range 0..127.  This is to facilitate support for MIDI
  424. instruments in the future.  Standard tracker module period values map into
  425. this range as 1..36 inclusive (a note number of 0 means no note is to be
  426. played).  Players that support five-octave 8SVX instruments can extend the
  427. range of notes to 1..60 (five octaves).
  428.  
  429.    The note event allows specification of up to 63 different commands, with
  430. as many as 12 bits of operand available for each command.  Also, up to 63
  431. instruments can be specified.
  432.  
  433.    The note event is a longword value.  Its bits are allocated as follows:
  434.  
  435.                            High word of note event:
  436.               +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  437.       Bit #31 |n6|n5|n4|n3|n2|n1|n0|i5|i4|i3|i2|i1|i0|c5|c4|c3| Bit #16
  438.               +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  439.  
  440.                            Low word of note event:
  441.               +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  442.       Bit #15 |c2|c1|c0|oC|oB|oA|o9|o8|o7|o6|o5|o4|o3|o2|o1|o0| Bit #0
  443.               +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  444.  
  445. Bit descriptions of the note event:
  446.  
  447.  
  448. Bits n0-n7: Contains the note number to play, which is a value from 0..127
  449.             inclusive.  For simple, one octave 8SVX instruments, only values
  450.             from 1..36 are used (1..60 for 5-octave 8SVX insts, and the entire
  451.             range can be used for future MIDI support.  To determine the
  452.             octave at which to play the note (0, 1, or 2), simply subtract 1
  453.             and divide the result by 12.  The remainder of this division gives
  454.             you the note to play relative to this octave.  If the note number
  455.             field is 0, then no note is to be played.
  456.  
  457.             Notes are allocated as follows (for 1-octave 8SVX):
  458.  
  459.                                  Amiga
  460.             Octave    Note    Period value    
  461.  
  462.                0       C          856         
  463.                0       C#         808         
  464.                0       D          762         
  465.                0       D#         720         
  466.                0       E          678         
  467.                0       F          640         
  468.                0       F#         604         
  469.                0       G          570         
  470.                0       G#         538         
  471.                0       A          508         
  472.                0       A#         480         
  473.                0       B          453         
  474.                1       C          428         
  475.                1       C#         404         
  476.                1       D          381         
  477.                1       D#         360         
  478.                1       E          339         
  479.                1       F          320         
  480.                1       F#         302         
  481.                1       G          285         
  482.                1       G#         269         
  483.                1       A          254         
  484.                1       A#         240         
  485.                1       B          226         
  486.                2       C          214         
  487.                2       C#         202         
  488.                2       D          190         
  489.                2       D#         180         
  490.                2       E          170         
  491.                2       F          160         
  492.                2       F#         151         
  493.                2       G          143         
  494.                2       G#         135         
  495.                2       A          127         
  496.                2       A#         120         
  497.                2       B          113         
  498.  
  499. Bits i0-i5: Specifies a new instrument to use.  If this value is 0, then no new
  500.             instrument is to be selected.  Otherwise, it is an instrument
  501.             register number from 1..63 inclusive (instrument register numbers
  502.             start at 1, not 0) that specifies a new instrument to be selected.
  503.             Note that the new instrument is not to be actually played at this
  504.             time unless a note number has been specified, or if an included
  505.             command says otherwise.
  506.  
  507. Bits c0-c5: Specifies a command to be executed.  A value of 0 means no command
  508.             is to be executed.  A value of 1..63 specifies a command to be
  509.             executed (commands themselves are discussed further on).
  510.  
  511. Bits o0-oC: This is the operand field used by the various commands supported
  512.             by FORM "TRKR".  Although this is a thirteen-bit field, some
  513.             commands may not use the entire twelve bits for their operand.
  514.             Also, other commands may partition the field if they require more
  515.             than a single input operand.  Typically, signed operands use only
  516.             the lowest eight bits of the operand field, since it's a bit (pun
  517.             not intended) of a pain to have to sign-extend a thirteen-bit
  518.             field.
  519.  
  520.  
  521.                  Command Specification for IFF FORM "TRKR"
  522.                  -----------------------------------------
  523.  
  524.    As a result of certain features of this file format, certain commands from
  525. tracker-style module file formats have become obsolete.  For example, the
  526. "Pattern Break" command is no longer needed, as patterns can be any length at
  527. all.  "Pattern Break" was required in tracker-style formats because patterns
  528. were always 64 note events long.  If composing a song in 3/4 time (typically
  529. using only the first 48 notes in a pattern) then the "Pattern Break" was
  530. required to skip past the remaining unused note events in the 64-note pattern.
  531.  
  532.    In order to fully describe the function of each command, it is necessary to
  533. break down the commands into categories.
  534.  
  535.    First of all, a "tick" refers to the occurrence of the player interrupt.
  536. The player interrupt occurs on every tick, but it only processes the next note
  537. event in the current pattern on every nth tick (where n is determined by the
  538. current "ticks per note" setting).
  539.  
  540.    The "tick" that occurs in which a new note event is fetched shall
  541. henceforth be referred to as the "note tick".
  542.  
  543.    Some commands are simply processed once on the note tick (ie, as soon as
  544. they are fetched).  A good example would be the "Set Channel Volume" command,
  545. which modifies the current volume of an audio channel immediately.  The
  546. command is then finished.
  547.  
  548.    Other commands stay active for longer periods of time.  For example, the
  549. "Arpeggio" command must play three notes cyclicly in an audio channel.  It
  550. starts playing these notes on the note tick that the command was found, and
  551. plays a different note (of the three notes) on *every* tick after that, until
  552. the next note tick.
  553.  
  554.    I will do my best to explain how each command works in detail in this
  555. section, including possible suggestions for implementation in a player
  556. program.
  557.  
  558.    First, a summary of the commands with a brief description of each, along
  559. with each command's number:
  560.  
  561.                                Command Summary
  562.  
  563. Cmd #   Name                    Description
  564.  
  565.   0   No Command                No command.
  566.   1   Arpeggio                  Play a three-note arpeggio.
  567.   2   Pitch Bend                Raise/lower current note pitch on every tick.
  568.   3   One-Time Pitch Bend       Raise/lower pitch by specified amount once only.
  569.   4   Portamento                Slide from cur. pitch up/down to specified note.
  570.   5   Vibrato                   Apply vibrato on current note.
  571.   6   Portamento+Volume Bend    Slide from cur. note to new note with volume bend.
  572.   7   Vibrato+Volume Bend       Apply vibrato to current note with volume bend.
  573.   8   Tremolo                   Apply tremolo to current note.
  574.   9   Set Sample Offset         Set data start offset for current instrument.
  575.  10   Volume Bend               Bend current channel volume up or down.
  576.  11   One-Time Volume Bend Up   Increase volume by specified amount.
  577.  12   One-Time Volume Bend Down Decrease volume by specified amount.
  578.  13   Set Volume                Set this channel's volume to a specified value.
  579.  14   Set Filter                Turn low-pass filter on/off.
  580.  15   Set Ticks Per Note        Set new ticks/note (aka "Tempo").
  581.  16   Set Ticks Per Minute      Set ticks/minute (range 700-6000, 3000 = 50Hz).
  582.  17   Restart Note              Restart note n ticks from now.
  583.  18   Delay Note                Delay playing this note for n ticks.
  584.  19   Cut-off Note              Cut off current note n ticks from now.
  585.  20   Pause                     Suspend play at this position for n note events.
  586.  21   Repeat                    Repeat from specified marker n times.
  587.  22   Glissando Control         Turn Glissando on/off for this channel.
  588.  23   Set Vibrato Waveform      Select vibrato waveform type.
  589.  24   Set Tremolo Waveform      Select tremolo waveform type.
  590.  
  591.  
  592.     I must thank you for taking the time to review what I have come up with so
  593. far.  I would greatly appreciate your opinion on the various design issues and
  594. solutions I have raised throughout this document.
  595.  
  596.     This is the IFF FORM "TRKR" documentation as it stands at the moment.  The
  597. next draft of this proposal will include detailed specs on each note-event
  598. command, as well as a section concerning memory representation of an IFF TRKR
  599. file.
  600.  
  601.  
  602.    Darren Schebek
  603.    Full Tilt Entertainment
  604.  
  605.    5620 Sherwood Blvd.
  606.    Delta, B.C.
  607.    CANADA
  608.    V4L-2C5
  609.  
  610.    usenet: dschebek@outb.wimsey.bc.ca
  611.