5#include "audio_buffer.h"
6#include "audio_processor.h"
27 FDN(uint32_t order, uint32_t block_size = 0,
bool transpose =
false);
32 FDN& operator=(
const FDN&) =
delete;
229 std::unique_ptr<AudioProcessor>
Clone()
const override;
243 std::unique_ptr<AudioProcessor> filter_bank_;
244 std::unique_ptr<AudioProcessor> mixing_matrix_;
246 std::unique_ptr<AudioProcessor> input_gains_;
247 std::unique_ptr<AudioProcessor> output_gains_;
250 uint32_t block_size_;
253 std::vector<float> feedback_;
254 std::vector<float> temp_buffer_;
256 std::unique_ptr<AudioProcessor> tc_filter_;
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 bank of parallel delay lines, each with its own delay setting.
Definition delaybank.h:26
FDN (Feedback Delay Network) class.
Definition fdn.h:18
const DelayBank & GetDelayBank() const
Get the Delay Bank.
AudioProcessor * GetFeedbackMatrix() const
Get the Feedback Matrix AudioProcessor.
AudioProcessor * GetTCFilter() const
Get the Tone Correction Filter AudioProcessor.
bool GetTranspose() const
Get whether the FDN is using transposed configuration.
uint32_t GetOrder() const
Get the FDN's order (number of channels).
FDN(FDN &&) noexcept
Move constructor for the FDN.
bool SetOutputGains(std::unique_ptr< AudioProcessor > gains)
Set the Output Gains AudioProcessor.
AudioProcessor * GetOutputGains() const
Get the Output Gains AudioProcessor.
bool SetTCFilter(std::unique_ptr< AudioProcessor > filter)
Set the Tone Correction Filter AudioProcessor.
bool SetDelayBank(const DelayBankOptions &config)
Set the delay bank.
void SetDirectGain(float gain)
Set the direct gain applied to the input signal when mixed to the output.
std::unique_ptr< AudioProcessor > Clone() const override
Creates a copy of the FDN.
uint32_t InputChannelCount() const override
Returns the number of input channels this processor expects.
Definition fdn.h:208
FDN(uint32_t order, uint32_t block_size=0, bool transpose=false)
Constructs an FDN with a specified order (number of channels).
bool SetLoopFilter(std::unique_ptr< AudioProcessor > filter_bank)
Set the Filter Bank AudioProcessor.
void Process(const AudioBuffer &input, AudioBuffer &output) noexcept override
Process audio buffers.
std::unique_ptr< FDN > CloneFDN() const
Creates a copy of the FDN.
bool SetDelays(const std::span< const float > delays, DelayInterpolationType interpolation_type=DelayInterpolationType::None)
Set the delays.
bool SetInputGains(std::unique_ptr< AudioProcessor > gains)
Set the Input Gains AudioProcessor.
bool SetFeedbackMatrix(std::unique_ptr< AudioProcessor > mixing_matrix)
Set the Feedback Matrix AudioProcessor.
void SetTranspose(bool transpose)
Set whether to use transposed configuration.
AudioProcessor * GetLoopFilter() const
Get the Filter Bank AudioProcessor.
uint32_t OutputChannelCount() const override
Returns the number of output channels this processor produces.
Definition fdn.h:216
void SetOrder(uint32_t order)
Set the number of channels of the FDN.
void Clear() override
Clears the internal state of the FDN.
AudioProcessor * GetInputGains() const
Get the Input Gains AudioProcessor.
DelayInterpolationType
Types of interpolation for fractional delay lengths.
Definition types.h:65
@ None
No interpolation. The delay length will be rounded to the nearest integer value.
Options for configuring a delay bank.
Definition types.h:198