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

True-stereo 32-line FDN reverb with exact per-band decay and 6 presets. More...

#include <AlgorithmicReverb.h>

Collaboration diagram for dspark::AlgorithmicReverb< T >:

Classes

struct  CachedParams
 Block-cached copies of the atomics read in the sample loop. More...
 
struct  DelayBank
 Equal-size delay lines in one contiguous buffer sharing a write index (every line is written once per sample): at(i, k) is the sample line i received k samples ago. More...
 
struct  Line
 Power-of-two circular delay line: at(k) is the sample pushed k samples ago. More...
 
struct  PresetValues
 
struct  SmoothRandomLFO
 Hermite-interpolated random noise generator for organic modulation. More...
 

Public Types

enum class  Type {
  Room , Hall , Chamber , Plate ,
  Spring , Cathedral
}
 Reverb type presets. More...
 
enum class  Quality { Full , Eco }
 Engine quality / CPU cost trade-off (see setQuality()). More...
 

Public Member Functions

 ~AlgorithmicReverb ()=default
 
void prepare (const AudioSpec &spec)
 Prepares the reverberation engine and allocates required memory.
 
void processBlock (AudioBufferView< T > buffer) noexcept
 Processes an audio block in place with zero allocations.
 
std::pair< T, T > processSample (T input) noexcept
 Processes a single mono sample and returns the wet stereo pair.
 
void reset () noexcept
 Clears all delay lines and filter states and restarts the modulation, snapping any length glide to its target.
 
void setType (Type type) noexcept
 Loads the selected preset baseline.
 
void setQuality (Quality q) noexcept
 Selects the engine quality / CPU cost trade-off.
 
void setDecay (T seconds) noexcept
 Mid-frequency reverberation time in seconds (0.1 - 30).
 
void setMix (T dryWet) noexcept
 Dry/wet mix (0 = dry, 1 = wet).
 
void setSize (T size) noexcept
 Room size (0.01 - 1). Scales the delay lines from 36% to 100% of their base lengths. Changes glide smoothly (with a brief Doppler, like a tape delay), so the size can be automated.
 
void setDamping (T amount) noexcept
 Sets high-frequency damping (0 = bright, 1 = dark).
 
void setPreDelay (T ms) noexcept
 Pre-delay before the early reflections, in ms (0 - 200).
 
void setDiffusion (T amount) noexcept
 Diffusion (0 - 1): the strength of the input, in-loop and output allpass diffusers, and how many of the first early reflections stay discrete (7 at 0, 1 at 1). High values give a smooth, dense onset; low values keep crisp, localisable early echoes. For Type::Spring it sets the strength of the chirp.
 
void setModulation (T amount) noexcept
 Modulation depth (0 - 1) of the delay-line wander. It smears the tail's resonances; 0 is fully static, 1 is a strong chorus. The depth is defined in time and scales with the room size.
 
void setWidth (T width) noexcept
 Sets stereo width of the late reverb tail.
 
void setErToLateDelay (T ms) noexcept
 Extra gap between the early reflections and the late tail, in ms (0 - 200).
 
void setHighDecayMultiplier (T mult) noexcept
 Sets HF decay as a multiplier of mid decay time.
 
void setBassDecayMultiplier (T mult) noexcept
 Sets bass decay as a multiplier of mid decay time.
 
void setHighCrossover (T hz) noexcept
 Frequency where the HF decay transition is centered.
 
void setBassCrossover (T hz) noexcept
 Frequency where the bass decay transition is centered.
 
void setEarlyLevel (T dB) noexcept
 Early reflections level in dB (-60 to +6). 0 dB is the physical balance: the early field then carries the late field's energy density and decay, so the two join on one exponential at any size and decay time.
 
void setLateLevel (T dB) noexcept
 Late tail level in dB (-60 to +6).
 
void setModRate (T hz) noexcept
 Modulation rate in Hz (0.1 - 5); each line wanders at its own multiple.
 
void setToneLowCut (T hz) noexcept
 Sets a post-reverb low-cut filter on the wet signal (12 dB/oct).
 
void setToneHighCut (T hz) noexcept
 Sets a post-reverb high-cut filter on the wet signal (12 dB/oct).
 
Type getType () const noexcept
 
Quality getQuality () const noexcept
 
T getDecay () const noexcept
 
T getMix () const noexcept
 
T getSize () const noexcept
 
T getDamping () const noexcept
 
T getDiffusion () const noexcept
 
T getModulation () const noexcept
 
T getModRate () const noexcept
 
T getPreDelay () const noexcept
 
T getErToLateDelay () const noexcept
 
T getHighDecayMultiplier () const noexcept
 
T getBassDecayMultiplier () const noexcept
 
T getWidth () const noexcept
 
T getHighCrossover () const noexcept
 
T getEarlyLevel () const noexcept
 Early reflections level in dB (as set, or the preset's).
 
T getLateLevel () const noexcept
 Late tail level in dB (as set, or the preset's).
 
T getBassCrossover () const noexcept
 
std::vector< uint8_t > getState () const
 Serializes the parameter state (setup/UI threads; allocates).
 
bool setState (const uint8_t *data, size_t size)
 Restores parameters from a blob (tolerant; rejects foreign ids).
 

Protected Types

enum  : uint32_t {
  kUserDecay = 1u , kUserSize = 2u , kUserDamping = 4u , kUserDiffusion = 8u ,
  kUserBassDecay = 16u , kUserHighXover = 32u , kUserBassXover = 64u , kUserModDepth = 128u ,
  kUserModRate = 256u , kUserEarly = 512u , kUserLate = 1024u , kUserErToLate = 2048u
}
 

Protected Member Functions

int msToSamples (T ms) const noexcept
 
void markUserParam (uint32_t bit) noexcept
 
void drainPendingChanges () noexcept
 Drains deferred parameter changes on the audio thread.
 
void drainTone () noexcept
 
void refreshCachedParams () noexcept
 Pulls the atomic parameters into the block-local cache (audio thread).
 
void controlTick () noexcept
 Control-rate update: glides the line lengths toward their targets, draws the next modulation values and sets the per-sample read-position ramps for the next kCtrl samples.
 
template<int N>
void runFdn (T &lateL, T &lateR, int injLag) noexcept
 One sample of the N-line FDN (compile-time N so the per-line stages vectorize): allpass-interpolated modulated reads, the L/R output sums, Hadamard mix plus rotation, absorption shelves, in-loop allpass, safety limiter, injection, write.
 
template<int Springs, int Stages>
void runSprings (T &lateL, T &lateR, const T(&raw)[2]) noexcept
 One sample of the spring tanks (Type::Spring): six springs per side (one in Eco), all of different lengths.
 
void refreshTopology () noexcept
 Line count of the active engine: the springs, or the FDN size.
 
void processChunk (const T *inL, const T *inR, T *outL, T *outR, int count) noexcept
 Core processing of up to kChunk samples: stereo in, wet stereo out.
 
std::pair< T, T > outputStage (T lateL, T lateR, T earlyL, T earlyR) noexcept
 
void updateAll () noexcept
 
T sizeFactor () const noexcept
 Size factor: size 0 -> 0.35, size 1 -> 1.
 
void updateDelayLengths () noexcept
 
void updateDiffCoeffs () noexcept
 
void updateModulation () noexcept
 
void updateDecayParams () noexcept
 Per-line absorption: Jot mid/high shelf and bass shelf.
 
double calibratedMidDecay () const noexcept
 The loop's DC decay that puts the ISO 3382 mid-frequency reverberation time on the decay setting.
 
void generateERTapsForType (Type type) noexcept
 Regenerates the early-reflection taps for a reverb type (Eco caps the count).
 
void generateERTaps (double minMs, double maxMs, int numTaps) noexcept
 Velvet-noise early field (Valimaki et al.): numTaps sparse +-1 impulses per side between minMs and maxMs, one per slot at a random position, denser as time goes on (density ~ t^0.6, like the rising echo density of a room). The first four are positive discrete reflections. Each tap reads its own side (probability falling from 0.85 to 0.5 over the window, so the field starts lateralised and turns diffuse) or the other. Amplitudes follow a decaying envelope normalised by the local density, so the energy flows smoothly into the late field; later tap groups pass darker absorption low-passes. The taps read the pre-diffused signal, so each reflection is itself a short dense burst.
 
void commitPreset (const PresetValues &p) noexcept
 
void applyPreset (Type type) noexcept
 

Static Protected Member Functions

static double springBaseMs (int s) noexcept
 
static constexpr T lfoRateFactor (int i) noexcept
 
static constexpr uint32_t lfoSeed (int i) noexcept
 
static constexpr T rotRate () noexcept
 
static constexpr T rotRateFactor (int i) noexcept
 
static constexpr uint32_t rotSeed (int i) noexcept
 
static double hash01 (int k, int s) noexcept
 Deterministic hash in [0, 1) for the early-reflection layout.
 
static T levelDb (T gain) noexcept
 Linear gain to dB (a zero gain, a preset's muted early field, reads -120 dB).
 
template<int M>
static void hadamardSmall (T *x) noexcept
 
template<int N, int W, typename O >
static void fwht (T *x) noexcept
 
static void addTap (T *acc, const Line &l, int lag0, T gain, int count) noexcept
 
static const std::vector< uint8_t > & getPrimeSieve () noexcept
 
static int nearestPrime (int n) noexcept
 Smallest prime >= n (lengths only grow by a few samples).
 

Protected Attributes

AudioSpec spec_ {}
 
bool prepared_ = false
 
bool eco_ = false
 
int nLines_ = kMaxLines
 
int ctrlPhase_ = 0
 
std::array< Line, 2 > preDelay_
 
std::array< std::array< Line, kInStages >, 2 > inAP_
 
std::array< std::array< int, kInStages >, 2 > inAPLen_ {}
 
std::array< T, kInStages > inAPCoeff_ {}
 
std::array< Line, 2 > ring_
 allpass-diffused input, feeds the late field
 
std::array< std::array< Line, kOutStages >, 2 > outAP_
 late-field output diffusers
 
std::array< std::array< int, kOutStages >, 2 > outAPLen_ {}
 
T outAPCoeff_ = T(0.5)
 
int numERTaps_ = 0
 
Type erType_ = Type::Room
 
std::array< std::array< int, kMaxERTaps >, 2 > erTap_ {}
 
std::array< std::array< int, kMaxERTaps >, 2 > erChan_ {}
 
std::array< std::array< int, kMaxERTaps >, 2 > erBin_ {}
 
std::array< std::array< T, kMaxERTaps >, 2 > erGain_ {}
 current (gliding) tap gains
 
std::array< std::array< T, kMaxERTaps >, 2 > erGainTarget_ {}
 gains for the current size/decay
 
std::array< T, kERGroups > erShelfGainTarget_ {}
 
T erGlidePerSample_ = T(0.001)
 glide rate of the two (1 / samples)
 
std::array< int, kERGroups+1 > erGroupStart_ {}
 
std::array< T, kERGroups > erShelfGain_ {}
 HF gain of each absorption group.
 
T erShelfCoeff_ = T(0.5)
 one-pole coefficient at the high crossover
 
std::array< std::array< T, kERGroups >, 2 > erLP_ {}
 
std::array< std::array< T, kERGroups >, 2 > erShadowLP_ {}
 
double meanLoopSec_ = 0.1
 mean FDN round trip (s), for the early/late energy match
 
T shadowCoeff_ = T(0)
 
DelayBank lines_
 
std::array< int, kMaxLines > lenTarget_ {}
 prime line lengths (samples)
 
std::array< T, kMaxLines > lenCur_ {}
 gliding length
 
std::array< T, kMaxLines > pos_ {}
 current read position
 
std::array< T, kMaxLines > posInc_ {}
 per-sample ramp
 
std::array< T, kMaxLines > apY1_ {}
 allpass interpolator state
 
std::array< int, kMaxLines > injTap_ {}
 
std::array< T, kMaxLines > injGain_ {}
 sign / sqrt(lines)
 
std::array< T, kMaxLines > outSignL_ {}
 
std::array< T, kMaxLines > outSignR_ {}
 
std::array< SmoothRandomLFO, kMaxLines > lfo_
 
std::array< SmoothRandomLFO, kMaxLines/2 > rotLfo_
 
std::array< T, kMaxLines/2 > rotC_ {}
 
std::array< T, kMaxLines/2 > rotS_ {}
 
T rotDepth_ = T(0)
 
unsigned rotTick_ = 0
 
T modDepthSamples_ = T(0)
 
T glideCoeff_ = T(0)
 
T maxGlideStep_ = T(0)
 
T maxReadPos_ = T(8)
 
bool spring_ = false
 
std::vector< T > springHist_
 
int springP_ = 8
 
int springW_ = 0
 
int springK_ = 5
 
int springStages_ = kSpringStages
 
T springA_ = T(0.5)
 
std::array< std::array< T, 5 >, 2 > springLP_ {}
 b0 b1 b2 a1 a2, two sections
 
std::array< std::array< T, kSprings >, 4 > springLPState_ {}
 [section * 2 + state][spring]
 
DelayBank loopAP_
 
std::array< int, kMaxLines > loopAPLen_ {}
 in-loop allpass target lengths
 
std::array< T, kMaxLines > loopAPCur_ {}
 gliding lengths after a size change
 
bool loopAPGliding_ = false
 
T loopAPCoeff_ = T(0.4)
 
std::array< T, kMaxLines > jotB0_ {}
 
std::array< T, kMaxLines > jotB1_ {}
 
std::array< T, kMaxLines > jotA1_ {}
 
std::array< T, kMaxLines > jotX1_ {}
 
std::array< T, kMaxLines > jotY1_ {}
 
std::array< T, kMaxLines > bassB0_ {}
 
std::array< T, kMaxLines > bassB1_ {}
 
std::array< T, kMaxLines > bassA1_ {}
 
std::array< T, kMaxLines > bassX1_ {}
 
std::array< T, kMaxLines > bassY1_ {}
 
std::array< T, 2 > cohZ_ {}
 side high-pass state (coherent low band)
 
std::array< T, 5 > cohC_ {}
 its coefficients b0 b1 b2 a1 a2
 
std::array< std::array< T, 2 >, 2 > subZ_ {}
 subsonic high-pass states per channel
 
std::array< T, 5 > subC_ {}
 
Biquad< T, 2 > toneLPBiquad_
 
Biquad< T, 2 > toneHPBiquad_
 
bool toneLPActive_ = false
 
bool toneHPActive_ = false
 
DryWetMixer< T > mixer_
 
std::atomic< Type > type_ { Type::Room }
 
std::atomic< T > decayTime_ { T(1) }
 
std::atomic< T > size_ { T(0.5) }
 
std::atomic< T > damping_ { T(0.5) }
 
std::atomic< T > diffusion_ { T(0.7) }
 
std::atomic< T > modDepth_ { T(0.1) }
 
std::atomic< T > modRate_ { T(1) }
 
std::atomic< T > preDelayMs_ { T(0) }
 
std::atomic< T > erToLateMs_ { T(0) }
 
std::atomic< T > mix_ { T(0.3) }
 
std::atomic< T > earlyLevel_ { T(1) }
 
std::atomic< T > lateLevel_ { T(1) }
 
std::atomic< T > width_ { T(1) }
 
std::atomic< T > highDecayMult_ { T(0.5) }
 
std::atomic< T > bassDecayMult_ { T(1.2) }
 
std::atomic< T > highCrossover_ { T(5000) }
 
std::atomic< T > bassCrossover_ { T(200) }
 
std::atomic< Quality > quality_ { Quality::Full }
 
std::atomic< int > preDelaySamples_ { 0 }
 
std::atomic< int > erToLateSamples_ { 0 }
 
std::atomic< bool > presetDirty_ { false }
 
std::atomic< bool > paramsDirty_ { false }
 
std::atomic< bool > qualityDirty_ { false }
 
std::atomic< bool > toneDirty_ { false }
 
std::atomic< T > toneLowCutHz_ { T(-1) }
 
std::atomic< T > toneHighCutHz_ { T(-1) }
 
std::atomic< uint32_t > userParamMask_ { 0u }
 
CachedParams cachedParams_ {}
 

Static Protected Attributes

static constexpr int kMaxLines = 32
 
static constexpr int kEcoLines = 16
 
static constexpr int kInStages = 4
 input diffusers per channel feeding the late field (Full)
 
static constexpr int kMaxERTaps = 128
 early taps per output side: 64 reflections per input (Full)
 
static constexpr int kEcoERTaps = 48
 
static constexpr int kShadowBins = 2
 head-shadow classes of the early taps (open, shadowed)
 
static constexpr int kMaxDiscreteER = 7
 raw (discrete) early taps at diffusion 0
 
static constexpr int kERGroups = 4
 absorption groups (early -> late)
 
static constexpr int kCtrl = 16
 modulation control period (samples)
 
static constexpr int kChunk = 64
 sparse-FIR processing chunk (samples)
 
static constexpr double kMaxPreDelayMs = 200.0
 
static constexpr double kMaxErToLateMs = 200.0
 
static constexpr double kMaxErMs = 170.0
 
static constexpr double kMaxInjectMs = 8.0
 
static constexpr double kMaxInDiffMs = 2.0
 
static constexpr double kMaxLoopApMs = 5.5
 
static constexpr double kCoherenceHz = 355.0
 side high-pass of the late field (2nd order, Q 0.74)
 
static constexpr double kCoherenceQ = 0.74
 
static constexpr double kShadowHz = 1000.0
 head-shadow corner of the early taps
 
static constexpr double kShadowHF = 0.5
 high-frequency gain of a shadowed (far-ear) tap
 
static constexpr double kModMaxMs = 2.0
 
static constexpr double kRotMaxRad = 10.0
 peak rotation angle at modulation 1 (rad)
 
static constexpr double kRotRateHz = 0.35
 
static constexpr int kRotPairStride = 4
 
static constexpr double kGlideMs = 60.0
 size-change glide time constant
 
static constexpr double kMaxGlideSpeed = 0.04
 max length change per sample (4% Doppler)
 
static constexpr double kSubsonicHz = 20.0
 wet-output high-pass (2nd order): no room rings below it
 
static constexpr T kMinReadPos = T(2)
 
static constexpr T kSoftLimit = T(2)
 in-loop safety limiter threshold
 
static constexpr T kOutGain = T(0.25)
 
static constexpr double kBaseDelaysMs_ [kMaxLines]
 
static constexpr double kLoopApMs_ [kMaxLines]
 
static constexpr double kInDiffMs_ [2][kInStages]
 
static constexpr double kInDiffCoeffs_ [kInStages] = { 0.75, 0.72, 0.68, 0.64 }
 
static constexpr int kOutStages = 2
 
static constexpr double kOutDiffMs_ [2][kOutStages]
 
static constexpr double kMeanInjectMs = 4.0
 mean of kInjectMs_
 
static constexpr double kInjectMs_ [kMaxLines]
 
static constexpr int kInjectSign_ [kMaxLines]
 
static constexpr int kOutSignL_ [kMaxLines]
 
static constexpr int kOutSignR_ [kMaxLines]
 
static constexpr int kSprings = 12
 
static constexpr int kEcoSprings = 2
 
static constexpr int kSpringStages = 72
 dispersion allpasses per spring (Full)
 
static constexpr int kEcoSpringStages = 40
 
static constexpr double kSpringJitterMs = 3.0
 
static constexpr double kSpringCutHz = 4400.0
 dispersion band edge (transition frequency)
 
static constexpr T kSpringOutGain = T(2)
 
static constexpr int kPrimeTableMax = 131072
 

Detailed Description

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

True-stereo 32-line FDN reverb with exact per-band decay and 6 presets.

Template Parameters
TSample type (float or double).

Definition at line 225 of file AlgorithmicReverb.h.

Member Enumeration Documentation

◆ anonymous enum

template<FloatType T>
anonymous enum : uint32_t
protected
Enumerator
kUserDecay 
kUserSize 
kUserDamping 
kUserDiffusion 
kUserBassDecay 
kUserHighXover 
kUserBassXover 
kUserModDepth 
kUserModRate 
kUserEarly 
kUserLate 
kUserErToLate 

Definition at line 1286 of file AlgorithmicReverb.h.

◆ Quality

template<FloatType T>
enum class dspark::AlgorithmicReverb::Quality
strong

Engine quality / CPU cost trade-off (see setQuality()).

Enumerator
Full 

Complete 32-line engine. Default.

Eco 

Reduced 8-line engine, about 3x cheaper. For constrained targets.

Definition at line 242 of file AlgorithmicReverb.h.

◆ Type

template<FloatType T>
enum class dspark::AlgorithmicReverb::Type
strong

Reverb type presets.

Enumerator
Room 

Small room, short decay, dense close reflections.

Hall 

Concert hall, spacious, long smooth tail.

Chamber 

Recording studio chamber, warm, balanced.

Plate 

Metal plate, dense shimmer, no early reflections.

Spring 

Spring reverb, bouncy vintage character.

Cathedral 

Large cathedral, immense decay, vast space.

Definition at line 229 of file AlgorithmicReverb.h.

Constructor & Destructor Documentation

◆ ~AlgorithmicReverb()

template<FloatType T>
dspark::AlgorithmicReverb< T >::~AlgorithmicReverb ( )
default

Member Function Documentation

◆ addTap()

template<FloatType T>
static void dspark::AlgorithmicReverb< T >::addTap ( T *  acc,
const Line &  l,
int  lag0,
T  gain,
int  count 
)
inlinestaticprotectednoexcept

Sum of gain * line.at(lag0 - n) over n in [0, count): a sparse-FIR tap applied to a whole chunk, reading contiguous ring memory.

Definition at line 1747 of file AlgorithmicReverb.h.

◆ applyPreset()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::applyPreset ( Type  type)
inlineprotectednoexcept

Definition at line 2403 of file AlgorithmicReverb.h.

◆ calibratedMidDecay()

template<FloatType T>
double dspark::AlgorithmicReverb< T >::calibratedMidDecay ( ) const
inlineprotectednoexcept

The loop's DC decay that puts the ISO 3382 mid-frequency reverberation time on the decay setting.

setDecay() promises T_mid, the mean of the 500 Hz and 1 kHz octave T60s (ISO 3382-1, the number a room is quoted by). The absorption shelves are anchored at DC and at Nyquist, and a first-order shelf spans several octaves: the HF shelf already shortens 1 kHz and the bass shelf still lengthens 500 Hz. With the DC anchor at the setting, T_mid measured 11.7% short on Cathedral and 3 to 9% short elsewhere. So the DC anchor is solved for instead: the loop T60 at 500 Hz and 1 kHz is evaluated from the exact shelf responses at the mean loop length, and the DC decay is rescaled until their mean equals the setting (the HF and bass targets stay proportional to it, as the multipliers say). Four fixed-point steps converge to far below a percent.

Definition at line 2129 of file AlgorithmicReverb.h.

◆ commitPreset()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::commitPreset ( const PresetValues &  p)
inlineprotectednoexcept

Definition at line 2384 of file AlgorithmicReverb.h.

◆ controlTick()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::controlTick ( )
inlineprotectednoexcept

Control-rate update: glides the line lengths toward their targets, draws the next modulation values and sets the per-sample read-position ramps for the next kCtrl samples.

Definition at line 1383 of file AlgorithmicReverb.h.

◆ drainPendingChanges()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::drainPendingChanges ( )
inlineprotectednoexcept

Drains deferred parameter changes on the audio thread.

The acquire-ordered exchanges synchronize with the release stores in the setters. Each flag is pre-checked with a plain load so the per-sample path pays no read-modify-write when nothing is pending.

Definition at line 1318 of file AlgorithmicReverb.h.

◆ drainTone()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::drainTone ( )
inlineprotectednoexcept

Definition at line 1351 of file AlgorithmicReverb.h.

◆ fwht()

template<FloatType T>
template<int N, int W, typename O >
static void dspark::AlgorithmicReverb< T >::fwht ( T *  x)
inlinestaticprotectednoexcept

In-place unnormalised fast Walsh-Hadamard transform of N values (in-vector strides unrolled scalar, the rest in SIMD).

Definition at line 1447 of file AlgorithmicReverb.h.

◆ generateERTaps()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::generateERTaps ( double  minMs,
double  maxMs,
int  numTaps 
)
inlineprotectednoexcept

Velvet-noise early field (Valimaki et al.): numTaps sparse +-1 impulses per side between minMs and maxMs, one per slot at a random position, denser as time goes on (density ~ t^0.6, like the rising echo density of a room). The first four are positive discrete reflections. Each tap reads its own side (probability falling from 0.85 to 0.5 over the window, so the field starts lateralised and turns diffuse) or the other. Amplitudes follow a decaying envelope normalised by the local density, so the energy flows smoothly into the late field; later tap groups pass darker absorption low-passes. The taps read the pre-diffused signal, so each reflection is itself a short dense burst.

Definition at line 2217 of file AlgorithmicReverb.h.

◆ generateERTapsForType()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::generateERTapsForType ( Type  type)
inlineprotectednoexcept

Regenerates the early-reflection taps for a reverb type (Eco caps the count).

Definition at line 2190 of file AlgorithmicReverb.h.

◆ getBassCrossover()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getBassCrossover ( ) const
inlinenoexcept

Definition at line 811 of file AlgorithmicReverb.h.

◆ getBassDecayMultiplier()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getBassDecayMultiplier ( ) const
inlinenoexcept

Definition at line 804 of file AlgorithmicReverb.h.

◆ getDamping()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getDamping ( ) const
inlinenoexcept

Definition at line 797 of file AlgorithmicReverb.h.

◆ getDecay()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getDecay ( ) const
inlinenoexcept

Definition at line 794 of file AlgorithmicReverb.h.

◆ getDiffusion()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getDiffusion ( ) const
inlinenoexcept

Definition at line 798 of file AlgorithmicReverb.h.

◆ getEarlyLevel()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getEarlyLevel ( ) const
inlinenoexcept

Early reflections level in dB (as set, or the preset's).

Definition at line 808 of file AlgorithmicReverb.h.

◆ getErToLateDelay()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getErToLateDelay ( ) const
inlinenoexcept

Definition at line 802 of file AlgorithmicReverb.h.

◆ getHighCrossover()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getHighCrossover ( ) const
inlinenoexcept

Definition at line 806 of file AlgorithmicReverb.h.

◆ getHighDecayMultiplier()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getHighDecayMultiplier ( ) const
inlinenoexcept

Definition at line 803 of file AlgorithmicReverb.h.

◆ getLateLevel()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getLateLevel ( ) const
inlinenoexcept

Late tail level in dB (as set, or the preset's).

Definition at line 810 of file AlgorithmicReverb.h.

◆ getMix()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getMix ( ) const
inlinenoexcept

Definition at line 795 of file AlgorithmicReverb.h.

◆ getModRate()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getModRate ( ) const
inlinenoexcept

Definition at line 800 of file AlgorithmicReverb.h.

◆ getModulation()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getModulation ( ) const
inlinenoexcept

Definition at line 799 of file AlgorithmicReverb.h.

◆ getPreDelay()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getPreDelay ( ) const
inlinenoexcept

Definition at line 801 of file AlgorithmicReverb.h.

◆ getPrimeSieve()

template<FloatType T>
static const std::vector< uint8_t > & dspark::AlgorithmicReverb< T >::getPrimeSieve ( )
inlinestaticprotectednoexcept

Definition at line 2339 of file AlgorithmicReverb.h.

◆ getQuality()

template<FloatType T>
Quality dspark::AlgorithmicReverb< T >::getQuality ( ) const
inlinenoexcept

Definition at line 793 of file AlgorithmicReverb.h.

◆ getSize()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getSize ( ) const
inlinenoexcept

Definition at line 796 of file AlgorithmicReverb.h.

◆ getState()

template<FloatType T>
std::vector< uint8_t > dspark::AlgorithmicReverb< T >::getState ( ) const
inline

Serializes the parameter state (setup/UI threads; allocates).

Definition at line 814 of file AlgorithmicReverb.h.

◆ getType()

template<FloatType T>
Type dspark::AlgorithmicReverb< T >::getType ( ) const
inlinenoexcept

Definition at line 792 of file AlgorithmicReverb.h.

◆ getWidth()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::getWidth ( ) const
inlinenoexcept

Definition at line 805 of file AlgorithmicReverb.h.

◆ hadamardSmall()

template<FloatType T>
template<int M>
static void dspark::AlgorithmicReverb< T >::hadamardSmall ( T *  x)
inlinestaticprotectednoexcept

Unnormalised M-point Sylvester Hadamard transform in place, fully unrolled at compile time (the halves, then one butterfly stage).

Definition at line 1428 of file AlgorithmicReverb.h.

◆ hash01()

template<FloatType T>
static double dspark::AlgorithmicReverb< T >::hash01 ( int  k,
int  s 
)
inlinestaticprotectednoexcept

Deterministic hash in [0, 1) for the early-reflection layout.

Definition at line 1129 of file AlgorithmicReverb.h.

◆ levelDb()

template<FloatType T>
static T dspark::AlgorithmicReverb< T >::levelDb ( T  gain)
inlinestaticprotectednoexcept

Linear gain to dB (a zero gain, a preset's muted early field, reads -120 dB).

Definition at line 1137 of file AlgorithmicReverb.h.

◆ lfoRateFactor()

template<FloatType T>
static constexpr T dspark::AlgorithmicReverb< T >::lfoRateFactor ( int  i)
inlinestaticconstexprprotectednoexcept

Definition at line 1110 of file AlgorithmicReverb.h.

◆ lfoSeed()

template<FloatType T>
static constexpr uint32_t dspark::AlgorithmicReverb< T >::lfoSeed ( int  i)
inlinestaticconstexprprotectednoexcept

Definition at line 1114 of file AlgorithmicReverb.h.

◆ markUserParam()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::markUserParam ( uint32_t  bit)
inlineprotectednoexcept

Definition at line 1293 of file AlgorithmicReverb.h.

◆ msToSamples()

template<FloatType T>
int dspark::AlgorithmicReverb< T >::msToSamples ( T  ms) const
inlineprotectednoexcept

Definition at line 1142 of file AlgorithmicReverb.h.

◆ nearestPrime()

template<FloatType T>
static int dspark::AlgorithmicReverb< T >::nearestPrime ( int  n)
inlinestaticprotectednoexcept

Smallest prime >= n (lengths only grow by a few samples).

Definition at line 2356 of file AlgorithmicReverb.h.

◆ outputStage()

template<FloatType T>
std::pair< T, T > dspark::AlgorithmicReverb< T >::outputStage ( T  lateL,
T  lateR,
T  earlyL,
T  earlyR 
)
inlineprotectednoexcept

Per-sample output stage: coherent low band, width, early + late, DC block, tone EQ.

Definition at line 1883 of file AlgorithmicReverb.h.

◆ prepare()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::prepare ( const AudioSpec &  spec)
inline

Prepares the reverberation engine and allocates required memory.

Must be called before processing. An invalid spec (non-positive or non-finite fields) is a no-op that keeps the previous state.

Parameters
specAudio specification detailing sample rate and maximum block size.

Definition at line 260 of file AlgorithmicReverb.h.

◆ processBlock()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::processBlock ( AudioBufferView< T >  buffer)
inlinenoexcept

Processes an audio block in place with zero allocations.

Stereo buffers are reverberated in true stereo; a mono buffer feeds both inputs and receives the average of the two outputs. Extra channels beyond two are left untouched.

Parameters
bufferView of the audio buffers (mono or stereo).

Definition at line 352 of file AlgorithmicReverb.h.

◆ processChunk()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::processChunk ( const T *  inL,
const T *  inR,
T *  outL,
T *  outR,
int  count 
)
inlineprotectednoexcept

Core processing of up to kChunk samples: stereo in, wet stereo out.

The sparse FIRs (velvet pre-diffuser and early field) run tap by tap over the whole chunk, on contiguous ring memory; the late field and the output stage run per sample.

Definition at line 1766 of file AlgorithmicReverb.h.

◆ processSample()

template<FloatType T>
std::pair< T, T > dspark::AlgorithmicReverb< T >::processSample ( T  input)
inlinenoexcept

Processes a single mono sample and returns the wet stereo pair.

The input feeds both reverb inputs; the result is the wet signal only (the mix is not applied). Pending parameter, preset and quality changes are drained here too.

Parameters
inputThe mono input sample to reverberate.
Returns
The {Left, Right} reverberated output.

Definition at line 406 of file AlgorithmicReverb.h.

◆ refreshCachedParams()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::refreshCachedParams ( )
inlineprotectednoexcept

Pulls the atomic parameters into the block-local cache (audio thread).

Definition at line 1369 of file AlgorithmicReverb.h.

◆ refreshTopology()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::refreshTopology ( )
inlineprotectednoexcept

Line count of the active engine: the springs, or the FDN size.

Definition at line 1740 of file AlgorithmicReverb.h.

◆ reset()

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

Clears all delay lines and filter states and restarts the modulation, snapping any length glide to its target.

Definition at line 423 of file AlgorithmicReverb.h.

◆ rotRate()

template<FloatType T>
static constexpr T dspark::AlgorithmicReverb< T >::rotRate ( )
inlinestaticconstexprprotectednoexcept

Definition at line 1118 of file AlgorithmicReverb.h.

◆ rotRateFactor()

template<FloatType T>
static constexpr T dspark::AlgorithmicReverb< T >::rotRateFactor ( int  i)
inlinestaticconstexprprotectednoexcept

Definition at line 1119 of file AlgorithmicReverb.h.

◆ rotSeed()

template<FloatType T>
static constexpr uint32_t dspark::AlgorithmicReverb< T >::rotSeed ( int  i)
inlinestaticconstexprprotectednoexcept

Definition at line 1123 of file AlgorithmicReverb.h.

◆ runFdn()

template<FloatType T>
template<int N>
void dspark::AlgorithmicReverb< T >::runFdn ( T &  lateL,
T &  lateR,
int  injLag 
)
inlineprotectednoexcept

One sample of the N-line FDN (compile-time N so the per-line stages vectorize): allpass-interpolated modulated reads, the L/R output sums, Hadamard mix plus rotation, absorption shelves, in-loop allpass, safety limiter, injection, write.

Definition at line 1469 of file AlgorithmicReverb.h.

◆ runSprings()

template<FloatType T>
template<int Springs, int Stages>
void dspark::AlgorithmicReverb< T >::runSprings ( T &  lateL,
T &  lateR,
const T(&)  raw[2] 
)
inlineprotectednoexcept

One sample of the spring tanks (Type::Spring): six springs per side (one in Eco), all of different lengths.

Each spring is a feedback loop after Valimaki, Parker & Abel (2010): the round-trip delay line (modulated, allpass-interpolated like the FDN lines), a cascade of stretched first-order allpasses (a + z^-K) / (1 + a z^-K) whose group delay rises from DC to the transition frequency fs / (2K) (the characteristic chirp, re-dispersed on every round trip), a 4th-order band limit just below fs / (2K), and the same exact-T60 absorption shelves as the FDN. Even springs feed the left output and hear mostly the left input, odd ones the right; six springs of different lengths per side, with a little round-trip jitter, keep the sparse modes of a single loop (the metallic ring of long decays) from dominating. Each spring's band-limited chirp train is its output. setDiffusion() sets the chirp strength here.

Definition at line 1635 of file AlgorithmicReverb.h.

◆ setBassCrossover()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setBassCrossover ( T  hz)
inlinenoexcept

Frequency where the bass decay transition is centered.

A first-order shelf per line gives the bass T60 exactly at DC and leaves the mid band untouched; its geometric midpoint lands here.

Parameters
hzCrossover in Hz (50 - 500). Default: 200.

Definition at line 723 of file AlgorithmicReverb.h.

◆ setBassDecayMultiplier()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setBassDecayMultiplier ( T  mult)
inlinenoexcept

Sets bass decay as a multiplier of mid decay time.

0.5 = bass decays 2x faster (tight). 1.0 = bass same as mid (neutral). 1.5 = bass lingers 1.5x longer (natural large room). 2.0 = bass lingers 2x longer (boomy).

Parameters
multMultiplier (0.3 - 3.0).

Definition at line 684 of file AlgorithmicReverb.h.

◆ setDamping()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setDamping ( T  amount)
inlinenoexcept

Sets high-frequency damping (0 = bright, 1 = dark).

Maps internally to highDecayMultiplier: 0->1.0 (HF=mid), 1->0.1 (HF 10x faster). For finer control, use setHighDecayMultiplier() directly.

Definition at line 576 of file AlgorithmicReverb.h.

◆ setDecay()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setDecay ( T  seconds)
inlinenoexcept

Mid-frequency reverberation time in seconds (0.1 - 30).

The ISO 3382-1 T_mid: the mean of the 500 Hz and 1 kHz octave-band T60s, the figure a hall is quoted by. The bass and high bands decay at the multiples setBassDecayMultiplier() and setHighDecayMultiplier() set, relative to the same calibration. Measured over the six types at their default damping, T_mid lands within 3% of this value.

Definition at line 537 of file AlgorithmicReverb.h.

◆ setDiffusion()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setDiffusion ( T  amount)
inlinenoexcept

Diffusion (0 - 1): the strength of the input, in-loop and output allpass diffusers, and how many of the first early reflections stay discrete (7 at 0, 1 at 1). High values give a smooth, dense onset; low values keep crisp, localisable early echoes. For Type::Spring it sets the strength of the chirp.

Definition at line 603 of file AlgorithmicReverb.h.

◆ setEarlyLevel()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setEarlyLevel ( T  dB)
inlinenoexcept

Early reflections level in dB (-60 to +6). 0 dB is the physical balance: the early field then carries the late field's energy density and decay, so the two join on one exponential at any size and decay time.

Definition at line 742 of file AlgorithmicReverb.h.

◆ setErToLateDelay()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setErToLateDelay ( T  ms)
inlinenoexcept

Extra gap between the early reflections and the late tail, in ms (0 - 200).

Definition at line 640 of file AlgorithmicReverb.h.

◆ setHighCrossover()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setHighCrossover ( T  hz)
inlinenoexcept

Frequency where the HF decay transition is centered.

The per-line absorption is a first-order pole-zero shelf pinned to the mid decay at DC and the HF decay at Nyquist (the T60 anchors stay exact for any crossover); this sets where the transition happens: the decay midpoint (geometric mean of the mid and HF loop gains) lands at this frequency. Lower values darken the tail earlier, higher values keep the damping in the top octaves only.

Parameters
hzCrossover in Hz (1000 - 16000). Default: 5000. Non-finite values are ignored.

Definition at line 706 of file AlgorithmicReverb.h.

◆ setHighDecayMultiplier()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setHighDecayMultiplier ( T  mult)
inlinenoexcept

Sets HF decay as a multiplier of mid decay time.

0.1 = HF decays 10x faster (very dark). 0.5 = HF decays 2x faster (natural room). 1.0 = HF same as mid (bright/metallic).

Parameters
multMultiplier (0.05 - 1.0).

Definition at line 663 of file AlgorithmicReverb.h.

◆ setLateLevel()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setLateLevel ( T  dB)
inlinenoexcept

Late tail level in dB (-60 to +6).

Definition at line 750 of file AlgorithmicReverb.h.

◆ setMix()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setMix ( T  dryWet)
inlinenoexcept

Dry/wet mix (0 = dry, 1 = wet).

Definition at line 547 of file AlgorithmicReverb.h.

◆ setModRate()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setModRate ( T  hz)
inlinenoexcept

Modulation rate in Hz (0.1 - 5); each line wanders at its own multiple.

Definition at line 758 of file AlgorithmicReverb.h.

◆ setModulation()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setModulation ( T  amount)
inlinenoexcept

Modulation depth (0 - 1) of the delay-line wander. It smears the tail's resonances; 0 is fully static, 1 is a strong chorus. The depth is defined in time and scales with the room size.

Definition at line 616 of file AlgorithmicReverb.h.

◆ setPreDelay()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setPreDelay ( T  ms)
inlinenoexcept

Pre-delay before the early reflections, in ms (0 - 200).

Definition at line 587 of file AlgorithmicReverb.h.

◆ setQuality()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setQuality ( Quality  q)
inlinenoexcept

Selects the engine quality / CPU cost trade-off.

Quality::Full (default) runs the complete engine. Quality::Eco runs at about 55% of its CPU for embedded and other constrained targets, with the same controls, decay calibration and loudness:

  • 16 FDN lines instead of 32 (every other base delay, so the lines still span the full range; per-line decay gains keep every T60 exact)
  • 24 early reflections per input instead of 64
  • one spring per side instead of six, with a 40-stage dispersion cascade instead of 72 (a stronger coefficient keeps the chirp)

Half the modal density is the audible difference: long, exposed tails (a slow decay on sparse material) ring a little more, and the build-up is slightly less dense; short and mid rooms sound almost the same.

Like setType(), this is an engine-mode switch, not an automation target: it is applied at the start of the next processBlock() and clears the reverb state (the running tail is dropped).

Parameters
qQuality::Full or Quality::Eco.

Definition at line 521 of file AlgorithmicReverb.h.

◆ setSize()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setSize ( T  size)
inlinenoexcept

Room size (0.01 - 1). Scales the delay lines from 36% to 100% of their base lengths. Changes glide smoothly (with a brief Doppler, like a tape delay), so the size can be automated.

Definition at line 562 of file AlgorithmicReverb.h.

◆ setState()

template<FloatType T>
bool dspark::AlgorithmicReverb< T >::setState ( const uint8_t *  data,
size_t  size 
)
inline

Restores parameters from a blob (tolerant; rejects foreign ids).

Definition at line 841 of file AlgorithmicReverb.h.

◆ setToneHighCut()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setToneHighCut ( T  hz)
inlinenoexcept

Sets a post-reverb high-cut filter on the wet signal (12 dB/oct).

Parameters
hzCutoff in Hz (0 = off, 2000-16000 typical).

Definition at line 781 of file AlgorithmicReverb.h.

◆ setToneLowCut()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setToneLowCut ( T  hz)
inlinenoexcept

Sets a post-reverb low-cut filter on the wet signal (12 dB/oct).

Parameters
hzCutoff in Hz (0 = off, 20-500 typical).

Definition at line 770 of file AlgorithmicReverb.h.

◆ setType()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setType ( Type  type)
inlinenoexcept

Loads the selected preset baseline.

Call setDecay(), setSize() and other parameter setters after setType() when those values should override the selected preset. Applied at the start of the next processBlock(); the running tail is cleared.

Definition at line 484 of file AlgorithmicReverb.h.

◆ setWidth()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::setWidth ( T  width)
inlinenoexcept

Sets stereo width of the late reverb tail.

Uses M/S processing: 0 = mono, 1 = natural stereo, 2 = extra wide. Applied to the late tail (its low band stays coherent), before the early reflections are added.

Parameters
widthStereo width (0.0 - 2.0). Default: 1.0.

Definition at line 633 of file AlgorithmicReverb.h.

◆ sizeFactor()

template<FloatType T>
T dspark::AlgorithmicReverb< T >::sizeFactor ( ) const
inlineprotectednoexcept

Size factor: size 0 -> 0.35, size 1 -> 1.

Definition at line 1967 of file AlgorithmicReverb.h.

◆ springBaseMs()

template<FloatType T>
static double dspark::AlgorithmicReverb< T >::springBaseMs ( int  s)
inlinestaticprotectednoexcept

Round-trip time of spring s at the reference size: spread over 33-60 ms with a little irregularity, interleaved between the sides.

Definition at line 994 of file AlgorithmicReverb.h.

◆ updateAll()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::updateAll ( )
inlineprotectednoexcept

Definition at line 1952 of file AlgorithmicReverb.h.

◆ updateDecayParams()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::updateDecayParams ( )
inlineprotectednoexcept

Per-line absorption: Jot mid/high shelf and bass shelf.

Both are first-order sections from the bilinear transform of H(s) = (s + a) / (s + b) (prewarped at the crossover): H(z) = ((1 + a) + (a - 1) z^-1) / ((1 + b) + (b - 1) z^-1). Jot: gHigh * H with a = K sqrt(gMid/gHigh), b = K sqrt(gHigh/gMid), so |H(1)| = gMid and |H(-1)| = gHigh exactly. Bass: a = K sqrt(r), b = K / sqrt(r) with r = gBass / gMid, so the DC gain is r and the Nyquist gain 1. Each midpoint (geometric mean) lands on its crossover. The loop length includes the in-loop allpass (its mean group delay equals its length).

Definition at line 2061 of file AlgorithmicReverb.h.

◆ updateDelayLengths()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::updateDelayLengths ( )
inlineprotectednoexcept

Definition at line 1972 of file AlgorithmicReverb.h.

◆ updateDiffCoeffs()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::updateDiffCoeffs ( )
inlineprotectednoexcept

Definition at line 2008 of file AlgorithmicReverb.h.

◆ updateModulation()

template<FloatType T>
void dspark::AlgorithmicReverb< T >::updateModulation ( )
inlineprotectednoexcept

Definition at line 2028 of file AlgorithmicReverb.h.

Member Data Documentation

◆ apY1_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::apY1_ {}
protected

allpass interpolator state

Definition at line 1188 of file AlgorithmicReverb.h.

◆ bassA1_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::bassA1_ {}
protected

Definition at line 1227 of file AlgorithmicReverb.h.

◆ bassB0_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::bassB0_ {}
protected

Definition at line 1227 of file AlgorithmicReverb.h.

◆ bassB1_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::bassB1_ {}
protected

Definition at line 1227 of file AlgorithmicReverb.h.

◆ bassCrossover_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::bassCrossover_ { T(200) }
protected

Definition at line 1267 of file AlgorithmicReverb.h.

◆ bassDecayMult_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::bassDecayMult_ { T(1.2) }
protected

Definition at line 1265 of file AlgorithmicReverb.h.

◆ bassX1_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::bassX1_ {}
protected

Definition at line 1227 of file AlgorithmicReverb.h.

◆ bassY1_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::bassY1_ {}
protected

Definition at line 1227 of file AlgorithmicReverb.h.

◆ cachedParams_

template<FloatType T>
CachedParams dspark::AlgorithmicReverb< T >::cachedParams_ {}
protected

Definition at line 1305 of file AlgorithmicReverb.h.

◆ cohC_

template<FloatType T>
std::array<T, 5> dspark::AlgorithmicReverb< T >::cohC_ {}
protected

its coefficients b0 b1 b2 a1 a2

Definition at line 1231 of file AlgorithmicReverb.h.

◆ cohZ_

template<FloatType T>
std::array<T, 2> dspark::AlgorithmicReverb< T >::cohZ_ {}
protected

side high-pass state (coherent low band)

Definition at line 1230 of file AlgorithmicReverb.h.

◆ ctrlPhase_

template<FloatType T>
int dspark::AlgorithmicReverb< T >::ctrlPhase_ = 0
protected

Definition at line 1153 of file AlgorithmicReverb.h.

◆ damping_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::damping_ { T(0.5) }
protected

Definition at line 1253 of file AlgorithmicReverb.h.

◆ decayTime_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::decayTime_ { T(1) }
protected

Definition at line 1251 of file AlgorithmicReverb.h.

◆ diffusion_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::diffusion_ { T(0.7) }
protected

Definition at line 1254 of file AlgorithmicReverb.h.

◆ earlyLevel_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::earlyLevel_ { T(1) }
protected

Definition at line 1260 of file AlgorithmicReverb.h.

◆ eco_

template<FloatType T>
bool dspark::AlgorithmicReverb< T >::eco_ = false
protected

Definition at line 1151 of file AlgorithmicReverb.h.

◆ erBin_

template<FloatType T>
std::array<std::array<int, kMaxERTaps>, 2> dspark::AlgorithmicReverb< T >::erBin_ {}
protected

Definition at line 1169 of file AlgorithmicReverb.h.

◆ erChan_

template<FloatType T>
std::array<std::array<int, kMaxERTaps>, 2> dspark::AlgorithmicReverb< T >::erChan_ {}
protected

Definition at line 1169 of file AlgorithmicReverb.h.

◆ erGain_

template<FloatType T>
std::array<std::array<T, kMaxERTaps>, 2> dspark::AlgorithmicReverb< T >::erGain_ {}
protected

current (gliding) tap gains

Definition at line 1170 of file AlgorithmicReverb.h.

◆ erGainTarget_

template<FloatType T>
std::array<std::array<T, kMaxERTaps>, 2> dspark::AlgorithmicReverb< T >::erGainTarget_ {}
protected

gains for the current size/decay

Definition at line 1171 of file AlgorithmicReverb.h.

◆ erGlidePerSample_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::erGlidePerSample_ = T(0.001)
protected

glide rate of the two (1 / samples)

Definition at line 1173 of file AlgorithmicReverb.h.

◆ erGroupStart_

template<FloatType T>
std::array<int, kERGroups + 1> dspark::AlgorithmicReverb< T >::erGroupStart_ {}
protected

Definition at line 1174 of file AlgorithmicReverb.h.

◆ erLP_

template<FloatType T>
std::array<std::array<T, kERGroups>, 2> dspark::AlgorithmicReverb< T >::erLP_ {}
protected

Definition at line 1177 of file AlgorithmicReverb.h.

◆ erShadowLP_

template<FloatType T>
std::array<std::array<T, kERGroups>, 2> dspark::AlgorithmicReverb< T >::erShadowLP_ {}
protected

Definition at line 1178 of file AlgorithmicReverb.h.

◆ erShelfCoeff_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::erShelfCoeff_ = T(0.5)
protected

one-pole coefficient at the high crossover

Definition at line 1176 of file AlgorithmicReverb.h.

◆ erShelfGain_

template<FloatType T>
std::array<T, kERGroups> dspark::AlgorithmicReverb< T >::erShelfGain_ {}
protected

HF gain of each absorption group.

Definition at line 1175 of file AlgorithmicReverb.h.

◆ erShelfGainTarget_

template<FloatType T>
std::array<T, kERGroups> dspark::AlgorithmicReverb< T >::erShelfGainTarget_ {}
protected

Definition at line 1172 of file AlgorithmicReverb.h.

◆ erTap_

template<FloatType T>
std::array<std::array<int, kMaxERTaps>, 2> dspark::AlgorithmicReverb< T >::erTap_ {}
protected

Definition at line 1169 of file AlgorithmicReverb.h.

◆ erToLateMs_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::erToLateMs_ { T(0) }
protected

Definition at line 1258 of file AlgorithmicReverb.h.

◆ erToLateSamples_

template<FloatType T>
std::atomic<int> dspark::AlgorithmicReverb< T >::erToLateSamples_ { 0 }
protected

Definition at line 1272 of file AlgorithmicReverb.h.

◆ erType_

template<FloatType T>
Type dspark::AlgorithmicReverb< T >::erType_ = Type::Room
protected

Definition at line 1168 of file AlgorithmicReverb.h.

◆ glideCoeff_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::glideCoeff_ = T(0)
protected

Definition at line 1201 of file AlgorithmicReverb.h.

◆ highCrossover_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::highCrossover_ { T(5000) }
protected

Definition at line 1266 of file AlgorithmicReverb.h.

◆ highDecayMult_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::highDecayMult_ { T(0.5) }
protected

Definition at line 1264 of file AlgorithmicReverb.h.

◆ inAP_

template<FloatType T>
std::array<std::array<Line, kInStages>, 2> dspark::AlgorithmicReverb< T >::inAP_
protected

Definition at line 1157 of file AlgorithmicReverb.h.

◆ inAPCoeff_

template<FloatType T>
std::array<T, kInStages> dspark::AlgorithmicReverb< T >::inAPCoeff_ {}
protected

Definition at line 1159 of file AlgorithmicReverb.h.

◆ inAPLen_

template<FloatType T>
std::array<std::array<int, kInStages>, 2> dspark::AlgorithmicReverb< T >::inAPLen_ {}
protected

Definition at line 1158 of file AlgorithmicReverb.h.

◆ injGain_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::injGain_ {}
protected

sign / sqrt(lines)

Definition at line 1190 of file AlgorithmicReverb.h.

◆ injTap_

template<FloatType T>
std::array<int, kMaxLines> dspark::AlgorithmicReverb< T >::injTap_ {}
protected

Definition at line 1189 of file AlgorithmicReverb.h.

◆ jotA1_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::jotA1_ {}
protected

Definition at line 1226 of file AlgorithmicReverb.h.

◆ jotB0_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::jotB0_ {}
protected

Definition at line 1226 of file AlgorithmicReverb.h.

◆ jotB1_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::jotB1_ {}
protected

Definition at line 1226 of file AlgorithmicReverb.h.

◆ jotX1_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::jotX1_ {}
protected

Definition at line 1226 of file AlgorithmicReverb.h.

◆ jotY1_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::jotY1_ {}
protected

Definition at line 1226 of file AlgorithmicReverb.h.

◆ kBaseDelaysMs_

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kBaseDelaysMs_[kMaxLines]
staticconstexprprotected
Initial value:
= {
44.5, 46.5, 49.7, 52.3, 56.1, 58.9, 61.9, 65.2,
68.6, 73.7, 76.2, 79.8, 86.4, 89.8, 95.7, 101.2,
105.4, 112.5, 116.7, 126.4, 132.1, 140.6, 146.9, 154.1,
162.9, 175.8, 184.1, 192.8, 204.0, 218.5, 224.2, 240.1
}

Definition at line 920 of file AlgorithmicReverb.h.

◆ kChunk

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kChunk = 64
staticconstexprprotected

sparse-FIR processing chunk (samples)

Definition at line 883 of file AlgorithmicReverb.h.

◆ kCoherenceHz

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kCoherenceHz = 355.0
staticconstexprprotected

side high-pass of the late field (2nd order, Q 0.74)

Definition at line 891 of file AlgorithmicReverb.h.

◆ kCoherenceQ

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kCoherenceQ = 0.74
staticconstexprprotected

Definition at line 892 of file AlgorithmicReverb.h.

◆ kCtrl

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kCtrl = 16
staticconstexprprotected

modulation control period (samples)

Definition at line 882 of file AlgorithmicReverb.h.

◆ kEcoERTaps

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kEcoERTaps = 48
staticconstexprprotected

Definition at line 878 of file AlgorithmicReverb.h.

◆ kEcoLines

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kEcoLines = 16
staticconstexprprotected

Definition at line 875 of file AlgorithmicReverb.h.

◆ kEcoSprings

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kEcoSprings = 2
staticconstexprprotected

Definition at line 988 of file AlgorithmicReverb.h.

◆ kEcoSpringStages

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kEcoSpringStages = 40
staticconstexprprotected

Definition at line 990 of file AlgorithmicReverb.h.

◆ kERGroups

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kERGroups = 4
staticconstexprprotected

absorption groups (early -> late)

Definition at line 881 of file AlgorithmicReverb.h.

◆ kGlideMs

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kGlideMs = 60.0
staticconstexprprotected

size-change glide time constant

Definition at line 906 of file AlgorithmicReverb.h.

◆ kInDiffCoeffs_

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kInDiffCoeffs_[kInStages] = { 0.75, 0.72, 0.68, 0.64 }
staticconstexprprotected

Definition at line 944 of file AlgorithmicReverb.h.

◆ kInDiffMs_

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kInDiffMs_[2][kInStages]
staticconstexprprotected
Initial value:
= {
{ 0.36, 0.69, 1.10, 1.65 },
{ 0.43, 0.80, 1.20, 1.79 }
}

Definition at line 940 of file AlgorithmicReverb.h.

◆ kInjectMs_

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kInjectMs_[kMaxLines]
staticconstexprprotected
Initial value:
= {
7.14, 3.31, 0.76, 0.25, 5.86, 2.04, 4.84, 5.35,
5.61, 6.88, 0.00, 7.65, 2.80, 1.02, 7.90, 1.53,
1.27, 4.33, 6.63, 2.55, 3.06, 6.12, 5.10, 6.37,
3.82, 1.78, 3.57, 7.39, 2.29, 0.51, 4.08, 4.59
}

Definition at line 957 of file AlgorithmicReverb.h.

◆ kInjectSign_

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kInjectSign_[kMaxLines]
staticconstexprprotected
Initial value:
= {
1, 1, -1, 1, -1, 1, 1, -1,
-1, 1, 1, -1, 1, -1, 1, 1,
1, 1, 1, -1, 1, 1, 1, 1,
1, -1, 1, 1, -1, 1, -1, -1
}

Definition at line 963 of file AlgorithmicReverb.h.

◆ kInStages

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kInStages = 4
staticconstexprprotected

input diffusers per channel feeding the late field (Full)

Definition at line 876 of file AlgorithmicReverb.h.

◆ kLoopApMs_

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kLoopApMs_[kMaxLines]
staticconstexprprotected
Initial value:
= {
3.55, 1.47, 3.80, 1.96, 1.84, 2.33, 4.41, 4.90,
1.10, 1.35, 4.29, 3.43, 4.16, 4.53, 2.08, 3.06,
1.22, 2.94, 3.92, 3.18, 2.57, 4.04, 4.65, 2.45,
2.69, 4.78, 3.67, 1.71, 2.20, 1.59, 2.82, 3.31
}

Definition at line 929 of file AlgorithmicReverb.h.

◆ kMaxDiscreteER

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kMaxDiscreteER = 7
staticconstexprprotected

raw (discrete) early taps at diffusion 0

Definition at line 880 of file AlgorithmicReverb.h.

◆ kMaxErMs

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kMaxErMs = 170.0
staticconstexprprotected

Definition at line 887 of file AlgorithmicReverb.h.

◆ kMaxERTaps

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kMaxERTaps = 128
staticconstexprprotected

early taps per output side: 64 reflections per input (Full)

Definition at line 877 of file AlgorithmicReverb.h.

◆ kMaxErToLateMs

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kMaxErToLateMs = 200.0
staticconstexprprotected

Definition at line 886 of file AlgorithmicReverb.h.

◆ kMaxGlideSpeed

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kMaxGlideSpeed = 0.04
staticconstexprprotected

max length change per sample (4% Doppler)

Definition at line 907 of file AlgorithmicReverb.h.

◆ kMaxInDiffMs

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kMaxInDiffMs = 2.0
staticconstexprprotected

Definition at line 889 of file AlgorithmicReverb.h.

◆ kMaxInjectMs

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kMaxInjectMs = 8.0
staticconstexprprotected

Definition at line 888 of file AlgorithmicReverb.h.

◆ kMaxLines

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kMaxLines = 32
staticconstexprprotected

Definition at line 874 of file AlgorithmicReverb.h.

◆ kMaxLoopApMs

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kMaxLoopApMs = 5.5
staticconstexprprotected

Definition at line 890 of file AlgorithmicReverb.h.

◆ kMaxPreDelayMs

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kMaxPreDelayMs = 200.0
staticconstexprprotected

Definition at line 885 of file AlgorithmicReverb.h.

◆ kMeanInjectMs

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kMeanInjectMs = 4.0
staticconstexprprotected

mean of kInjectMs_

Definition at line 955 of file AlgorithmicReverb.h.

◆ kMinReadPos

template<FloatType T>
constexpr T dspark::AlgorithmicReverb< T >::kMinReadPos = T(2)
staticconstexprprotected

Definition at line 909 of file AlgorithmicReverb.h.

◆ kModMaxMs

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kModMaxMs = 2.0
staticconstexprprotected

peak line wander at modulation 1, size 1

Definition at line 895 of file AlgorithmicReverb.h.

◆ kOutDiffMs_

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kOutDiffMs_[2][kOutStages]
staticconstexprprotected
Initial value:
= {
{ 1.13, 2.41 },
{ 1.31, 2.67 }
}

Definition at line 950 of file AlgorithmicReverb.h.

◆ kOutGain

template<FloatType T>
constexpr T dspark::AlgorithmicReverb< T >::kOutGain = T(0.25)
staticconstexprprotected

Wet output scale: calibrated so the steady-state level matches the previous engine's (and Full matches Eco within a fraction of a dB).

Definition at line 914 of file AlgorithmicReverb.h.

◆ kOutSignL_

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kOutSignL_[kMaxLines]
staticconstexprprotected
Initial value:
= {
-1, -1, 1, -1, -1, 1, 1, 1,
-1, -1, 1, 1, -1, -1, -1, 1,
-1, -1, 1, -1, -1, 1, 1, -1,
1, 1, -1, -1, -1, -1, -1, 1
}

Definition at line 972 of file AlgorithmicReverb.h.

◆ kOutSignR_

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kOutSignR_[kMaxLines]
staticconstexprprotected
Initial value:
= {
-1, 1, 1, 1, -1, -1, 1, -1,
-1, 1, 1, -1, -1, 1, -1, -1,
-1, 1, 1, 1, -1, -1, 1, 1,
1, -1, -1, 1, -1, 1, -1, -1
}

Definition at line 978 of file AlgorithmicReverb.h.

◆ kOutStages

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kOutStages = 2
staticconstexprprotected

Definition at line 949 of file AlgorithmicReverb.h.

◆ kPrimeTableMax

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kPrimeTableMax = 131072
staticconstexprprotected

Definition at line 2337 of file AlgorithmicReverb.h.

◆ kRotMaxRad

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kRotMaxRad = 10.0
staticconstexprprotected

peak rotation angle at modulation 1 (rad)

Time-varying mixing matrix: Givens rotations of line pairs, their angle scaled by the modulation amount (the Hall's 0.10 gives 1 rad) at a fixed slow rate - a rotation spreads every frequency alike, so it stays slow whatever the line-wander rate.

Definition at line 900 of file AlgorithmicReverb.h.

◆ kRotPairStride

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kRotPairStride = 4
staticconstexprprotected

Rotation partner of line i is i XOR 4: both carry the same L*R sign in the output sums and the same input side, so turning them never tilts the stereo image (checked in the test suite).

Definition at line 905 of file AlgorithmicReverb.h.

◆ kRotRateHz

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kRotRateHz = 0.35
staticconstexprprotected

base rate of the pair rotations

Definition at line 901 of file AlgorithmicReverb.h.

◆ kShadowBins

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kShadowBins = 2
staticconstexprprotected

head-shadow classes of the early taps (open, shadowed)

Definition at line 879 of file AlgorithmicReverb.h.

◆ kShadowHF

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kShadowHF = 0.5
staticconstexprprotected

high-frequency gain of a shadowed (far-ear) tap

Definition at line 894 of file AlgorithmicReverb.h.

◆ kShadowHz

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kShadowHz = 1000.0
staticconstexprprotected

head-shadow corner of the early taps

Definition at line 893 of file AlgorithmicReverb.h.

◆ kSoftLimit

template<FloatType T>
constexpr T dspark::AlgorithmicReverb< T >::kSoftLimit = T(2)
staticconstexprprotected

in-loop safety limiter threshold

Definition at line 910 of file AlgorithmicReverb.h.

◆ kSpringCutHz

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kSpringCutHz = 4400.0
staticconstexprprotected

dispersion band edge (transition frequency)

Definition at line 998 of file AlgorithmicReverb.h.

◆ kSpringJitterMs

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kSpringJitterMs = 3.0
staticconstexprprotected

delay jitter at modulation 1

Definition at line 991 of file AlgorithmicReverb.h.

◆ kSpringOutGain

template<FloatType T>
constexpr T dspark::AlgorithmicReverb< T >::kSpringOutGain = T(2)
staticconstexprprotected

Definition at line 999 of file AlgorithmicReverb.h.

◆ kSprings

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kSprings = 12
staticconstexprprotected

Definition at line 987 of file AlgorithmicReverb.h.

◆ kSpringStages

template<FloatType T>
constexpr int dspark::AlgorithmicReverb< T >::kSpringStages = 72
staticconstexprprotected

dispersion allpasses per spring (Full)

Definition at line 989 of file AlgorithmicReverb.h.

◆ kSubsonicHz

template<FloatType T>
constexpr double dspark::AlgorithmicReverb< T >::kSubsonicHz = 20.0
staticconstexprprotected

wet-output high-pass (2nd order): no room rings below it

Definition at line 908 of file AlgorithmicReverb.h.

◆ lateLevel_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::lateLevel_ { T(1) }
protected

Definition at line 1261 of file AlgorithmicReverb.h.

◆ lenCur_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::lenCur_ {}
protected

gliding length

Definition at line 1185 of file AlgorithmicReverb.h.

◆ lenTarget_

template<FloatType T>
std::array<int, kMaxLines> dspark::AlgorithmicReverb< T >::lenTarget_ {}
protected

prime line lengths (samples)

Definition at line 1184 of file AlgorithmicReverb.h.

◆ lfo_

template<FloatType T>
std::array<SmoothRandomLFO, kMaxLines> dspark::AlgorithmicReverb< T >::lfo_
protected

Definition at line 1192 of file AlgorithmicReverb.h.

◆ lines_

template<FloatType T>
DelayBank dspark::AlgorithmicReverb< T >::lines_
protected

Definition at line 1183 of file AlgorithmicReverb.h.

◆ loopAP_

template<FloatType T>
DelayBank dspark::AlgorithmicReverb< T >::loopAP_
protected

Definition at line 1219 of file AlgorithmicReverb.h.

◆ loopAPCoeff_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::loopAPCoeff_ = T(0.4)
protected

Definition at line 1223 of file AlgorithmicReverb.h.

◆ loopAPCur_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::loopAPCur_ {}
protected

gliding lengths after a size change

Definition at line 1221 of file AlgorithmicReverb.h.

◆ loopAPGliding_

template<FloatType T>
bool dspark::AlgorithmicReverb< T >::loopAPGliding_ = false
protected

Definition at line 1222 of file AlgorithmicReverb.h.

◆ loopAPLen_

template<FloatType T>
std::array<int, kMaxLines> dspark::AlgorithmicReverb< T >::loopAPLen_ {}
protected

in-loop allpass target lengths

Definition at line 1220 of file AlgorithmicReverb.h.

◆ maxGlideStep_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::maxGlideStep_ = T(0)
protected

Definition at line 1202 of file AlgorithmicReverb.h.

◆ maxReadPos_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::maxReadPos_ = T(8)
protected

Definition at line 1203 of file AlgorithmicReverb.h.

◆ meanLoopSec_

template<FloatType T>
double dspark::AlgorithmicReverb< T >::meanLoopSec_ = 0.1
protected

mean FDN round trip (s), for the early/late energy match

Definition at line 1179 of file AlgorithmicReverb.h.

◆ mix_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::mix_ { T(0.3) }
protected

Definition at line 1259 of file AlgorithmicReverb.h.

◆ mixer_

template<FloatType T>
DryWetMixer<T> dspark::AlgorithmicReverb< T >::mixer_
protected

Definition at line 1241 of file AlgorithmicReverb.h.

◆ modDepth_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::modDepth_ { T(0.1) }
protected

Definition at line 1255 of file AlgorithmicReverb.h.

◆ modDepthSamples_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::modDepthSamples_ = T(0)
protected

Definition at line 1200 of file AlgorithmicReverb.h.

◆ modRate_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::modRate_ { T(1) }
protected

Definition at line 1256 of file AlgorithmicReverb.h.

◆ nLines_

template<FloatType T>
int dspark::AlgorithmicReverb< T >::nLines_ = kMaxLines
protected

Definition at line 1152 of file AlgorithmicReverb.h.

◆ numERTaps_

template<FloatType T>
int dspark::AlgorithmicReverb< T >::numERTaps_ = 0
protected

Definition at line 1167 of file AlgorithmicReverb.h.

◆ outAP_

template<FloatType T>
std::array<std::array<Line, kOutStages>, 2> dspark::AlgorithmicReverb< T >::outAP_
protected

late-field output diffusers

Definition at line 1161 of file AlgorithmicReverb.h.

◆ outAPCoeff_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::outAPCoeff_ = T(0.5)
protected

Definition at line 1163 of file AlgorithmicReverb.h.

◆ outAPLen_

template<FloatType T>
std::array<std::array<int, kOutStages>, 2> dspark::AlgorithmicReverb< T >::outAPLen_ {}
protected

Definition at line 1162 of file AlgorithmicReverb.h.

◆ outSignL_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::outSignL_ {}
protected

Definition at line 1191 of file AlgorithmicReverb.h.

◆ outSignR_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::outSignR_ {}
protected

Definition at line 1191 of file AlgorithmicReverb.h.

◆ paramsDirty_

template<FloatType T>
std::atomic<bool> dspark::AlgorithmicReverb< T >::paramsDirty_ { false }
protected

Definition at line 1275 of file AlgorithmicReverb.h.

◆ pos_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::pos_ {}
protected

current read position

Definition at line 1186 of file AlgorithmicReverb.h.

◆ posInc_

template<FloatType T>
std::array<T, kMaxLines> dspark::AlgorithmicReverb< T >::posInc_ {}
protected

per-sample ramp

Definition at line 1187 of file AlgorithmicReverb.h.

◆ preDelay_

template<FloatType T>
std::array<Line, 2> dspark::AlgorithmicReverb< T >::preDelay_
protected

Definition at line 1156 of file AlgorithmicReverb.h.

◆ preDelayMs_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::preDelayMs_ { T(0) }
protected

Definition at line 1257 of file AlgorithmicReverb.h.

◆ preDelaySamples_

template<FloatType T>
std::atomic<int> dspark::AlgorithmicReverb< T >::preDelaySamples_ { 0 }
protected

Definition at line 1271 of file AlgorithmicReverb.h.

◆ prepared_

template<FloatType T>
bool dspark::AlgorithmicReverb< T >::prepared_ = false
protected

Definition at line 1150 of file AlgorithmicReverb.h.

◆ presetDirty_

template<FloatType T>
std::atomic<bool> dspark::AlgorithmicReverb< T >::presetDirty_ { false }
protected

Definition at line 1274 of file AlgorithmicReverb.h.

◆ quality_

template<FloatType T>
std::atomic<Quality> dspark::AlgorithmicReverb< T >::quality_ { Quality::Full }
protected

Definition at line 1269 of file AlgorithmicReverb.h.

◆ qualityDirty_

template<FloatType T>
std::atomic<bool> dspark::AlgorithmicReverb< T >::qualityDirty_ { false }
protected

Definition at line 1276 of file AlgorithmicReverb.h.

◆ ring_

template<FloatType T>
std::array<Line, 2> dspark::AlgorithmicReverb< T >::ring_
protected

allpass-diffused input, feeds the late field

Definition at line 1160 of file AlgorithmicReverb.h.

◆ rotC_

template<FloatType T>
std::array<T, kMaxLines / 2> dspark::AlgorithmicReverb< T >::rotC_ {}
protected

Definition at line 1196 of file AlgorithmicReverb.h.

◆ rotDepth_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::rotDepth_ = T(0)
protected

Definition at line 1198 of file AlgorithmicReverb.h.

◆ rotLfo_

template<FloatType T>
std::array<SmoothRandomLFO, kMaxLines / 2> dspark::AlgorithmicReverb< T >::rotLfo_
protected

Definition at line 1195 of file AlgorithmicReverb.h.

◆ rotS_

template<FloatType T>
std::array<T, kMaxLines / 2> dspark::AlgorithmicReverb< T >::rotS_ {}
protected

Definition at line 1197 of file AlgorithmicReverb.h.

◆ rotTick_

template<FloatType T>
unsigned dspark::AlgorithmicReverb< T >::rotTick_ = 0
protected

Definition at line 1199 of file AlgorithmicReverb.h.

◆ shadowCoeff_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::shadowCoeff_ = T(0)
protected

Definition at line 1180 of file AlgorithmicReverb.h.

◆ size_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::size_ { T(0.5) }
protected

Definition at line 1252 of file AlgorithmicReverb.h.

◆ spec_

template<FloatType T>
AudioSpec dspark::AlgorithmicReverb< T >::spec_ {}
protected

Definition at line 1149 of file AlgorithmicReverb.h.

◆ spring_

template<FloatType T>
bool dspark::AlgorithmicReverb< T >::spring_ = false
protected

Definition at line 1208 of file AlgorithmicReverb.h.

◆ springA_

template<FloatType T>
T dspark::AlgorithmicReverb< T >::springA_ = T(0.5)
protected

Definition at line 1214 of file AlgorithmicReverb.h.

◆ springHist_

template<FloatType T>
std::vector<T> dspark::AlgorithmicReverb< T >::springHist_
protected

Definition at line 1209 of file AlgorithmicReverb.h.

◆ springK_

template<FloatType T>
int dspark::AlgorithmicReverb< T >::springK_ = 5
protected

Definition at line 1212 of file AlgorithmicReverb.h.

◆ springLP_

template<FloatType T>
std::array<std::array<T, 5>, 2> dspark::AlgorithmicReverb< T >::springLP_ {}
protected

b0 b1 b2 a1 a2, two sections

Definition at line 1215 of file AlgorithmicReverb.h.

◆ springLPState_

template<FloatType T>
std::array<std::array<T, kSprings>, 4> dspark::AlgorithmicReverb< T >::springLPState_ {}
protected

[section * 2 + state][spring]

Definition at line 1216 of file AlgorithmicReverb.h.

◆ springP_

template<FloatType T>
int dspark::AlgorithmicReverb< T >::springP_ = 8
protected

Definition at line 1210 of file AlgorithmicReverb.h.

◆ springStages_

template<FloatType T>
int dspark::AlgorithmicReverb< T >::springStages_ = kSpringStages
protected

Definition at line 1213 of file AlgorithmicReverb.h.

◆ springW_

template<FloatType T>
int dspark::AlgorithmicReverb< T >::springW_ = 0
protected

Definition at line 1211 of file AlgorithmicReverb.h.

◆ subC_

template<FloatType T>
std::array<T, 5> dspark::AlgorithmicReverb< T >::subC_ {}
protected

Definition at line 1233 of file AlgorithmicReverb.h.

◆ subZ_

template<FloatType T>
std::array<std::array<T, 2>, 2> dspark::AlgorithmicReverb< T >::subZ_ {}
protected

subsonic high-pass states per channel

Definition at line 1232 of file AlgorithmicReverb.h.

◆ toneDirty_

template<FloatType T>
std::atomic<bool> dspark::AlgorithmicReverb< T >::toneDirty_ { false }
protected

Definition at line 1277 of file AlgorithmicReverb.h.

◆ toneHighCutHz_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::toneHighCutHz_ { T(-1) }
protected

Definition at line 1279 of file AlgorithmicReverb.h.

◆ toneHPActive_

template<FloatType T>
bool dspark::AlgorithmicReverb< T >::toneHPActive_ = false
protected

Definition at line 1239 of file AlgorithmicReverb.h.

◆ toneHPBiquad_

template<FloatType T>
Biquad<T, 2> dspark::AlgorithmicReverb< T >::toneHPBiquad_
protected

Definition at line 1237 of file AlgorithmicReverb.h.

◆ toneLowCutHz_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::toneLowCutHz_ { T(-1) }
protected

Definition at line 1278 of file AlgorithmicReverb.h.

◆ toneLPActive_

template<FloatType T>
bool dspark::AlgorithmicReverb< T >::toneLPActive_ = false
protected

Definition at line 1238 of file AlgorithmicReverb.h.

◆ toneLPBiquad_

template<FloatType T>
Biquad<T, 2> dspark::AlgorithmicReverb< T >::toneLPBiquad_
protected

Definition at line 1236 of file AlgorithmicReverb.h.

◆ type_

template<FloatType T>
std::atomic<Type> dspark::AlgorithmicReverb< T >::type_ { Type::Room }
protected

Definition at line 1250 of file AlgorithmicReverb.h.

◆ userParamMask_

template<FloatType T>
std::atomic<uint32_t> dspark::AlgorithmicReverb< T >::userParamMask_ { 0u }
protected

Definition at line 1292 of file AlgorithmicReverb.h.

◆ width_

template<FloatType T>
std::atomic<T> dspark::AlgorithmicReverb< T >::width_ { T(1) }
protected

Definition at line 1262 of file AlgorithmicReverb.h.


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