|
sfFDN
|
An energy-preserving Schroeder allpass with a fixed delay and optionally modulated gain. More...
#include <schroeder_allpass.h>
Public Member Functions | |
| TimeVaryingSchroederAllpass (uint32_t delay, float gain, const ModulationOptions &modulation) | |
| Constructs an allpass with sinusoidal gain modulation. | |
| void | SetDelay (uint32_t delay) |
| Sets the fixed integer delay in samples. | |
| uint32_t | GetDelay () const noexcept SFFDN_NONBLOCKING |
| Returns the delay in samples. | |
| float | GetG () const noexcept SFFDN_NONBLOCKING |
| Returns the base gain. | |
| float | Tick (float input) noexcept SFFDN_NONBLOCKING |
| Processes one sample using the configured sinusoidally modulated gain. | |
| float | Tick (float input, float gain) noexcept SFFDN_NONBLOCKING |
| Processes one sample with an explicit valid gain in the open interval (-1, 1). | |
| void | ProcessBlock (std::span< const float > in, std::span< float > out) noexcept SFFDN_NONBLOCKING |
| Processes a block using the configured sinusoidally modulated gain. | |
| void | ProcessBlockAccumulate (std::span< const float > in, std::span< float > out) noexcept SFFDN_NONBLOCKING |
Processes a block and accumulates the result in out. | |
| void | Clear () |
| Clears the delay state and restores the configured modulation phase. | |
An energy-preserving Schroeder allpass with a fixed delay and optionally modulated gain.
The gain-varying path uses the normalized Type V recurrence:
\[ y = c w - g x,\quad u = c x + g w,\quad c = \sqrt{1 - g^2}. \]
The delay remains an integer number of samples, so every valid instantaneous gain applies an orthogonal transformation to the input and delayed sample.
| sfFDN::TimeVaryingSchroederAllpass::TimeVaryingSchroederAllpass | ( | uint32_t | delay, |
| float | gain, | ||
| const ModulationOptions & | modulation ) |
Constructs an allpass with sinusoidal gain modulation.
abs(gain) + abs(modulation.amplitude) must be strictly less than one. | void sfFDN::TimeVaryingSchroederAllpass::SetDelay | ( | uint32_t | delay | ) |
Sets the fixed integer delay in samples.
| std::invalid_argument | if delay is zero. |
|
noexcept |
Processes one sample with an explicit valid gain in the open interval (-1, 1).
This overload is useful for externally scheduled gain trajectories. It does not alter the configured modulation state.