synthie 0.3.1

Rust synthesizer engine library with ADSR, filters, LFO, and reverb
Documentation

synth

docs.rs crates.io unsafe forbidden Lint and Test Fuzz Build

A Rust synthesizer engine library with polyphonic voices, ADSR envelopes, state-variable filters, LFO modulation, and reverb.

Features

  • Polyphonic voice engine with configurable channel count
  • Five waveforms: Pulse, Sawtooth, Triangle, Noise, Pulse+Saw
  • ADSR amplitude envelope with optional reverse (swell/duck) mode
  • State-variable filter - Low-pass, Band-pass, and High-pass with cutoff, resonance, and drive
  • LFO targeting pitch, pulse width, filter cutoff, or volume
  • Reverb FX with room size and damping controls
  • Multi-timbral channels via ChannelNo newtypes
  • Serde support via the serde feature (enabled by default)

Quick Start

use synthie::audio::engine::setup_audio;
use synthie::params::{AudioEvent, MidiNote};

fn main() -> anyhow::Result<()> {
    let (stream, tx, _scope_rx) = setup_audio()?;
    let _stream = stream; // keep alive

    tx.send(AudioEvent::NoteOn(MidiNote(60)))?;
    std::thread::sleep(std::time::Duration::from_secs(1));
    tx.send(AudioEvent::NoteOff(MidiNote(60)))?;
    Ok(())
}

See examples/ for full usage.

Feature Flags

Feature Default Description
serde enabled Serialize/Deserialize on all parameter types

Terminal UI

The synth-tui crate provides a full ratatui-based terminal UI. See the repository root for screenshots.