Open-source FSB5 audio middleware — foundation of an open-source FMOD-class stack for Bevy.
RaMOD reads and writes FSB5 sound banks and moves audio between the FSB5 container and standard formats: parse banks, extract samples as WAV or Ogg Vorbis, build banks from WAV files, edit banks in place, and encode PCM to Vorbis — with zero external crates (Rust standard library only).
Long-term goal: a complete open-source alternative to FMOD (runtime + authoring + Bevy plugin). See the design docs below.
Design docs
| Document | Role |
|---|---|
| DESIGN.md | Vision, goals, principles |
| ROADMAP.md | 50 operational items across 4 phases |
| ARCHITECTURE.md | Technical blueprint (runtime, Bevy, editor) |
| docs/RENZORA.md | Renzora Engine (Bevy 0.19) integration |
| Parse | FSB5 header, per-sample headers, metadata chunks (CHANNELS, FREQUENCY, LOOP, VORBISDATA, …), name table and payloads |
| Codecs | PCM8/16/24/32, PCMFLOAT, VORBIS |
| Extract | PCM → RIFF/WAVE; Vorbis → playable Ogg Vorbis (headers re-synthesised, packets re-muxed into CRC-correct Ogg pages) |
| Build | FSB5 banks from WAV files, with loop points and non-standard sample rates |
| Edit | rename, loop points, sample rate, replace audio — preserving everything else byte-for-byte |
| Import | any Ogg Vorbis file → FSB5 VORBIS sample (setup header matched by CRC32) |
| Encode | PCM → Vorbis by driving the stock libfsbvorbis64.dll encoder on Windows (pure-Rust encoder is Phase 0) |
[dependencies]
ramod = { git = "https://github.com/SimonTek27/RaMOD" }use ramod::Fsb5;
let bank = Fsb5::parse(&std::fs::read("Master.fsb")?)?;
for (i, sample) in bank.samples.iter().enumerate() {
println!(
"{i}: {} ({} Hz, {} ch, {} frames)",
sample.name, sample.frequency, sample.channels, sample.num_frames
);
}
let ogg = ramod::build_ogg(&bank, 0)?;
std::fs::write("sample.ogg", ogg)?;Build a bank from WAV data:
use ramod::{Fsb5Builder, SoundFormat, Wav};
let wav = Wav::parse(&std::fs::read("hit.wav")?)?;
let sample = wav.into_pcm_sample("hit");
let bank = Fsb5Builder::new(SoundFormat::Pcm16).with_sample(sample).build()?;
std::fs::write("hit.fsb", bank)?;cargo run --bin ramod -- list path/to/bank.fsb
cargo run --bin ramod -- info path/to/bank.fsb
cargo run --bin ramod -- extract path/to/bank.fsb --index 0 --out sample.ogg- No dependencies. Only
stdis used. The Vorbis encoder currently bindslibfsbvorbis64.dllat runtime on Windows; a pure-Rust encoder is the top Phase 0 priority so all platforms work without proprietary binaries. - Self-verifying writer.
Fsb5BuilderandBankEditorparse their own output before returning it. - Faithful editing. Untouched metadata and payloads are preserved byte-for-byte.
The container layout was cross-checked against genuine commercial banks:
- Header (60 bytes, version ≥ 1):
FSB5magic, version, sample count, sample-header size, name-table size, data size, mode, then thezero(8 B),hash(16 B) anddummy(8 B) fields. - Sample header: a packed 64-bit word (
extraParams:1,frequency:4,twoChannels:1,dataOffset:28in 16-byte units,samples:30) followed by optional metadata chunks. - Alignment: the data section starts on a 32-byte boundary and every sample is 32-byte aligned.
VORBISDATAholds au32setup-header CRC32 plus a seek table.- Vorbis sample framing:
u16length + payload; zero length ends the stream. - Setup headers are not embedded: a CRC32 keys one of 161 pre-built headers
in
assets/vorbis_setup_headers.bin.
python tools/build_vorbis_setup_headers.pycargo run --example build_bankcargo testEvery push and pull request runs cargo build, cargo test, cargo fmt --check
and cargo clippy -D warnings on Linux, Windows and macOS. Encoder tests skip
themselves when the DLL encoder is unavailable.
RaMOD can replace or sit beside Renzora audio (Kira):
bevy_ramod = { git = "https://github.com/SimonTek27/RaMOD", features = ["renzora"] }// Option A — RaMOD only (recommended)
App::new()
.add_plugins(DefaultPlugins)
.replace_renzora_audio_with_ramod()
.run();Zero-glue Renzora Backend adapter: see docs/RENZORA.md and
docs/renzora_backend_glue.rs.
GPL-3.0-or-later — see LICENSE.
RaMOD is an independent, clean-room project and is not affiliated with, or endorsed by, any vendor of the formats it interoperates with.