bbx_dsp/
prelude.rs

1//! Convenience re-exports for common bbx_dsp usage.
2//!
3//! This module provides a single import for the most commonly used types
4//! when building DSP graphs.
5//!
6//! # Example
7//!
8//! ```ignore
9//! use bbx_dsp::prelude::*;
10//!
11//! let mut builder = GraphBuilder::<f32>::new(44100.0, 512, 2);
12//! let osc = builder.add(OscillatorBlock::new(440.0, Waveform::Sine, None));
13//! let gain = builder.add(GainBlock::new(-6.0, None));
14//! builder.connect(osc, 0, gain, 0);
15//! let graph = builder.build();
16//! ```
17
18// Core types
19// Block types for ergonomic graph building
20pub use crate::blocks::{
21    // Effectors
22    AmbisonicDecoderBlock,
23    BinauralDecoderBlock,
24    BinauralStrategy,
25    ChannelMergerBlock,
26    ChannelMode,
27    ChannelRouterBlock,
28    ChannelSplitterBlock,
29    DcBlockerBlock,
30    // Modulators
31    EnvelopeBlock,
32    // I/O
33    FileInputBlock,
34    FileOutputBlock,
35    GainBlock,
36    LfoBlock,
37    LowPassFilterBlock,
38    MatrixMixerBlock,
39    MixerBlock,
40    // Generators
41    OscillatorBlock,
42    OutputBlock,
43    OverdriveBlock,
44    PannerBlock,
45    PannerMode,
46    VcaBlock,
47};
48pub use crate::{
49    block::{Block, BlockId, BlockType},
50    buffer::AudioBuffer,
51    context::{DEFAULT_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, DspContext},
52    graph::{Graph, GraphBuilder},
53    parameter::Parameter,
54    sample::Sample,
55    smoothing::{
56        Linear, LinearSmoothedValue, Multiplicative, MultiplicativeSmoothedValue, SmoothedValue, SmoothingStrategy,
57    },
58    waveform::Waveform,
59};