Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- MOD File Format - <b>pattern details</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Pattern Details

 (Offset 1168)

 This is the section where the actual details of each pattern used in the
 sequence above are defined. The data for pattern zero will come first,
 followed by pattern 1, etc. Each pattern consists of 1K of data - 64 time
 intervals, 4 notes played simultaneously at each time interval, 4 bytes for
 each note, therefore 64 x 4 x 4 = 1024 bytes = 1K.

 Each note has the following format:

 Byte Number       1         2         3         4
 Bit Number     76543210  76543210  76543210  76543210
                ||||||||  ||||||||  ||||||||  ||||||||
    +--------------+||||  ||||||||  ||||+----++------------------+
    ||||      +--------+  |||||+----||||--+  +-----+      ||||||||
    ||||      ||||        |||||     |||||||     ||||      ||||||||
   Octave     Note      Instrument   Volume    Command    Parameter

 Octave
   This is just a number in the range 0 to 9 inclusive. 0 specifies the
   lowest octave, and 9 the highest.

 Note
   This specifies which note in the octave is to be played. It can have
   the following values:

   +-----------------------------------------------------------------------+
   | Value     | 0  | 1  | 2  | 3  | 4  | 5  | 6  | 7  | 8  | 9  | 10 | 11 |
   |-----------+----+----+----+----+----+----+----+----+----+----+----+----|
   | Note name | C  | C# | D  | D# | E  | F  | F# | G  | G# | A  | A# | B  |
   +-----------------------------------------------------------------------+

 Instrument
   This is just a number in the range 0 to 30 corresponding to one of the
   31 instruments described in the "Sample Details" section.

 Volume
   This is the volume at which the sample will be played. If it is above
   the maximum volume (specified in the "Description Header"), it will be
   ignored.

 Command
   This is a number that specifies a certain effect or command. The
   parameter field holds any extra information needed by this command.

   +-----------------------------------------------------------------------+
   | Number | Description                                                  |
   |--------+--------------------------------------------------------------|
   |   0    | Nothing.                                                     |
   |--------+--------------------------------------------------------------|
   |   1    | Set Speed                                                    |
   |        | This effect is used to set speed of the music to the value   |
   |        | in the parameter byte.                                       |
   |--------+--------------------------------------------------------------|
   |   2    | Jump                                                         |
   |        | This effect causes the pattern currently being played to     |
   |        | terminate. The module then continues playing from the        |
   |        | beginning of the pattern at the position in the sequence     |
   |        | specified by the parameter byte. The first position in the   |
   |        | sequence is 00.                                              |
   |--------+--------------------------------------------------------------|
   |   3    | Break                                                        |
   |        | This effect causes the pattern currently being played to     |
   |        | terminate. The module then continues playing from the        |
   |        | beginning of the next pattern in the sequence.               |
   |--------+--------------------------------------------------------------|
   |   4    | Volume Slide                                                 |
   |        | This effect causes the volume to slide up OR down. The       |
   |        | first nibble of the parameter byte specifies the speed at    |
   |        | which the volume is raised; the second nibble specifies the  |
   |        | speed at which the volume is lowered (you can't do both      |
   |        | though). The higher the values, the faster the change in     |
   |        | volume.                                                      |
   |--------+--------------------------------------------------------------|
   |   5    | Portamento Up                                                |
   |        | This effect is used to bend the pitch of the note upwards.   |
   |        | The parameter byte specifies the speed at which this         |
   |        | bending takes place. The higher the value, the faster.       |
   |--------+--------------------------------------------------------------|
   |   6    | Portamento Down                                              |
   |        | This effect is used to bend the pitch of the note downwards. |
   |        | The parameter byte specifies the speed at which this         |
   |        | bending takes place. The higher the value, the faster.       |
   |--------+--------------------------------------------------------------|
   |   7    | Tone Portamento                                              |
   |        | This effect is used to bend the pitch of the note most       |
   |        | recently played towards the pitch of the current note. The   |
   |        | parameter byte specifies the speed at which this bending     |
   |        | takes place.                                                 |
   |--------+--------------------------------------------------------------|
   |   8    | Vibrato                                                      |
   |        | This causes a vibrato effect. The first parameter nibble     |
   |        | specifies the speed of the vibrato; the second nibble        |
   |        | specifies the depth. The higher the values, the faster or    |
   |        | deeper the vibrato.                                          |
   |--------+--------------------------------------------------------------|
   |   9    | Tremor                                                       |
   |        | This causes a tremor effect. The first parameter nibble      |
   |        | specifies the amount of time on, and the second nibble       |
   |        | specifies the amount of time off.                            |
   |--------+--------------------------------------------------------------|
   |  10    | Arpeggiation                                                 |
   |        | This effect cycles the note through three frequencies: the   |
   |        | note's actual frequency, the actual frequency + the number   |
   |        | of semitones specified by the first parameter nibble and     |
   |        | the actual frequency + the number of semitones specified by  |
   |        | the second nibble.                                           |
   +-----------------------------------------------------------------------+

See Also: Pattern Sequence Sample Details Description Header

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson