A bounded cascade of configurable peaking bands for one audio channel. More...
#include <graphic_eq.hpp>
Public Types | |
| using | Band = GraphicEqBandT<SampleType> |
| using | Coefficients = BiquadCoefficientsT<SampleType> |
Public Member Functions | |
| GraphicEqPrepareStatus | prepare (SampleType sample_rate, std::size_t band_capacity=MaxBands) noexcept |
| GraphicEqConfigureStatus | configure (std::span< const Band > bands, std::size_t transition_samples=0) noexcept |
| SampleType | process (SampleType input) noexcept |
| bool | process_block (SampleType *samples, std::size_t frames) noexcept |
| Process caller-owned storage in place. | |
| void | reset () noexcept |
| Clear recursive history and, if a transition is active, select its requested endpoint. | |
| bool | prepared () const noexcept |
| bool | transitioning () const noexcept |
| bool | healthy () const noexcept |
| std::size_t | fault_count () const noexcept |
| std::size_t | capacity () const noexcept |
| std::size_t | band_count () const noexcept |
| SampleType | sample_rate () const noexcept |
| SampleType | supported_frequency_ceiling_hz () const noexcept |
| Band | band (std::size_t index) const noexcept |
| Coefficients | coefficients (std::size_t index) const noexcept |
| int | tail_samples () const noexcept |
| double | magnitude (double frequency_hz) const noexcept |
| Stationary response of the requested endpoint. | |
| double | magnitude_db (double frequency_hz) const noexcept |
Static Public Member Functions | |
| static constexpr int | latency_samples () noexcept |
| The cascade is causal IIR and adds no bulk delay. | |
| static constexpr std::size_t | storage_capacity () noexcept |
Static Public Attributes | |
| static constexpr SampleType | minimum_sample_rate_hz = SampleType{8000} |
| static constexpr SampleType | maximum_sample_rate_hz = SampleType{384000} |
| static constexpr SampleType | minimum_frequency_hz = SampleType{20} |
| static constexpr SampleType | maximum_frequency_hz = SampleType{20000} |
| static constexpr SampleType | minimum_gain_db = SampleType{-24} |
| static constexpr SampleType | maximum_gain_db = SampleType{24} |
| static constexpr SampleType | minimum_q = SampleType{0.1} |
| static constexpr SampleType | maximum_q = SampleType{12} |
A bounded cascade of configurable peaking bands for one audio channel.
This is the reusable variable-band container. SixBandEqT remains the fixed-role low-shelf/four-peak/high-shelf compatibility surface, and this type deliberately does not perform constant-Q analysis or choose band frequencies. Callers provide a strictly increasing band layout.
configure() validates and designs the complete candidate before changing live state. An invalid request leaves coefficients, recursive history, and transition progress unchanged. A non-zero transition crossfades two stable cascades; recursive coefficients are never interpolated. A second request during that bounded transition is rejected so the audible endpoint is deterministic.
RT contract: all storage is fixed. prepare(), configure(), process(), process_block(), response inspection, and reset() allocate no memory. Design and response inspection use transcendental functions, so callers should keep those operations off the audio callback even though they are allocation-free. The object is not a concurrent publication primitive: call configure() while stopped or from the processing thread at a block boundary. Instantiate one object per independently processed channel.
| using pulp::signal::GraphicEqT< SampleType, MaxBands >::Band = GraphicEqBandT<SampleType> |
| using pulp::signal::GraphicEqT< SampleType, MaxBands >::Coefficients = BiquadCoefficientsT<SampleType> |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestaticconstexprnoexcept |
The cascade is causal IIR and adds no bulk delay.
Any active non-neutral peaking band has an asymptotic recursive tail, reported with Pulp's -1 infinite-tail sentinel. A bypass/all-zero-gain layout has no tail.
|
inlinenoexcept |
Stationary response of the requested endpoint.
During a transition this describes the destination, not the instantaneous linear crossfade.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Process caller-owned storage in place.
A null pointer is valid only for an empty block and otherwise fails without advancing any DSP state.
A pending crossfade runs sample by sample. Otherwise the block goes through the active cascade's block path in kSnapChunkSamples chunks, which matches the sample path to the Biquad block path's accuracy contract (see BiquadT::process_chain()). Faults keep the sample path's timing: a non-finite input is handed to process() at its own sample, and at the first non-finite output the cascade is recovered exactly as process() would and the rest of the chunk is rerun from its saved input on the recovered (reset) cascade. No cascade state needs saving, because recovery resets it.
|
inlinenoexcept |
Clear recursive history and, if a transition is active, select its requested endpoint.
Configuration and fault telemetry are preserved.
|
inlinenoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |