GTR

Introduction

These are compiled modules of Global Tracker, the project author is Maxim Krassa (Doctor Max). The main idea of the project is maximum convenience and performance with a minimum of functions. As a result, the format turned out to be close in capabilities to PT1.

It was not widely recognized, since version 1.0 contained significant errors. They were later fixed in version 1.1.

The bulk of the GTR modules that fell into my hands turned out to be conversions of other formats. There are only two original modules in my collection and they are written in GTR v1.0 (one by Nik-O, the other by Trefi).

Module format

The GTR format can be called traditional.

OffsetSizeDesignationDescription
+01DelayPlayback speed.
+13IDIdentifier "GTR".
+41VersionVersion in BCD (0x10 for 1.0, 0x11 for 1.1).
+52AddressCompilation address.
+732NameThe song name.
+3930SamPtrsPointers to 15 samples.
+6932OrnPtrsPointers to 16 ornaments.
+101192PatPtrsThree pointers to channels A, B, C per each of 32 patterns.
+2931NumOfPossThe length of the positions list.
+2941LoopPosPosition number for looping.
+295NumOfPossPositionsPositions list in the playing order (pattern numbers multiplied by 6, one after the other).
+PatPtrs[]?PatChnsThe pattern channel descriptors (described below).
+SamPtrs[]?SamplesSamples (described below).
+OrnPtrs[]?OrnamentsOrnaments (described below).

Pattern channel descriptor

It is a string of bytes ending with 0xFF.

БайтОписание
0x00..0x5FSet the note. Exit.
0x60..$6FSet the sample (0..14).
0x70..$7FSet the ornament (0..15). For versions after 1.0: disable envelopes.
0x80..$BFSkip the specified number of lines (0..63). Valid once.
0xC0..$CF, EnvSet the envelope type (0..15). Set low byte of the envelope period to Env. Enable envelopes.
0xD0..$DFExit.
0xE0Turn off the sound. For versions after 1.0: exit.
0xE1..$EFSet volume (1..15).

Sample

It consists of two header bytes and a list of ticks.

OffsetDescription
+0Tick for looping.
+1Number of ticks.
+2Sample ticks one after the other, 4 bytes per tick. Tick structure:
+0 Amplitude.
+1 Bit 7: 1 to enable envelopes. Bit 6: noise mask. Bit 5: tone mask. Bits 4-0: noise (mixed with other channels by the "OR" logical operation).
+2 Two-byte tone deviation (signed number).

Ornament

It also represents two header bytes and a list of ticks.

OffsetDescription
+0Tick for looping.
+1Number of ticks.
+2Ticks of the ornament one after another (tone deviations in semitones), 1 byte per tick (a signed number).

Channel volume

Global Tracker refers to one of the four trackers on the ZX Spectrum (PSM, STP, SQT and GTR) with the most rational channel volume control: taking into account the fact that the DAC output characteristic for both AY and YM is close to logarithmic, the value (15-volume) is simply subtracted from the sample amplitude.