Skip to main content

qualia_audio/midi/synth/
mod.rs

1//! Synth — voice allocator + ADSR + oscillator voices → audio. Re-exports only (AU-MIDI-SYNTH).
2//!
3//! Polyphonic subtractive-lite synth: a fixed-capacity [`VoiceAllocator`] of
4//! [`OscillatorVoice`]s (waveform × [`AdsrEnvelope`] × velocity), summed by
5//! [`render_block`]. The render path is zero-alloc, lock-free, and FS-free — all voice
6//! state is inline in a `[Voice; N]` array. Frequencies are supplied directly so a
7//! tuning table can drive pitch; [`VoiceAllocator::note_on_12tet`] is the equal-temperament
8//! default.
9
10mod adsr;
11mod oscillator_voice;
12mod render_block;
13mod voice;
14mod voice_allocator;
15
16pub use adsr::AdsrEnvelope;
17pub use oscillator_voice::{OscillatorVoice, Waveform};
18pub use render_block::render_block;
19pub use voice::Voice;
20pub use voice_allocator::{VoiceAllocator, MAX_VOICES};