bbx_audio
A Rust workspace for audio DSP with C FFI bindings for JUCE plugin integration.
Note: These crates are still in early development. Expect breaking changes in some releases.
What is bbx_audio?
bbx_audio is a collection of Rust crates designed for real-time audio digital signal processing (DSP). It provides a graph-based architecture for building audio processing chains, with first-class support for integrating Rust DSP code into C++ audio applications like JUCE plugins.
Crates
| Crate | Description |
|---|---|
bbx_core | Error types and foundational utilities |
bbx_dsp | DSP graph system, blocks, and PluginDsp trait |
bbx_plugin | C FFI bindings for JUCE integration |
bbx_file | Audio file I/O (WAV) |
bbx_midi | MIDI message parsing and streaming |
bbx_draw | Audio visualization primitives for nannou |
bbx_sandbox | Examples and testing playground |
Architecture Overview
bbx_core (foundational utilities)
└── bbx_dsp (DSP graph system)
├── bbx_file (audio file I/O via hound/wavers)
└── bbx_plugin (FFI bindings)
bbx_midi (MIDI streaming via midir, independent)
The core DSP system is built around a Graph of connected Blocks:
Blocktrait: Defines the DSP processing interface withprocess(), input/output counts, and modulation outputsBlockTypeenum: Wraps all concrete block implementations (oscillators, effects, I/O, modulators)Graph: Manages block connections, topological sorting for execution order, and buffer allocationGraphBuilder: Fluent API for constructing DSP graphs
Who is this documentation for?
Audio Programmers
If you're exploring Rust for audio software and want to understand real-time DSP patterns:
- Quick Start - Build your first DSP graph
- Graph Architecture - Core design patterns
- Real-Time Safety - Allocation-free, lock-free processing
Plugin Developers
If you want to use Rust for your audio plugin DSP while keeping your UI and plugin framework in C++/JUCE, start with:
- Quick Start - Get a simple graph running
- JUCE Plugin Integration - Full integration guide
- Parameter System - Managing plugin parameters
Game Audio Developers
If you're building audio systems for games and want real-time safe DSP in Rust:
- Quick Start - Build your first DSP graph
- Real-Time Safety - Allocation-free, lock-free processing
- Graph Architecture - Efficient audio routing
Experimental Musicians
If you're building instruments, exploring synthesis, or experimenting with sound design:
- Terminal Synthesizer - Build a MIDI-controlled synth from scratch
- Parameter Modulation - LFOs, envelopes, and modulation routing
- MIDI Integration - Connect keyboards and controllers
Generative Artists
If you're creating sound installations, audio visualizations, or experimenting with procedural audio:
- Quick Start - Build your first DSP graph
- Real-Time Visualization - Visualize audio with nannou
- Sketch Discovery - Manage and organize visual sketches
Library Contributors
If you want to contribute to bbx_audio or understand its internals:
- Development Setup - Set up your environment
- DSP Graph Architecture - Understand the core design
- Adding New Blocks - Extend the block library
Quick Example
#![allow(unused)] fn main() { use bbx_dsp::{GraphBuilder, blocks::*}; // Build a simple oscillator -> gain -> output chain let graph = GraphBuilder::new() .add_block(OscillatorBlock::new(440.0, Waveform::Sine)) .add_block(GainBlock::new(-6.0, None)) .add_block(OutputBlock::new(2)) .connect(0, 0, 1, 0)? // Oscillator -> Gain .connect(1, 0, 2, 0)? // Gain -> Output .build()?; }
License
bbx_audio is licensed under the MIT License. See LICENSE for details.