1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! A library for audio oscillators, waveform generation, and noise.
//!
//! Provides the [`Oscillator`] trait for building audio oscillators, along with
//! ready-to-use implementations in [`naive`] and [`poly_blep`]. For noise
//! generation, see the [`noise`] module (requires the `noise` feature).
/// Naive oscillator implementations without anti-aliasing.
///
/// These are simple and efficient but will produce aliasing artifacts
/// for non-sine waveforms at higher frequencies.
/// Bandlimited oscillators using polynomial bandlimited step (polyBLEP).
///
/// PolyBLEP reduces aliasing by applying polynomial corrections to samples
/// near waveform discontinuities. When a waveform has a sharp transition
/// (like the reset in a sawtooth or edges in a square wave), the correction
/// smooths samples within one sample period of the discontinuity, reducing
/// high-frequency artifacts.
/// Noise generators for white, pink, and brown noise.
///
/// Noise generators produce aperiodic signals with different spectral
/// characteristics. Unlike oscillators, they have no frequency or phase.
/// A trait for audio oscillators that generate periodic waveforms.
/// Standard waveform shapes for oscillators.