Super Nintendo · Sony S-SMP: SPC700 + S-DSP

S-DSP Sound Lab

Eight voices of compressed samples with envelopes, noise, pitch modulation and a hardware echo, emulated register by register. It also plays SPC files: an SPC700 runs each game’s own sound driver.

All sound labsGame Boy · NES · Master System · Mega Drive · C64 · SNES
Browsers keep audio off until you click. Effects and keys start it too.

Output

The DSP’s stereo output at 32 kHz: the dry mix plus the echo.

Engine idle
Mixer and analog warmth

Tracker

Furnace-style, eight channels. Click the grid and play the piano keys. Space plays the pattern, Enter the song.

Songs: files and library
Orders
Row
Instruments · the selected one is used for new notes

in this pattern · 03 playing now · bar and ×count: plays in the song (blue: among the most used) · faded: never played · struck: makes no sound (hover for why)

Samples
Keys and effects
  • Z–M and Q–I enter a note. [ ] change octave.
  • 1 enters note off (OFF), = a note release (===).
  • Instrument: two hex digits. Volume: 00–7F. Effect: four hex digits.
00xy 01xx 02xx 03xx 04xyArpeggio, slides, portamento, vibrato
08xy 80xx 14xyPanning, linear panning, invert left/right
09xx 0Fxx 0Axy FAxy F3xx F4xxSpeeds, volume slides
0Bxx 0Dxx FFxxJump, next pattern at row, stop
11xx 12xx 13xx 1DxxNoise, echo, pitch modulation on this channel; noise rate
15xx 16xx 20xx–23xxEnvelope mode (0 ADSR, 1–5 GAIN modes), gain; attack, decay, sustain, release
18xx 19xx 1Axx 1Bxx 1Cxx 3xyyEcho on, delay, volume L/R, feedback, filter tap x
1Exx 1FxxMain (dry) volume left/right
E1xy E2xy E5xx EAxx ECxx EDxxNote slides, fine pitch, legato, cut, delay

Voices

Each voice plays a BRR sample from audio RAM at a 14-bit pitch ($1000 = the sample’s own rate), shaped by an ADSR or GAIN envelope, panned by two signed volumes.

Samples

Every sample the directory ($5D) points at, read from audio RAM as BRR: 9-byte blocks of 16 samples, the last with the end flag (and the loop flag if it loops). The bars show where each voice is reading. Click a wave to open it large.

Keyboard

Keys Z S X D C V… and Q 2 W 3 E R… play two octaves on the chosen voice with its sample and envelope.

Echo, noise and flags

The echo delays the voices that have it on through a buffer in audio RAM (up to 240 ms), filters it with an 8-tap FIR and feeds it back.

Register map

The 128 DSP registers, written through the SPC700’s ports $F2 (address) and $F3 (data). Click a byte to edit it; recent writes glow.

Write log · newest first

    How the chip makes sound

    click to open

    BRR samples

    Samples are stored as Bit Rate Reduction blocks: 9 bytes hold 16 samples as 4-bit values with a shift and one of four predictive filters, about 3.5 : 1. A directory (page DIR) gives each source number a start and a loop address; the last block’s flags end or loop the sample.

    The DSP reads the samples at pitch / $1000 times 32 kHz and smooths them with a 4-point Gaussian interpolation, which also softens the treble: the characteristic muffled SNES sound.

    Envelopes and noise

    ADSR runs attack, decay to a sustain level and a sustain decay, all from one global rate counter; releasing (KOFF) falls linearly. GAIN instead sets the level directly or ramps it linearly, exponentially or along a bent line. The noise generator is a 15-bit LFSR shared by all voices that select it.

    Pitch modulation bends a voice by the previous voice’s output: FM with a sample as the modulator.

    Echo and the SPC700

    The echo reads its buffer at ESA, runs the 8-tap filter, mixes it into the output with EVOL and writes the voices plus EFB × filtered echo back. Its buffer takes 2 KB per 16 ms of delay from the same 64 KB that holds the samples and the driver.

    The SPC700 is the sound CPU that runs a game’s driver; this page runs it for SPC files. Elsewhere the page writes the DSP directly.

    Simplified here: the DSP is computed one sample at a time rather than in its 32-step pipeline, so a few writes land a sample earlier or later than on hardware. Against blargg’s snes_spc the output correlates at 0.97–0.9998.