Noise in F Minor Six

The original Game Boy has four sound channels: two pulse, one wave and one noise. Hackaday this week covered Drum Machina Go!, a new 16-step sequencer for them. The noise channel is meant for drums, but flip one bit and it starts to play notes. Only four of them, it turns out.

The register that makes the noise

Pan Docs, the community reference for the hardware, describes channel 4 as a 15-bit shift register. On each tick, bit 15 gets 1 if bits 0 and 1 are equal, and 0 if not. In "short" mode that bit is copied into bit 7 too. Then everything shifts right, and bit 0 is the sound: either silence or the current volume. A trigger resets the register to all zeros.

Run it and the register comes back to where it started after 32,767 ticks in 15-bit mode, which is every non-locked state. In short mode the low 7 bits cycle every 127 ticks. A pattern that repeats 127 ticks apart is no longer noise. It is a tone, and its pitch is the tick rate divided by 127.

Every setting, by ear

The tick rate is set by register NR43: 262,144 Hz ÷ (divider × 2shift), where divider code 0 counts as ½. In short mode that tick rate divided by 127 is a pitch, shown below with the nearest note and how far off it is in cents. Click any cell to hear it with a decaying envelope.

Envelope: start at 15, step down every /64 s

The divider codes 0 to 7 mean ½, 1, 2, …, 7. Shifts 14 and 15 stop the clock, so they are left out. Faint cells are below 20 Hz or out of reach of your ears.

Why only four notes

The pitch is 218 ÷ (127 × divider × 2shift). The power of two only changes the octave. So the note name depends on nothing but the odd part of the divider, and that can only be 1, 3, 5 or 7:

Of the 46 short-mode settings you can hear, there are just 23 different pitches, in four pitch classes: C, D, F and A♭. Together that is an F minor sixth chord, or D half-diminished seventh, depending on which note you call home. Every Game Boy song that plays a melody on the noise channel is choosing from these.

294.9, 344.0, 412.8 and 516.0 Hz: dividers 7, 6, 5 and 4, shift 0

A beat from one channel

The real channel plays one sound at a time. This sequencer cheats by mixing rows, but every row is a real channel 4 setting.

120 BPM, 16 steps; click squares to change

What stands on what

ItemSource
Register rule, short mode, reset on trigger, lock-upPan Docs, Audio details (gbdev.io/pandocs/Audio_details.html)
Clock formula, divider 0 = ½, shifts 14–15 stop, envelope at 64 HzPan Docs, Audio registers, NR43 and NR12
Four channels; Drum Machina Go!Hackaday, 1 October 2026
Periods 127 and 32,767; the pitch table; the four classesMy simulation of the rule above (in this page, and separately in Python), and arithmetic
The sound you hearRendered in your browser from the register, box-filtered to your sample rate. It ignores the Game Boy's DAC and output filter, so it is close, not exact.

← back to the night