A bounded cascade of stereo Schroeder allpasses with energy-preserving inter-channel coupling. More...
#include <diffusion_network.hpp>
Classes | |
| struct | StageConfig |
| struct | Config |
Public Member Functions | |
| bool | prepare (double sample_rate, double maximum_delay_ms=50.0) |
| bool | configure (const Config &candidate) noexcept |
| bool | prepared () const noexcept |
| double | sample_rate () const noexcept |
| double | maximum_delay_ms () const noexcept |
| const Config & | config () const noexcept |
| int | stage_delay_samples (std::size_t stage, std::size_t channel) const noexcept |
| std::size_t | retained_bytes () const noexcept |
| int | latency_samples () const noexcept |
| Earliest non-zero response. | |
| int | tail_samples () const noexcept |
| -1 denotes the mathematical infinite tail of any recursive allpass. | |
| void | reset () noexcept |
| void | process_sample (SampleType input_left, SampleType input_right, SampleType &output_left, SampleType &output_right) noexcept |
| void | process_block (const SampleType *input_left, const SampleType *input_right, SampleType *output_left, SampleType *output_right, std::size_t sample_count) noexcept |
Static Public Attributes | |
| static constexpr std::size_t | kMaxStages = 8 |
| static constexpr double | kMinimumSampleRate = 1000.0 |
| static constexpr double | kMaximumSampleRate = 768000.0 |
| static constexpr double | kMaximumDelayMs = 100.0 |
| static constexpr double | kMinimumNonzeroAllpassGain = 0.02 |
| static constexpr double | kMaximumAllpassGain = 0.95 |
| static constexpr double | kMinimumNonzeroStereoWidth = 0.02 |
A bounded cascade of stereo Schroeder allpasses with energy-preserving inter-channel coupling.
It smears transients but contains no feedback tank, decay control, damping, modulation, dry path, or reverb policy.
Each scalar allpass is stable for abs(gain) < 1 and has unit magnitude. Each stage then applies an orthonormal stereo rotation. Consequently, the complete network preserves infinite-horizon L2 energy (apart from floating- point roundoff and the shared below-1e-15 tail flush) and cannot create energy through its width control.
prepare() allocates and belongs on the control thread. configure() is a bounded, allocation-free control-thread operation. process_sample(), process_block(), and reset() are bounded, lock-free, and allocation-free. The scalar recurrence is shared with the FDN and CharacterDelay diffusers; this class retains its own contiguous rings because exact one-sample capacity and constant-time logical reset differ from their fractional-delay storage.
|
inlinenoexcept |
|
inlinenodiscardnoexcept |
|
inlinenoexcept |
Earliest non-zero response.
A non-zero allpass coefficient has direct feed-through; a zero coefficient degenerates to a pure delay.
|
inlinenoexcept |
|
inlinenodiscard |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
-1 denotes the mathematical infinite tail of any recursive allpass.
A zero-gain cascade is feed-forward and reports a conservative latest impulse-sample bound instead.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |