sfFDN
Loading...
Searching...
No Matches
sfFDN::FilterFeedbackMatrix Class Reference

A filter feedback matrix processor. More...

#include <filter_feedback_matrix.h>

Inheritance diagram for sfFDN::FilterFeedbackMatrix:
[legend]
Collaboration diagram for sfFDN::FilterFeedbackMatrix:
[legend]

Public Member Functions

 FilterFeedbackMatrix (const CascadedFeedbackMatrixOptions &options)
 Constructs a filter feedback matrix with a specified number of channels.
 
 FilterFeedbackMatrix (const FilterFeedbackMatrix &other)=delete
 
FilterFeedbackMatrixoperator= (const FilterFeedbackMatrix &other)=delete
 
 FilterFeedbackMatrix (FilterFeedbackMatrix &&other) noexcept
 Move constructor for the filter feedback matrix.
 
FilterFeedbackMatrixoperator= (FilterFeedbackMatrix &&other) noexcept
 Move assignment operator for the filter feedback matrix.
 
void Process (const AudioBuffer &input, AudioBuffer &output) noexcept override
 Processes the input audio buffer and produces the output audio buffer.
 
uint32_t InputChannelCount () const override
 Returns the number of input channels supported by this processor.
 
uint32_t OutputChannelCount () const override
 Returns the number of output channels produced by this processor.
 
void Clear () override
 Clears the internal state of the processor.
 
void PrintInfo () const
 Prints information about the filter feedback matrix to the standard output.
 
bool GetFirstMatrix (std::span< float > matrix) const
 Retrieves the coefficients of the first feedback matrix in the cascade.
 
std::unique_ptr< AudioProcessorClone () const override
 Creates a copy of the filter feedback matrix.
 
- Public Member Functions inherited from sfFDN::AudioProcessor

Detailed Description

A filter feedback matrix processor.

This processor implements a filter feedback matrix as described in [1]

Structure: Input──[D₀]──[U₁]──[D₂]──[U₂]──...──[Uₖ]──[Dₖ]──Output Where: Dᵢ = delay bank, Uᵢ = mixing matrix, K = number of stages

[1] S. J. Schlecht and E. A. P. Habets, “Scattering in feedback delay networks,” IEEE/ACM Transactions on Audio, Speech, and Language Processing, vol. 28, June 2020.

Constructor & Destructor Documentation

◆ FilterFeedbackMatrix() [1/2]

sfFDN::FilterFeedbackMatrix::FilterFeedbackMatrix ( const CascadedFeedbackMatrixOptions & options)

Constructs a filter feedback matrix with a specified number of channels.

Parameters
optionsThe information structure containing channel and stage counts, delays, and matrices.

◆ FilterFeedbackMatrix() [2/2]

sfFDN::FilterFeedbackMatrix::FilterFeedbackMatrix ( FilterFeedbackMatrix && other)
noexcept

Move constructor for the filter feedback matrix.

Parameters
otherThe filter feedback matrix to move from.

Member Function Documentation

◆ Clear()

void sfFDN::FilterFeedbackMatrix::Clear ( )
overridevirtual

Clears the internal state of the processor.

This function clears the internal state of all delay banks.

Implements sfFDN::AudioProcessor.

◆ Clone()

std::unique_ptr< AudioProcessor > sfFDN::FilterFeedbackMatrix::Clone ( ) const
overridevirtual

Creates a copy of the filter feedback matrix.

Returns
A unique pointer to the cloned filter feedback matrix.

Implements sfFDN::AudioProcessor.

◆ GetFirstMatrix()

bool sfFDN::FilterFeedbackMatrix::GetFirstMatrix ( std::span< float > matrix) const

Retrieves the coefficients of the first feedback matrix in the cascade.

Parameters
matrixA span to fill with the coefficients of the first feedback matrix in column-major order. The span must be of size channel_count_ * channel_count_.
Returns
true if the coefficients were retrieved successfully, false otherwise (e.g. if the size is incorrect).

◆ InputChannelCount()

uint32_t sfFDN::FilterFeedbackMatrix::InputChannelCount ( ) const
inlineoverridevirtual

Returns the number of input channels supported by this processor.

Returns
The number of input channels.

Implements sfFDN::AudioProcessor.

◆ operator=()

FilterFeedbackMatrix & sfFDN::FilterFeedbackMatrix::operator= ( FilterFeedbackMatrix && other)
noexcept

Move assignment operator for the filter feedback matrix.

Parameters
otherThe filter feedback matrix to move from.
Returns
A reference to the assigned filter feedback matrix.

◆ OutputChannelCount()

uint32_t sfFDN::FilterFeedbackMatrix::OutputChannelCount ( ) const
inlineoverridevirtual

Returns the number of output channels produced by this processor.

Returns
The number of output channels.

Implements sfFDN::AudioProcessor.

◆ Process()

void sfFDN::FilterFeedbackMatrix::Process ( const AudioBuffer & input,
AudioBuffer & output )
overridevirtualnoexcept

Processes the input audio buffer and produces the output audio buffer.

Parameters
inputAudioBuffer containing the input audio data. The number of channels must match the channel count.
outputAudioBuffer containing the output audio data. The number of channels must match the channel count.

Implements sfFDN::AudioProcessor.


The documentation for this class was generated from the following file: