A two multiply first order Schroeder allpass filter. More...
#include <marvin_APF.h>
Public Member Functions | |
~LatticeAPF () noexcept=default | |
void | initialise (double sampleRate) |
void | setCoeff (SampleType newCoeff) noexcept |
void | setDelay (SampleType newDelaySamples) noexcept |
SampleType | operator() (SampleType x) noexcept |
void | reset () noexcept |
SampleType | tap (SampleType delaySamples) noexcept |
A two multiply first order Schroeder allpass filter.
|
defaultnoexcept |
void marvin::dsp::filters::LatticeAPF< SampleType >::initialise | ( | double | sampleRate | ) |
Initialises the APF. Ensure this function is called before any calls to the call operator.
sampleRate | The sample rate the filter should use. |
|
nodiscardnoexcept |
Processes the input through the APF, and returns the filtered sample.
x | The sample to filter. |
|
noexcept |
Resets the filter to it's initial state.
|
noexcept |
Sets the feedback/feedforward coefficient to use. At values >= 1, the filter becomes unstable, so be careful!.
Note that the internal coeff
variable this function sets is not atomic, so ensure that this function is either called on the audio thread, or that the audio thread is not running when you call it.
newCoeff | The feedback/feedforward coefficient to use. |
|
noexcept |
Sets the delay to use. Note that the delay line has a somewhat-arbitrary max of sampleRate
samples, so be sure not to set the delay to anything above that.
newDelaySamples | The delay to use, in samples. |
|
nodiscardnoexcept |
Retrieve a given sample-into the delay line, without updating the read head. Niche-ly useful in the case of something like a Dattorro reverb, for example.
delaySamples | The offset from the current read head to read from. |