Soundboard — the audio v2 engine driven entirely from C.
The first audio example with ZERO SPC700 assembly: the lib's audio module uploads its own resident driver, and everything below — loading four BRR samples into APU RAM, playing them with pan and pitch, shaping envelopes, switching a concert-hall echo on and off — is plain C calls.
Controls:
- A: cello note (center) — B: "AU" vowel (left) — X: "SS" hiss (right) — Y: "PP" pop (center)
- L/R: replay the cello a fifth down / up (pitch demo)
- Up/Down: master volume
- START: toggle the echo hall
ROM mode: LoROM (project default).
- SNES Concepts
- Dynamic BRR loading: audioLoadSample() streams samples over the APU I/O ports at runtime — no fixed APU memory image
- audioPlaySampleEx(): volume/pan/pitch per play, voices round-robin allocated by the engine
- ADSR set once per voice at init — notes ring and die naturally
- Echo: audioSetEcho() clears and sizes the ring, FIR tap 0, audioEnableEcho() routes voices in
- What to Observe
- Every button plays immediately, polyphonic up to 8 voices; START adds a hall around everything. The backdrop tints with each action.
- Modules Used
- console, audio, input
- See also
- lib/include/snes/audio.h — the full engine API
-
.claude/notes/chantiers/audio_v2.md — engine design