infinitedsp_core/
lib.rs

1#![no_std]
2
3//! # InfiniteDSP Core
4//!
5//! A modular, high-performance audio DSP library for Rust, designed for real-time synthesis and effects processing.
6//! It is `no_std` compatible (requires `alloc`).
7//!
8//! ## Example
9//!
10//! ```
11//! use infinitedsp_core::core::dsp_chain::DspChain;
12//! use infinitedsp_core::core::audio_param::AudioParam;
13//! use infinitedsp_core::core::frame_processor::FrameProcessor;
14//! use infinitedsp_core::core::channels::Mono;
15//! use infinitedsp_core::synthesis::oscillator::{Oscillator, Waveform};
16//! use infinitedsp_core::effects::utility::gain::Gain;
17//!
18//! // Create a simple synth chain: Oscillator -> Gain
19//! let osc = Oscillator::new(AudioParam::hz(440.0), Waveform::Sine);
20//! let gain = Gain::new_fixed(0.5);
21//!
22//! let mut chain = DspChain::new(osc, 44100.0).and(gain);
23//!
24//! // Process a block of audio
25//! let mut buffer = [0.0; 128];
26//! chain.process(&mut buffer, 0);
27//!
28//! // Check that something happened (first sample of sine is 0, but next should be non-zero)
29//! assert!(buffer[1].abs() > 0.0);
30//! ```
31
32extern crate alloc;
33
34pub mod core;
35pub mod effects;
36pub mod low_mem;
37pub mod synthesis;
38
39pub use crate::core::channels::{ChannelConfig, Mono, Stereo};
40pub use crate::core::frame_processor::FrameProcessor;