Pan Docs — Audio Overview

author gbdev community (Pan Docs)
date 2025-06-30
article Audio → Audio Overview (page 1 of 3 of the audio section; file last changed 2025-06-30, fetched 2026-08-30)
created 2026-08-30 · updated 2026-08-30

The opening page of the audio section of pan-docs, the community Game Boy hardware reference (CC0). It names the four channels of the game-boy-apu, the VIN cartridge input and the shared concepts — triggering, envelope, length timer, period values — and warns that it "papers over bugs & quirks", which are left to the details page (s-pandocs-audio-details); the register map is s-pandocs-audio-registers.

Key claims#

  • "8-bit" audio "does not refer to the bit depth of the sound generated, but rather that it has sound capabilities typical of 8-bit consoles"; the sound comes from "simple digital circuits".
  • Four channels CH1–CH4, each specialised — "unlike some other sound chips, such as the C64's SID or the Atari 5200's POKEY". CH1 and CH2, the pulse channels, produce pulse waves "with 4 fixed pulse width settings"; CH3, the wave channel, "arbitrary user-supplied waves"; CH4 pseudo-random noise. Components per channel: CH1 sweep + period counter + duty + length timer + envelope; CH2 the same without sweep; CH3 period counter + wave + length timer + volume; CH4 period counter + LFSR + length timer + envelope.
  • The channel signals are mixed into a left and a right signal, amplified separately and sent to the headphone jack or the speaker — which "merges back the two channels, losing the stereo aspect entirely".
  • VIN is an analog signal from the cartridge, a possible fifth channel: "No licensed games used this feature, and it was omitted from the Game Boy Advance." Pocket Music does not use it either; it refuses to run on the GBA because of buzzing from wave-channel sample playback.
  • The APU runs off the same master clock as CPU and PPU; on the SGB1 it runs "about 2.4% faster … sounding slightly higher-pitched", corrected on the SGB2. APU tick lengths are unaffected by CGB double-speed mode.
  • All interfaces use durations, not frequencies ("a '256 Hz tick' means '1 ∕ 256th of a second'"); the period registers hold what amount to negative periods.
  • Triggering turns a channel on (if its DAC is on) and restarts its wave from the beginning — "except for pulse channels, whose phase position is only ever reset by turning the APU off. This is usually not noticeable unless changing the duty cycle mid-note." Most parameter changes take effect immediately, some need a retrigger.
  • Volume: a master volume with separate left and right settings, plus per-channel volume ("CH3's less precisely than the others"). The envelope of CH1, CH2 and CH4 sets initial volume, direction "(but not its slope)" and duration: "all envelopes are ticked at 64 Hz, and every 1–7 of those ticks, the volume will be increased or decreased."
  • Length timer: every channel can switch itself off; the timer ticks at 256 Hz (tied to DIV-APU) from the written value and stops the channel at 64 (CH1, CH2, CH4) or 256 (CH3). Internally it counts down from the inverted value.
  • Pitch is dropped from the text as merely the perception of frequency.

Practical takeaways#

Two pulse channels with four timbres each, one wave channel, one noise channel and a master-volume-plus-panning stage: that is the whole palette, so everything expressive in lsdj — multi-stage envelopes, duty "sweeps", vibrato, tables — is software rewriting a handful of registers every tick. Lengths are in 1/256 s, envelope steps in 1/64 s. A Super Game Boy 1 plays sharp.

Notable quotes#

"Unlike some other sound chips, such as the C64's SID or the Atari 5200's POKEY, each sound channel is specialized in a way largely different from the other channels."

Relevance#

Gives game-boy-apu its architecture section and confirms the channel descriptions that so far came only from the LSDj manual (s-lsdj-manual).

Pages touched#

game-boy-apu · game-boy · pan-docs · chiptune · stereo-panning · adsr-envelope · pulse-width-modulation · lsdj

source file wiki/summaries/s-pandocs-audio-overview.md · graph