DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::detail::continuous_clip::Residual< C, Degree, NativeSlope, SubtractLinear > Class Template Referencefinal

Streaming cubic B-spline moments of a reconstructed clipping residual. More...

#include <ContinuousClip.h>

Public Member Functions

void reset (double ceiling) noexcept
 Resets reconstruction history and sets the positive finite ceiling.
 
std::vector< double > linearKernel () const
 Constructs the matching linear FIR during setup.
 
double process (double x) noexcept
 Processes one high-rate sample, returning its integrated residual.
 

Detailed Description

template<Curve C, int Degree = 11, bool NativeSlope = false, bool SubtractLinear = true>
class dspark::detail::continuous_clip::Residual< C, Degree, NativeSlope, SubtractLinear >

Streaming cubic B-spline moments of a reconstructed clipping residual.

NativeSlope selects subtraction of the implemented curve's small-signal slope. The default retains the original unit-slope residual contract. SubtractLinear=false integrates the complete shaped signal. It permits a caller to avoid cancellation of large linear terms at very small ceilings. Construction computes the quadrature tables. process() and reset() allocate nothing, use bounded recursion and never throw. Non-convergence produces NaN, which callers must handle as a numerical error; it never changes the curve or substitutes a lower-quality result. linearKernel() allocates during setup only. Threading: each stream owns its state; no concurrent calls on one instance.

Definition at line 556 of file ContinuousClip.h.

Member Function Documentation

◆ linearKernel()

template<Curve C, int Degree = 11, bool NativeSlope = false, bool SubtractLinear = true>
std::vector< double > dspark::detail::continuous_clip::Residual< C, Degree, NativeSlope, SubtractLinear >::linearKernel ( ) const
inline

Constructs the matching linear FIR during setup.

Definition at line 574 of file ContinuousClip.h.

◆ process()

template<Curve C, int Degree = 11, bool NativeSlope = false, bool SubtractLinear = true>
double dspark::detail::continuous_clip::Residual< C, Degree, NativeSlope, SubtractLinear >::process ( double  x)
inlinenoexcept

Processes one high-rate sample, returning its integrated residual.

Definition at line 579 of file ContinuousClip.h.

◆ reset()

template<Curve C, int Degree = 11, bool NativeSlope = false, bool SubtractLinear = true>
void dspark::detail::continuous_clip::Residual< C, Degree, NativeSlope, SubtractLinear >::reset ( double  ceiling)
inlinenoexcept

Resets reconstruction history and sets the positive finite ceiling.

Definition at line 566 of file ContinuousClip.h.


The documentation for this class was generated from the following file: