DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::TailShaper< T > Class Template Reference

A dip and a relative gate driven by the dry signal. More...

#include <TailShaper.h>

Public Member Functions

 TailShaper () noexcept
 
void prepare (double sampleRate) noexcept
 Prepares for a sample rate (an invalid one is ignored) and clears.
 
void reset () noexcept
 Clears the followers; the gate starts open and the dip released.
 
void setDryDip (T dB) noexcept
 Depth of the dip in dB, 0 to 48 (0, the default, is off).
 
void setGate (T thresholdDb) noexcept
 Gate threshold in dB under the dry signal's recent peak, -80 to 0; below -80 the gate is off (the default).
 
void setGateHold (T ms) noexcept
 Time the gate stays open after the last crossing, 0 to 4000 ms (default 100).
 
void setGateRelease (T ms) noexcept
 Time constant of the gate's closing, 5 to 4000 ms (default 150).
 
T getDryDip () const noexcept
 
T getGate () const noexcept
 
T getGateHold () const noexcept
 
T getGateRelease () const noexcept
 
void sync () noexcept
 Takes the settings for the next block (audio thread).
 
bool isActive () const noexcept
 Whether next() can return anything but 1 (as of the last sync()).
 
T next (T dryLevel) noexcept
 One sample: the gain for the wet signal.
 

Detailed Description

template<FloatType T>
class dspark::TailShaper< T >

A dip and a relative gate driven by the dry signal.

Template Parameters
TSample type (float or double); the state is double.

Definition at line 49 of file TailShaper.h.

Constructor & Destructor Documentation

◆ TailShaper()

template<FloatType T>
dspark::TailShaper< T >::TailShaper ( )
inlinenoexcept

Definition at line 52 of file TailShaper.h.

Member Function Documentation

◆ getDryDip()

template<FloatType T>
T dspark::TailShaper< T >::getDryDip ( ) const
inlinenoexcept

Definition at line 104 of file TailShaper.h.

◆ getGate()

template<FloatType T>
T dspark::TailShaper< T >::getGate ( ) const
inlinenoexcept

Definition at line 105 of file TailShaper.h.

◆ getGateHold()

template<FloatType T>
T dspark::TailShaper< T >::getGateHold ( ) const
inlinenoexcept

Definition at line 106 of file TailShaper.h.

◆ getGateRelease()

template<FloatType T>
T dspark::TailShaper< T >::getGateRelease ( ) const
inlinenoexcept

Definition at line 107 of file TailShaper.h.

◆ isActive()

template<FloatType T>
bool dspark::TailShaper< T >::isActive ( ) const
inlinenoexcept

Whether next() can return anything but 1 (as of the last sync()).

Definition at line 121 of file TailShaper.h.

◆ next()

template<FloatType T>
T dspark::TailShaper< T >::next ( T  dryLevel)
inlinenoexcept

One sample: the gain for the wet signal.

Parameters
dryLevelThe dry signal's level at this sample (the largest magnitude of its channels).

Definition at line 128 of file TailShaper.h.

◆ prepare()

template<FloatType T>
void dspark::TailShaper< T >::prepare ( double  sampleRate)
inlinenoexcept

Prepares for a sample rate (an invalid one is ignored) and clears.

Definition at line 55 of file TailShaper.h.

◆ reset()

template<FloatType T>
void dspark::TailShaper< T >::reset ( )
inlinenoexcept

Clears the followers; the gate starts open and the dip released.

Definition at line 70 of file TailShaper.h.

◆ setDryDip()

template<FloatType T>
void dspark::TailShaper< T >::setDryDip ( T  dB)
inlinenoexcept

Depth of the dip in dB, 0 to 48 (0, the default, is off).

Definition at line 78 of file TailShaper.h.

◆ setGate()

template<FloatType T>
void dspark::TailShaper< T >::setGate ( T  thresholdDb)
inlinenoexcept

Gate threshold in dB under the dry signal's recent peak, -80 to 0; below -80 the gate is off (the default).

Definition at line 87 of file TailShaper.h.

◆ setGateHold()

template<FloatType T>
void dspark::TailShaper< T >::setGateHold ( T  ms)
inlinenoexcept

Time the gate stays open after the last crossing, 0 to 4000 ms (default 100).

Definition at line 93 of file TailShaper.h.

◆ setGateRelease()

template<FloatType T>
void dspark::TailShaper< T >::setGateRelease ( T  ms)
inlinenoexcept

Time constant of the gate's closing, 5 to 4000 ms (default 150).

Definition at line 99 of file TailShaper.h.

◆ sync()

template<FloatType T>
void dspark::TailShaper< T >::sync ( )
inlinenoexcept

Takes the settings for the next block (audio thread).

Definition at line 110 of file TailShaper.h.


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