DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
Loading...
Searching...
No Matches
dspark::detail::HardClipAlgorithm< T > Class Template Referencefinal

#include <Saturation.h>

Inheritance diagram for dspark::detail::HardClipAlgorithm< T >:
Collaboration diagram for dspark::detail::HardClipAlgorithm< T >:

Public Member Functions

void prepare (const AudioSpec &) noexcept override
 Prepares the algorithm with the current audio specification.
 
void reset () noexcept override
 Resets internal states (filters, phase, memory).
 
Saturation< T >::Algorithm getType () const noexcept override
 Identifies the exact algorithm type for CRTP static dispatch.
 
processSample (T sample, T drive, T character, int ch) noexcept
 
- Public Member Functions inherited from dspark::detail::SaturationAlgorithm< T >
virtual ~SaturationAlgorithm ()=default
 
virtual void update (T, T, const AudioSpec &) noexcept
 Updates internal coefficients dependent on block-rate parameters.
 
void setAntialias (bool on) noexcept
 Enables 1st-order antiderivative anti-aliasing (ADAA) on the memoryless curves (Tanh/Tube/HardClip). Combined with oversampling this is the cleanest known approach (Parker/Zavalishin DAFx-16, Bilbao et al. 2017). No-op for algorithms that do not implement it. Default off (transparent).
 

Additional Inherited Members

- Static Public Attributes inherited from dspark::detail::SaturationAlgorithm< T >
static constexpr int kAaCh = 16
 
- Protected Attributes inherited from dspark::detail::SaturationAlgorithm< T >
std::atomic< bool > antialias_ { false }
 

Detailed Description

template<typename T>
class dspark::detail::HardClipAlgorithm< T >

Definition at line 174 of file Saturation.h.

Member Function Documentation

◆ getType()

template<typename T >
Saturation< T >::Algorithm dspark::detail::HardClipAlgorithm< T >::getType ( ) const
inlineoverridevirtualnoexcept

Identifies the exact algorithm type for CRTP static dispatch.

Implements dspark::detail::SaturationAlgorithm< T >.

Definition at line 187 of file Saturation.h.

◆ prepare()

template<typename T >
void dspark::detail::HardClipAlgorithm< T >::prepare ( const AudioSpec spec)
inlineoverridevirtualnoexcept

Prepares the algorithm with the current audio specification.

Implements dspark::detail::SaturationAlgorithm< T >.

Definition at line 185 of file Saturation.h.

◆ processSample()

template<typename T >
T dspark::detail::HardClipAlgorithm< T >::processSample ( sample,
drive,
character,
int  ch 
)
inlinenoexcept

Definition at line 189 of file Saturation.h.

◆ reset()

template<typename T >
void dspark::detail::HardClipAlgorithm< T >::reset ( )
inlineoverridevirtualnoexcept

Resets internal states (filters, phase, memory).

Implements dspark::detail::SaturationAlgorithm< T >.

Definition at line 186 of file Saturation.h.


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