Tracker 4.42

## 8.8: The Amiga audio hardware

Since part of the behavior of soundtracker-like programs depends heavily on the Amiga audio hardware, it is only suitable that there be a description of this hardware here.[1]

The Amiga has four completely independant audio channels, numbered from 0 to 3. Channel 0 and 3 are connected to the left-side stereo output, 1 and 2 to the right-side---hence the strange numbering in soundtracker programs.

Sound data is 8 bit signed in standard 2 complement (-128<=v<=127).

The volume is also set independently from 0 to 64 (0<=v<=64). There is no typo there! In terms of the hardware, the 64 value means that the hardware dampening is disconnected.

The volume is linear. Sample values as follows:

      Volume   db
      ---------------
      64         0
      48       - 2.5
      32       - 6.0
      16       -12.0

The sampling period is limited by the number of dma cycles allocated to an audio channel, and traditionally linked to the video frequency. The formulas are of little interest. The result is used in notes.c for instance.

The Amiga features a low-pass filter that can be disconnected through software. The filter becomes active around 4KHz and gradually begins to attenuate the signal. Generally, you cannot hear frequencies higher than 7KHz. Most soundtrackers disable the low-pass filter, and use it only for special effects.

Finally, tracker is also tied to the Amiga display hardware, oddly enough. Older versions of soundtracker used the video `VBLANK` interrupt for timing, hence soundtracker is based upon 50 Hz ticks. This also explains why some older files sound better when played with 60 Hz ticks (NTSC instead of PAL).

[1] A more precise description can be found in the Amiga Rom Kernel Manual: Hardware, published by Addison Westley