5#include "sffdn/audio_buffer.h"
6#include "sffdn/audio_processor.h"
7#include "sffdn/delay.h"
8#include "sffdn/filterbank.h"
9#include "sffdn/types.h"
81 void ProcessBlock(std::span<const float> in, std::span<float> out);
99 void Tick8(std::span<const float, 8> in, std::span<float, 8> out);
195 bool parallel_ = false;
198std::unique_ptr<
FilterBank> MakeMultichannelSchroederAllpassSection(
A class representing an audio buffer with multiple channels of non-interleaved audio data.
Definition audio_buffer.h:18
Base class for audio processors.
Definition audio_processor.h:23
A simple non-interpolating delay line implementation.
Definition delay.h:16
uint32_t GetDelay(void) const
Returns the current delay in samples.
Definition delay.h:49
Implements a bank of filters.
Definition filterbank.h:19
A section of Schroeder allpass filters in series.
Definition schroeder_allpass.h:104
SchroederAllpassSection(SchroederAllpassSection &&) noexcept
Move constructor for the SchroederAllpassSection.
void SetDelays(std::span< const uint32_t > delays)
Sets the delays for each allpass filter in the section.
SchroederAllpassSection(const SchroederAllpassSectionOptions &config)
Constructs a SchroederAllpassSection with a given configuration.
void SetGains(std::span< const float > gains)
Sets the feedback gains for each allpass filter in the section.
std::unique_ptr< AudioProcessor > Clone() const override
Creates a copy of the SchroederAllpassSection.
void SetGain(float gain)
Sets the feedback gain for all allpass filters in the section.
std::vector< uint32_t > GetDelays() const
Gets the current delays for each allpass filter in the section.
void Process(const AudioBuffer &input, AudioBuffer &output) noexcept override
Processes a block of audio through the section.
void SetFilterCount(uint32_t filter_count)
Sets the number of allpass filters in the section.
uint32_t OutputChannelCount() const override
Gets the number of output channels supported.
void SetParallel(bool parallel)
Sets whether the allpass filters in the section are processed in parallel.
void Clear() override
Clears the internal state of the processor.
SchroederAllpassSection()=default
Constructs an empty SchroederAllpassSection.
uint32_t InputChannelCount() const override
Gets the number of input channels supported.
SchroederAllpassSection(uint32_t filter_count)
Constructs a SchroederAllpassSection with a given number of filters.
std::vector< float > GetGains() const
Gets the current feedback gains for each allpass filter in the section.
A single Schroeder allpass filter.
Definition schroeder_allpass.h:23
void SetDelay(uint32_t delay)
Sets the delay in samples.
SchroederAllpass(uint32_t delay, float g)
Constructs a SchroederAllpass filter.
SchroederAllpass(SchroederAllpass &&)=default
Move constructor for the SchroederAllpass filter.
void Clear()
Clears the filter state.
float GetG() const
Gets the filter gain.
Definition schroeder_allpass.h:65
SchroederAllpass()=default
Constructs a SchroederAllpass filter.
uint32_t GetDelay() const
Gets the current delay in samples.
Definition schroeder_allpass.h:59
void ProcessBlockAccumulate(std::span< const float > in, std::span< float > out)
Processes a block of samples through the filter and accumulates the output.
void ProcessBlock(std::span< const float > in, std::span< float > out)
Processes a block of samples through the filter.
float Tick(float input)
Processes a single sample through the filter.
SchroederAllpass & operator=(SchroederAllpass &&)=default
Move assignment operator for the SchroederAllpass filter.
void SetG(float g)
Sets the feedback gain.
Options for configuring a multichannel bank of Schroeder allpass sections.
Definition types.h:287
Options for configuring a Schroeder allpass section consisting of N Schroeder allpass in series or in...
Definition types.h:276