Skip to main content

rill_core_dsp/
lib.rs

1// rill-core-dsp/src/lib.rs
2//! # Rill Core DSP
3//!
4//! Core DSP abstractions and algorithms for the Rill ecosystem.
5//!
6//! ## Modules
7//! - `algorithm` — DSP algorithm trait (`Algorithm`, `ParameterizedAlgorithm`) and categories
8//! - `context` — DSP context with sample rate, block size, and time info
9//! - `filters` — Filter trait and types (Biquad coefficients, MoogLadder, etc.)
10//! - `generators` — signal generators (WavetableOscillator, SamplePlayer, LFO, Envelope, Noise)
11//! - `mapping` — control mapping strategies
12//! - `math` — extra math utilities
13//! - `smoothing` — parameter smoothing (ParamSmoother)
14//! - `vector` — SIMD vector abstractions
15//! - `macros` — macros for algorithm-to-node conversion and prelude
16//!
17//! ## Features
18//! - Full type parameterization (f32/f64) via `Transcendental`
19//! - RT-safe buffers with const generics
20//! - SIMD acceleration behind `simd` feature flag
21
22#![warn(missing_docs)]
23#![deny(unsafe_code)]
24
25pub mod algorithm;
26pub mod analyzer;
27pub mod context;
28pub mod effect;
29pub mod filters;
30pub mod generators;
31pub mod mapping;
32pub mod math;
33pub mod smoothing;
34pub mod vector;
35
36#[macro_use]
37pub mod macros;
38
39// Re-exports
40pub use algorithm::ParameterizedAlgorithm;
41pub use context::DspContext;
42pub use filters::{Filter, FilterParams, FilterType};
43pub use generators::{
44    EnvelopeGenerator, Generator, InterpolatedReader, LoopMode, NoiseGenerator, Resampler,
45    SamplePlayer, WavetableOscillator, LFO,
46};
47
48/// Prelude for convenient imports
49pub mod prelude {
50    pub use crate::algorithm::ParameterizedAlgorithm;
51    pub use crate::context::DspContext;
52    pub use crate::filters::{Filter, FilterParams, FilterType};
53    pub use crate::generators::{
54        EnvelopeGenerator, Generator, InterpolatedReader, LoopMode, NoiseGenerator, Resampler,
55        SamplePlayer, WavetableOscillator, LFO,
56    };
57    pub use crate::mapping::{ControlMapper, MappingStrategy};
58    pub use crate::math::*;
59    pub use crate::smoothing::ParamSmoother;
60    pub use crate::vector::prelude::*;
61}