Expand description
§Quiver: Modular Audio Synthesis Library
“A quiver is a directed graph—nodes connected by arrows. In audio, our nodes are modules, our arrows are patch cables, and signal flows through their composition.”
quiver is a Rust library for building modular audio synthesis systems. It combines
the mathematical elegance of category theory with the tactile joy of patching a
hardware modular synthesizer.
§Quick Start
use quiver::prelude::*;
// Build a patch at CD-quality sample rate.
let sr = 44_100.0;
let mut patch = Patch::new(sr);
// Add modules — each `add` returns a `NodeHandle` used to reference its ports.
let vco = patch.add("vco", Vco::new(sr));
let vcf = patch.add("vcf", Svf::new(sr));
let vca = patch.add("vca", Vca::new());
let env = patch.add("env", Adsr::new(sr));
let out = patch.add("out", StereoOutput::new());
// Patch cables: VCO -> VCF -> VCA -> stereo out.
patch.connect(vco.out("saw"), vcf.in_("in")).unwrap();
patch.connect(vcf.out("lp"), vca.in_("in")).unwrap();
patch.connect(vca.out("out"), out.in_("left")).unwrap();
patch.connect(vca.out("out"), out.in_("right")).unwrap();
// The envelope shapes both the filter cutoff and the amplitude.
patch.connect(env.out("env"), vcf.in_("cutoff")).unwrap();
patch.connect(env.out("env"), vca.in_("cv")).unwrap();
// Choose the output module, then compile before processing.
patch.set_output(out.id());
patch.compile().unwrap();
// Advance the patch by one sample of stereo audio.
let (_left, _right) = patch.tick();§Feature Flags
std(default): Full standard library support including OSC, plugin wrappers, visualization tools, and module development kit. Impliesalloc.alloc: Enables serialization (JSON save/load), presets, and basic I/O modules forno_stdenvironments with heap allocation (e.g., WASM).simd: Enables SIMD vectorization for block processing (works with any tier).wasm: WebAssembly bindings viawasm-bindgenand TypeScript types viatsify(impliesalloc).
Without any features, the library operates in no_std mode with alloc,
providing core DSP modules for embedded systems and WebAssembly targets.
Re-exports§
pub use prelude::*;
Modules§
- analog
- Analog Modeling Primitives
- combinator
- Layer 1: Typed Module Combinators
- extended_
io std - Extended I/O
- graph
- Layer 3: Patch Graph
- introspection
alloc - GUI Introspection API (Phase 1)
- io
alloc - External I/O Integration
- mdk
std - Module Development Kit (MDK)
- modules
- Core DSP Modules
- observer
alloc - Real-Time State Bridge (Phase 4: GUI Framework)
- polyphony
- Polyphony Support
- port
- Layer 2: Signal Conventions and Port System
- prelude
- Prelude module for convenient imports
- presets
alloc - Preset Library
- render
std - Offline rendering and WAV export (Q145).
- rng
- Seedable Random Number Generation for
no_std - scala
alloc - Scala (
.scl) scale file parser for microtuning (Q146). - serialize
alloc - Serialization and Persistence
- simd
- SIMD Vectorization and Block Processing
- visual
std - Visual Tools
- wasm
wasm - WASM bindings for Quiver
Macros§
- impl_
introspect - Wire a module’s
ModuleIntrospectionimpl into theGraphModuletrait object.