# Make Game Boy Sound Effects in Your Browser

> The Game Boy's four sound channels, playable in your browser, plus the register values and a GBDK snippet for the sound you made.

- Author: Tech Tina
- Date: 2026-11-15
- Category: tech

Press A in almost any Game Boy game and the console answers with a blip. Jump and you get a chirp. Die and something rattles down a scale. None of those sounds is recorded. Every one of them is generated on the fly by four small sound circuits that have been inside the handheld since 1989.

We've built a toy that lets you play all four of them in your browser. [The Game Boy sound toy](/tools/gameboy-sound) gives you the knobs and the waveforms, and when you land on a sound you like, it hands you the register values and a GBDK snippet so you can put it in a game.

# Four Voices and Nothing Else

The Game Boy has no samples. There's no wavetable hiding a piano, no streaming audio, no clever compression trick. It has four channels and one speaker, and every sound you remember is those four voices arranged carefully by somebody who knew what they were doing.

The first two are pulse channels: a wave that is either all the way up or all the way down, with a duty setting that decides how much of each cycle it spends up. A square wave is a duty of 50 per cent and sounds hollow and full. Squeeze the duty down to 12.5 per cent and the same pitch turns thin and reedy, a flute instead of a bassoon. It's a single setting and it changes the whole character of a melody, which is why the good composers of the era guarded their duty choices like a trade secret.

# The Sweep Is Where the Drama Lives

The first pulse channel has something the second doesn't: a sweep unit. Set it going and the channel keeps adding a fraction of its own pitch value to itself, over and over, more than a hundred times a second.

Add enough and the number runs out of room, the channel shuts itself off, and you get the rising zap of a power-up that vanishes into nothing. Subtract instead and the pitch falls away, which is a laser, or a fall into a pit, depending on how fast you set it.

It is one trick in two directions, and it explains why so much Game Boy audio sounds like it belongs to the same family. That's not a shortage of imagination. That's the hardware.

# Channel 3 Draws a Line

The third channel is the odd one out. Instead of a duty cycle it plays a waveform you draw yourself: 32 samples, each one of 16 levels, looped forever at whatever pitch you ask for. You can draw a sine, a triangle, something with a wobble in it, something that isn't really a wave at all.

It has no envelope and only four volume settings, which is why you rarely hear it carrying a melody. What it does better than anything else is bass. Given the same pitch value it sounds an octave below a pulse channel, and that low, slightly gritty hum underneath a tune is the sound of a Game Boy doing bass.

# Channel 4 Is a Trick

The fourth channel makes noise, and it does it without a noise generator. It's a shift register: a row of fifteen bits that shuffles itself along on every clock tick, feeding the last bit out and folding a new one in based on the first two. Run it fast and it hisses. Run it slowly and it rumbles, which is how a Game Boy does an explosion.

The clever part is that it isn't really random. The pattern is 32,767 steps long before it repeats, and at the speeds games use it, that's long enough. Chop it down to seven bits and the pattern gets short enough to hear, and the hiss turns into that metallic buzz that sounds like a robot with a cold. Both settings are here, and the difference is startling.

# The Part That Actually Matters

A toy that makes noises is nice for an afternoon. A tool that makes noises you can compile is worth bookmarking.

So underneath the waveform displays sits a register table and a GBDK snippet. Every Game Boy sound is just a handful of bytes written to addresses from `$FF10` upwards: the pitch in two registers, the volume and envelope in another, the duty cycle in a third. The toy works them out as you turn the dials and writes the C for you, with the trigger write at the end where it has to be.

If you've ever spent an evening poking hex values into an emulator trying to find the setting that sounds like a menu cursor, this is the part that saves you the evening.

# How a Browser Makes It

There's no emulator behind this. The sound comes from the browser's own audio engine, which means everything had to be rebuilt from the numbers.

The pulse channels use a band-limited wave built from the maths of a pulse, so the high harmonics that would otherwise turn into a whine above the speaker's range simply aren't there. The sweep is the same arithmetic the hardware does, scheduled as a series of pitch changes. The wave channel loops a buffer of the 32 samples you drew. The noise channel loops one full turn of the shift register, all 32,767 steps of it, at a speed that makes it the right pitch.

The volumes step on the hardware's own clock: envelopes at 64 ticks a second, sweep at 128. Set a volume envelope to fade and the toy fades it at the same rate a real Game Boy would.

# Where It Cheats

It's an approximation, and we'd rather say so than have you find out later.

The pitches, the timing and the noise pattern follow the hardware. The analogue warmth of a real speaker, and the way a Game Boy's output amp clips when everything plays at once, do not. The toy also plays one channel at a time, where a game has all four running together and the sound you hear is the mix.

And the fastest noise settings change faster than a browser can play a sample, so they come out rougher than they would on a cartridge. The register values are exact. Trust those over your ears.

# We Tested It on Hardware, Sort Of

Every snippet the toy produces was run through the real GBDK compiler and booted in an emulator, then measured rather than merely heard.

The steady tones came out where the maths said they would: an A4 at 1046 Hz against a theoretical 1049, and the wave channel's low note at 65.2 Hz against 65.4. The upward-sweeping preset ran itself off the top of its range and cut the channel, exactly as an overflowing sweep should. The wave channel only makes a tone at all if its 16 bytes of waveform actually arrived in memory, so that one is proving two things at once.

Not an emulator, then, and not a substitute for one. But close enough to sketch with, and honest about the difference.

# Go and Make a Noise

Most people meet the Game Boy's sound the way they meet most of its hardware: through a game that already used it beautifully, years after the fact. It's a nice feeling to reach in and turn the same dials yourself, to find out that the laser was a sweep and the explosion was a shift register and the whole thing fits in a handful of bytes.

[Go and play with it](/tools/gameboy-sound). If you make something good, it'll be in a game before you know it.
