SNES Audio
Sound on the SNES runs on a whole separate computer. A Sony SPC700 CPU and its S-DSP sound chip sit behind their own 64KB of audio RAM, playing eight voices of compressed samples with envelopes and echo. The main CPU only uploads the music and samples, then talks to it through four I/O ports.
- Overview
- The eight voices
- BRR samples
- ADSR and volume
- Echo and filter
- Communication ports
- Sequencer commands
- Sampled audio
Overview
The audio subsystem is the SPC700 processor, the S-DSP that actually generates sound, and 64KB of private audio RAM they share. Everything to be played, the samples, the note data and a small driver program, is uploaded once into that RAM by the main CPU. From then on the SPC700 runs the driver and the S-DSP mixes eight voices to a 16-bit stereo output, independent of the game.
| Part | Role |
|---|---|
| SPC700 | Dedicated 8-bit sound CPU running the music driver. |
| S-DSP | Digital signal processor mixing the eight voices. |
| Audio RAM | 64 KB private memory for samples, driver and echo. |
| Output | 16-bit stereo, sample rate 32 kHz. |
The eight voices
The S-DSP has eight independent voices, numbered 0 to 7. Each plays a sample at its own pitch and volume, with its own envelope, and can be panned left and right by separate volume registers. Each voice has a block of DSP registers controlling it, so eight voices means eight parallel sounds, enough for a melody, harmony, bass, drums and effects at once.
| Per-voice register | Meaning |
|---|---|
| VOL L, VOL R | Left and right volume, giving pan. |
| PITCH L, PITCH H | 14-bit pitch, the sample playback rate. |
| SRCN | Source number, index into the sample directory. |
| ADSR, GAIN | Envelope control. |
BRR samples
Samples are stored compressed in a format called BRR, bit rate reduction. Audio is cut into blocks of 9 bytes: a one-byte header followed by 8 bytes that hold 16 four-bit samples. The header carries a shift amount and a filter selection that predicts each sample from the previous ones, plus flags marking the end of the sample and whether it loops.
| BRR block | Bytes | Contents |
|---|---|---|
| Header | 1 | Shift (4 bits), filter (2 bits), loop and end flags. |
| Data | 8 | 16 samples of 4 bits each. |
A sample directory in audio RAM lists, for each source number, the start address of its BRR data and the address of its loop point, so a voice can play through a sound then repeat from a chosen block for a sustained note.
ADSR and volume
Every voice shapes its volume over time with an ADSR envelope: attack rises from silence, decay falls to a sustain level, sustain holds while the note is on, and release fades when the note ends. A voice can instead be driven by GAIN, a manual mode that ramps or sets the level directly for finer control. The final voice level is the envelope multiplied by the two volume registers.
| Stage | Effect |
|---|---|
| Attack | Rise from zero at a chosen rate. |
| Decay | Fall to the sustain level. |
| Sustain | Hold at the sustain level while keyed on. |
| Release | Fade to zero when keyed off. |
Echo and filter
The S-DSP has a hardware echo unit. It keeps a delay buffer in audio RAM and feeds a mix of the delayed signal back into the output, set by an echo volume and a feedback amount. An 8-tap FIR filter sits in the echo path, so the reflected sound can be shaped, softened or brightened, giving reverb and space to the music. Because the echo buffer lives in the same 64KB, longer echoes cost sample memory.
| Echo control | Meaning |
|---|---|
| EON | Which voices are sent into the echo. |
| EVOL L, EVOL R | Echo output volume, per side. |
| EFB | Feedback, how much echo re-enters the buffer. |
| FIR C0–C7 | Eight coefficients of the echo filter. |
Communication ports
The main CPU and the SPC700 meet at four 8-bit I/O ports, visible to both sides. At power-on the SPC700 runs a small boot ROM that lets the main CPU upload the driver and samples into audio RAM through these ports using a simple handshake. During play the game passes commands, such as start this tune or play this effect, by writing the ports, and the driver reads them.
| Ports | Role |
|---|---|
| APUIO0–APUIO3 | Four shared bytes, read and written from both CPUs. |
| Upload | Boot ROM handshake to load audio RAM at start-up. |
| Commands | Runtime messages telling the driver what to play. |
Sequencer commands
The native operations a sequence drives on the S-DSP, and whether each runs on its own once set or must be updated every tick. The SPC700 runs its own driver and the S-DSP holds every voice, so the main CPU only sends high-level commands; the driver does any per-tick work such as slides.
| Command | What it does | Automatic or driven |
|---|---|---|
| Note / pitch | 14-bit rate per voice | Automatic |
| Sample select | Source number into the sample directory | Automatic |
| ADSR / GAIN | Per-voice envelope | Automatic |
| Volume / pan | Per-voice left and right level | Automatic |
| Noise | Per-voice noise enable | Automatic |
| Pitch modulation | A voice modulates the next (PMON) | Automatic |
| Echo | Delay with an 8-tap FIR filter | Automatic |
Sampled audio
On the SNES sampled audio is not a trick but the native mode: every voice plays samples. Any recorded sound, a spoken word, a drum or a whole instrument, is encoded into BRR blocks, listed in the sample directory in audio RAM, and assigned to one of the eight voices by its source number. The voice's 14-bit pitch sets the replay rate, so one recording covers many notes, and a loop point in the BRR data sustains a held note. The S-DSP mixes all eight voices to a 16-bit stereo output at 32 kHz and applies gaussian interpolation as it resamples, which softens the very top end.
The only real limits are the 64KB of audio RAM shared by samples, driver and echo, and the 4-bit BRR compression, so squeezing sampled audio through is a matter of budgeting memory and choosing good loop points rather than fighting the hardware.
| Step | Detail |
|---|---|
| Encode | PCM to 9-byte BRR blocks (16 four-bit samples with a predictor) |
| Register | Add the sample to the directory and give it a source number |
| Play | Set a voice's SRCN, 14-bit pitch and envelope, with a loop point for sustain |
| Method | Depth | Max sample rate |
|---|---|---|
| Native BRR voices | 4-bit BRR, 16-bit output | 32 kHz (fixed DSP output) |