The SNES sound chip plays samples in its own compressed format, BRR (Bit Rate Reduction — a 9-byte block per 16 samples). wav2brr encodes an ordinary PCM .wav into a .brr you load at runtime with audioLoadSample(). It is the zero-config path for one-shot sound effects.
In: a PCM .wav — 8- or 16-bit, mono or stereo (stereo is downmixed).
Out: a raw .brr (its size is always a multiple of 9 bytes). Default name is input.brr alongside the input.
| Flag | Meaning |
|---|---|
| --loop START END | loop between sample indices START..END (default: one-shot, no loop) |
| -v | verbose — prints the size breakdown, a sample-rate warning, and a ready-to-paste load line |
One-shot SFX — automatic. Drop a .wav in the example's res/ and .incbin the matching .brr in an ASM file; the build's %.brr: %.wav rule runs wav2brr for you. No command to type:
Looping samples — by hand. A sustained instrument or a looping ambience needs loop points, which only you know, so build it once and commit the .brr:
Run with -v to see the block count and the exact audioLoadSample() call to paste.
For music (as opposed to individual samples), you want smconv — tracker modules to SNESMOD soundbanks and its tracker-module workflow instead.