Files
Emil c7d6c40683 Initial release: 8-bit sound synthesizer with LLM/MCP integration
Soundgen is a Rust workspace for generating 8-bit/chiptune sound effects,
UI sounds, and ambient textures for game audio assets. It features JSON-first
sound specs, an MCP server for LLM tool-use, an egui GUI editor, and a
runtime library with NES-authentic DAC emulation.

Features:
- 6 voice types: pulse, triangle, noise, DPCM, wavetable, FM
- Effects: ADSR envelope, frequency sweep, biquad filter, vibrato
- 13 built-in presets (SFX/UI/ambient) as JSON data files
- MCP server: list_presets, generate_sfx, render_sound tools
- Pattern-based sequencer (JSON song format)
- egui GUI: virtual keyboard, preset browser, channel editor, undo/redo
- Runtime: NES nonlinear DAC + SoundBank for game embedding
- 90 tests, 0 warnings

Crates:
- soundgen-core: synthesis engine (no I/O)
- soundgen-fmt: SoundSpec JSON schema + PresetRegistry
- soundgen-io: WAV writer + audio playback
- soundgen-seq: sequencer (patterns, songs)
- soundgen-cli: gen/render/render-song/list-presets
- soundgen-mcp: MCP server for LLM integration
- soundgen-gui: egui editor
- soundgen-runtime: NES DAC + SoundBank
2026-06-21 22:07:05 +03:00

2.2 KiB

Soundgen

8-bit sound synthesizer in Rust for game audio assets, with LLM integration via MCP.

Status

Phases 1-4 complete. PLAN.md is the authoritative design doc.

Architecture (from PLAN.md)

Cargo workspace with these crate boundaries:

  • soundgen-core — synthesis engine (generators, effects, mixer). No I/O. Renders to Vec<f32>.
  • soundgen-fmtSoundSpec JSON schema (serde) + PresetRegistry loading from presets/.
  • soundgen-io — WAV writer (hound) and playback (subprocess fallback: paplay/aplay).
  • soundgen-seq — sequencer: patterns, songs.
  • soundgen-cligen, render, render-song, list-presets commands (clap).
  • soundgen-mcp — MCP server exposing list_presets, generate_sfx, render_sound tools (JSON-RPC over stdio, no rmcp dependency).
  • soundgen-gui — egui editor with virtual keyboard, preset browser, SFX editor, sequencer, undo/redo, file dialogs.
  • soundgen-runtime — NES-authentic nonlinear DAC + SoundBank for game embedding.

Presets are JSON data files in presets/{sfx,ui,ambient}/, not compiled code.

Conventions

  • JSON-first: every sound is a SoundSpec JSON object. LLMs generate JSON; CLI/MCP render to WAV.
  • No allocations in audio hot path: generators use &mut self, tick() -> f32, no Vec per-sample.
  • Presets as data: extend presets/ with new .json files, no recompilation needed.
  • MIT license.

Commands

cargo test --workspace           # run all tests (90 passing)
cargo run --bin soundgen -- list-presets
cargo run --bin soundgen -- gen <preset> --out <path>
cargo run --bin soundgen -- render <spec.json> --out <path>
cargo run --bin soundgen -- render-song <song.json> --out <path>
cargo run -p soundgen-mcp -- --presets-dir presets   # MCP server on stdio
cargo run -p soundgen-gui                            # GUI editor

Roadmap

Phase 1 (MVP): core generators (pulse/triangle/noise) + envelope/sweep/mixer + WAV I/O + CLI + SFX/UI presets. Phase 2: DPCM/wavetable/FM + sequencer + MCP server + ambient presets. Phase 3: egui GUI + realtime playback. Phase 4: NES-authentic DAC, runtime library, sound bank.

See PLAN.md for full details, dependency versions, and the SoundSpec JSON format.