5#include "sffdn/audio_buffer.h"
6#include "sffdn/audio_processor.h"
7#include "sffdn/delay.h"
8#include "sffdn/filter.h"
9#include "sffdn/types.h"
49 void SetDelay(
float delay)
noexcept SFFDN_NONBLOCKING;
59 float Tick(
float input)
noexcept SFFDN_NONBLOCKING;
72 float NextOut() noexcept SFFDN_NONBLOCKING;
79 void Advance(
float input) noexcept SFFDN_NONBLOCKING;
89 float TapOut(uint32_t tap) const noexcept SFFDN_NONBLOCKING;
106 bool AddNextInputs(std::span<const
float> input) noexcept SFFDN_NONBLOCKING;
128 std::unique_ptr<AudioProcessor>
Clone()
const override;
131 static constexpr std::size_t kLagrangeOrder = 3;
132 static constexpr std::size_t kLagrangeTapCount = kLagrangeOrder + 1;
143 std::array<float, kLagrangeTapCount> lagrange_coeffs_{};
144 float linear_last_out_;
146 float next_out_ = 0.f;
147 bool has_next_out_ =
false;
Implements a simple allpass filter with differential equation .
Definition filter.h:100
A class representing an audio buffer with multiple channels of non-interleaved audio data.
Definition audio_buffer.h:20
Base class for audio processors.
Definition audio_processor.h:24
Delay line with interpolation.
Definition delay_interp.h:23
void GetNextOutputs(std::span< float > output) noexcept SFFDN_NONBLOCKING
Gets the next output samples from the delay line.
void SetMaximumDelay(uint32_t delay)
Sets the maximum delay for the delay line.
DelayInterp(const DelayOptions &config={})
Constructs a delay line with interpolation.
bool AddNextInputs(std::span< const float > input) noexcept SFFDN_NONBLOCKING
Adds the next input samples to the delay line.
float TapOut(uint32_t tap) const noexcept SFFDN_NONBLOCKING
Taps the delay line at a fixed integer delay, without interpolation.
uint32_t GetMaximumDelay() const
Gets the maximum delay-line length.
void Clear() override
Clears all internal states of the delay line.
float GetDelay() const
Returns the current delay in samples.
std::unique_ptr< AudioProcessor > Clone() const override
Creates a copy of the audio processor.
uint32_t OutputChannelCount() const noexcept SFFDN_NONBLOCKING override
Returns the number of output channels this processor produces.
Definition delay_interp.h:123
uint32_t InputChannelCount() const noexcept SFFDN_NONBLOCKING override
Returns the number of input channels this processor expects.
Definition delay_interp.h:118
float NextOut() noexcept SFFDN_NONBLOCKING
Returns the next output sample without writing a new input sample.
void Process(const AudioBuffer &input, AudioBuffer &output) noexcept SFFDN_NONBLOCKING override
Processes a block of input samples.
void SetDelay(float delay) noexcept SFFDN_NONBLOCKING
Sets the delay for the delay line.
float Tick(float input) noexcept SFFDN_NONBLOCKING
Processes a single sample through the delay line.
void Advance(float input) noexcept SFFDN_NONBLOCKING
Writes the next input sample into the delay line and advances it.
A simple non-interpolating delay line implementation.
Definition delay.h:17
DelayInterpolationType
Types of interpolation for fractional delay lengths.
Definition types.h:67
Options for configuring delays.
Definition types.h:219