Rustic is a modular audio synthesis framework written in Rust that lets you build real‑time DSP pipelines, musical instruments, audio effects, and full‑stack synthesis applications.
git clone https://github.com/minigrim0/rustic.git
cd rusticFollow the Getting started section to create a project, run the frontend, and explore the demo apps.
The project consists of multile components.
rustic/- The core library, responsible for managing the audio thread and synthesisrustic-meta/+rustic-derive/- Handles deriving metadata for filter structures in the core libraryrustic-toolkit/- A frontend using the library for audio analysis, filter graph building and testing (still heavily WIP). Serves as a playground for audio synthesis.frontend/- Deprecated - Initial attempt at making a frontend for actually playing music, might disappear entirely in the near future.
The library implements a real-time-safe audio system using three threads that communicate via lock-free data structures:
- Command Thread (
spawn_command_thread): Receives Commands from the frontend, validates them, translates to AudioMessage enum, and forwards to render thread. Maintains the App state machine. - Render Thread (
spawn_audio_render_thread): Owns all Instrument instances, processes AudioMessage queue, calls tick() on instruments, produces audio samples, pushes to ArrayQueue. - CPAL Callback (
create_cpal_callback): Real-time audio thread managed by cpal, pulls samples from ArrayQueue, writes to audio device buffer. Must never block.
The repository uses pre‑commit to enforce formatting (rustfmt) and to run the default test suite.
pre-commit install # install hooks
pre-commit run --all-files # test hooks locallyDocumentation is automatically built & published to GitHub Pages on every push to main.
https://minigrim0.github.io/rustic/
- Clone the repo:
git clone https://github.com/minigrim0/rustic.git
cd rustic- Build & run the examples:
cargo run --example drum_machine- For frontend development:
cargo tauri dev