bbx_dsp/
lib.rs

1//! # BBX DSP
2//!
3//! A block-based audio DSP system for building signal processing graphs.
4//!
5//! ## Overview
6//!
7//! This crate provides a graph-based architecture for constructing DSP chains.
8//! Blocks (individual DSP units) are connected together to form a processing graph,
9//! which is then executed in topologically sorted order.
10//!
11//! ## Core Types
12//!
13//! - [`Block`](block::Block) - Trait for DSP processing units
14//! - [`BlockType`](block::BlockType) - Enum wrapping all block implementations
15//! - [`Graph`](graph::Graph) - Container for connected blocks
16//! - [`GraphBuilder`](graph::GraphBuilder) - Fluent API for graph construction
17//! - [`Sample`](sample::Sample) - Trait abstracting over f32/f64
18//!
19//! ## Block Categories
20//!
21//! - **Generators**: Create audio (oscillators)
22//! - **Effectors**: Transform audio (gain, overdrive, panning)
23//! - **Modulators**: Generate control signals (LFOs, envelopes)
24//! - **I/O**: File input/output and graph output
25//!
26//! ## Example
27//!
28//! ```ignore
29//! use bbx_dsp::{graph::GraphBuilder, waveform::Waveform};
30//!
31//! let mut builder = GraphBuilder::<f32>::new(44100.0, 512, 2);
32//! let osc = builder.add_oscillator(440.0, Waveform::Sine, None);
33//! let graph = builder.build();
34//! ```
35
36#![cfg_attr(feature = "simd", feature(portable_simd))]
37
38pub mod block;
39pub mod blocks;
40pub mod buffer;
41pub mod channel;
42pub mod context;
43pub mod frame;
44pub mod graph;
45pub mod parameter;
46pub mod plugin;
47pub mod polyblep;
48pub mod prelude;
49pub mod reader;
50pub mod sample {
51    //! Audio sample type abstraction.
52    //!
53    //! Re-exported from `bbx_core` for convenience.
54    pub use bbx_core::sample::*;
55}
56pub mod smoothing;
57pub mod voice;
58pub mod waveform;
59pub mod writer;
60
61pub use block::BlockCategory;
62pub use channel::{ChannelConfig, ChannelLayout};
63pub use frame::{Frame, MAX_FRAME_SAMPLES};
64pub use plugin::PluginDsp;
65pub use voice::VoiceState;