|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
The audio stack. More...
The audio stack.
Namespaces | |
| namespace | math |
| Math for the audio stack. | |
| namespace | sinc_upsampler |
| Generated coefficients of the SincUpsampler's kernel. | |
| namespace | types |
| Conversion at the DMA boundary. | |
Classes | |
| class | BlepCorrector |
| The correction buffer behind a band-limited edge, over a BLEP kernel. More... | |
| class | BlepOsc |
| The BLEP oscillator core: one phase, three waveform parts, band-limited edges. More... | |
| class | DcBlock |
| A one-pole high-pass with its zero at DC. More... | |
| class | DryWet |
| A dry/wet mix of two signals, the mix a port. More... | |
| class | OnePole |
| A one-pole low-pass, exact for an input that holds through the frame. More... | |
| class | PhaseAccumulator |
| A phase advanced by a signed step each frame, held as a 32-bit count of the cycle. More... | |
| class | PhasePulse |
| A band-limited pulse driven by a signed phase, its width placed by a bipolar anchor. More... | |
| class | PhaseSaw |
| A band-limited slope shape driven by a signed phase, from a falling saw through a triangle to a rising saw. More... | |
| class | PhaseWalk |
| A modulated phase walked frame by frame as segments, and the crossings of moving thresholds on them. More... | |
| class | PmInput |
| The PM signal, a sample a frame in and PM_SUBSTEPS values a frame out. More... | |
| class | PmPulse |
| A pulse oscillator with phase modulation: pitch, width, anchor, index and the PM signal over a PhasePulse. More... | |
| class | Ramp |
| A linear ramp to a target over a fixed number of frames. More... | |
| class | SincUpsampler |
| A frame-rate signal interpolated at FACTOR steps through each frame, LATENCY frames late. More... | |
| class | Slew |
| One-pole slew toward a target, with separate rise and fall time constants. More... | |
| class | SoftLimiter |
| A soft-knee limiter: the input under a knee, a tanh bend under a ceiling above it. More... | |
| class | Svf |
| A trapezoidal state-variable filter with five responses from one section. More... | |
| class | Vca |
| An amplifier: gain, Level and Mod Amt as ports over a linear multiply. More... | |
| class | Vco |
| An oscillator: Tune, and pitch, Wave and Shape as ports over a BlepOsc. More... | |
Functions | |
| uint32_t | blep_correction_count () |
| Corrections added by every BlepCorrector since the start. | |
| float | pm_frequency (float tune, float pitch) |
| The step for a pitch in octaves over a tune. | |
| float | pm_depth (float index) |
| Cycles of phase offset per unit of the PM signal for a bipolar index. | |
| float | pm_taming (float octaves_above_corner) |
| The share of the depth kept at a pitch over PM_TAMING_CORNER. | |
Variables | |
| constexpr float | PM_MAX_FREQUENCY = 0.25f |
| constexpr float | PM_MAX_INDEX = 0.5f |
| constexpr float | PM_TAMING_CORNER = 1046.5f / 48000.0f |
| Cycles per frame: where pm_taming()'s reduction starts, 1.05 kHz at 48 kHz. | |
| constexpr float | PM_TAMING_PER_OCTAVE = 0.3f |
| constexpr uint8_t | PM_SUBSTEPS = SincUpsampler::FACTOR |
| constexpr uint8_t | PM_LATENCY = SincUpsampler::LATENCY |
|
inline |
Corrections added by every BlepCorrector since the start.
One for each step() and each corner(): an edge or a slope change that a core band-limited. Wraps at 2^32. Always 0 in a build without profiling.
Definition at line 52 of file blep_corrector.hpp.
|
inline |
The step for a pitch in octaves over a tune.
| tune | Tune in cycles per frame |
| pitch | Pitch in octaves over the tune |
Definition at line 38 of file pm.hpp.
References sbl::math::clamp(), sbl::dsp::math::frequency(), and PM_MAX_FREQUENCY.
|
inline |
Cycles of phase offset per unit of the PM signal for a bipolar index.
Quadratic, so most of the control's travel is the shallow end.
| index | Index, nominally [-1, 1], not clamped; a non-finite index counts as 0 |
Definition at line 50 of file pm.hpp.
References sbl::math::finite_or(), and PM_MAX_INDEX.
Referenced by sbl::dsp::PmPulse::index_cycles().
|
inline |
The share of the depth kept at a pitch over PM_TAMING_CORNER.
The reduction of the depth with pitch that PmPulse applies, as Plaits reduces its FM amount (plaits/dsp/engine/fm_engine.cc:76-78). Without one, the PM's sidebands pass the Nyquist frequency at high pitch and fold. A component multiplies it in, or a curve of its own.
| octaves_above_corner | Pitch in octaves over PM_TAMING_CORNER |
Definition at line 67 of file pm.hpp.
References sbl::math::clamp(), and PM_TAMING_PER_OCTAVE.
Referenced by sbl::dsp::PmPulse::index_cycles().
|
inlineconstexpr |
cycles per frame: fs/4, as BlepOsc caps it
Definition at line 23 of file pm.hpp.
Referenced by pm_frequency().
|
inlineconstexpr |
cycles of offset per unit of PM at index 1
Definition at line 24 of file pm.hpp.
Referenced by pm_depth().
|
inlineconstexpr |
Cycles per frame: where pm_taming()'s reduction starts, 1.05 kHz at 48 kHz.
|
inlineconstexpr |
the reduction's slope before squaring: zero 40 semitones up
Definition at line 27 of file pm.hpp.
Referenced by pm_taming().
|
inlineconstexpr |
|
inlineconstexpr |