A module holds no timeline and no recorded mix. A player builds the sound as it goes: it steps through the positions of the order table, plays each pattern’s rows one after another, and on every tick updates the four voices. The rules below are ProTracker 2.3D’s, which is what most modules were written for.
Timing
Time is counted in ticks. A row lasts speed ticks, 6 at the start of
every song, and the length of a tick comes from the tempo, 125 at the
start. Both are changed with the Fxx
effect: 1 to 31 sets the speed, 32 to 255 the tempo.
ProTracker counts ticks with the Amiga’s CIA timer, which runs at 709,379 Hz on a PAL Amiga. For a tempo of bpm it sets the timer to 1,773,447 / bpm counts, so
tick = (1,773,447 / bpm) / 709,379 seconds (about 2.5 / bpm)
row = speed × tick
| Tempo | Speed | Tick | Row | Pattern of 64 rows |
|---|---|---|---|---|
| 125 | 6 | 20 ms | 0.12 s | 7.68 s |
| 125 | 3 | 20 ms | 0.06 s | 3.84 s |
| 150 | 6 | 16.7 ms | 0.10 s | 6.4 s |
At the defaults that is 50 ticks a second, the rate of a PAL screen. Players that count ticks on the screen’s vertical blank instead of the CIA timer get 50 ticks a second on a PAL Amiga and 60 on an NTSC one, so they play a module faster on an NTSC machine, and cannot follow a tempo change.
What happens on a tick
- On tick 0 of a row, each channel reads its cell. A sample number loads that sample’s volume, finetune and loop; a note looks up its period and restarts the sample, unless the effect is a tone portamento or a note delay; and the effects that act on tick 0 run.
- The voices that were given a new note start, and their loop is set ready to take over at the end of what they play first.
- On ticks 1 to speed − 1, the effects that act on ticks run: slides, vibrato, arpeggio, retrigger, note cut, note delay.
- After the last tick the next row starts, or the row is held again by a pattern delay (EEx).
Song flow
Positions are played in order, from 0 to song length − 1, each playing the pattern the order table names from its first row. The next position starts at the end of the pattern, or after a row with a pattern break (Dxy, which also chooses the row to start at) or a position jump (Bxx, which chooses the position). A pattern loop (E6x) repeats rows within a pattern.
After the last position ProTracker goes back to position 0 and plays on; NoiseTracker goes back to its restart position. Most players stop at the end of the order list instead, or when a jump would play again what has already been played. F00 stops the song. In the files examined for this site, most play to the end of the order list, several end with a jump back to an earlier position, and a few stop with F00.
The Amiga’s voices
Paula, the Amiga’s sound chip, has four voices, one for each channel of the module. Each voice reads sample bytes from memory by DMA, holding each byte for the number of colour clock cycles the period gives, and has two registers: where to read from and how many words. Starting a voice latches the two registers; while the voice plays, ProTracker writes the loop into them, and the voice loads them again each time it reaches the end of what it latched. That is how the loop rules come about:
- The first pass plays from the start of the sample, for its length, or to the end of the loop when the loop start is not 0.
- Every pass after that plays the loop.
- With a loop length of 1, the “loop” is the sample’s first two bytes, played over and over. They are 0 by convention, so the voice is silent.
A sample number given without a note works through the same registers: the volume changes at once, the new sample’s loop goes into the registers, and it takes over when the sample that is playing reaches its end.
Stereo
Paula sends channels 1 and 4 to the left output and channels 2 and 3 to the right, with no panning in between. Amiga modules are written for that hard separation. Many players on other computers mix part of each side into the other, which is softer on headphones.
The Amiga also filters its output: a fixed low-pass filter on the A500, and a second one that E0x switches, called the LED filter because the power light dims with it.
In the explorer
The explorer’s player follows ProTracker 2.3D’s replay routine step by step, as the ProTracker 2 clone reproduces it, with its quirks (see Effects). It models the voices as Paula’s, holding each sample byte for its period and averaging over each output sample, and pans the channels hard left and right in the Amiga’s order. It plays the song once, to the end of the order list, a jump back, or F00, at 44.1 kHz, or at a lower rate for a very long song. It does not model the Amiga’s filters, E8x or NTSC timing.