|
sfFDN
|
A scalar feedback matrix processor. More...
#include <feedback_matrix.h>
Public Member Functions | |
| ScalarFeedbackMatrix (const ScalarFeedbackMatrixOptions &config) | |
| Constructs a scalar feedback matrix. | |
| bool | SetMatrix (std::span< const float > matrix) |
| Sets the matrix coefficients. | |
| bool | GetMatrix (std::span< float > matrix) const |
| Retrieves the matrix coefficients. | |
| void | Process (const AudioBuffer &input, AudioBuffer &output) noexcept SFFDN_NONBLOCKING override |
| Processes the input audio buffer through the feedback matrix. | |
| uint32_t | GetSize () const |
| Returns the size of the square matrix (number of rows/columns). | |
| float | GetCoefficient (uint32_t row, uint32_t col) const |
| Get a specific coefficient from the matrix. | |
| uint32_t | InputChannelCount () const noexcept SFFDN_NONBLOCKING override |
| Returns the number of input channels supported by the processor. | |
| uint32_t | OutputChannelCount () const noexcept SFFDN_NONBLOCKING override |
| Returns the number of output channels produced by the processor. | |
| void | Clear () override |
| Clears the internal state of the processor. | |
| std::unique_ptr< AudioProcessor > | Clone () const override |
| Creates a copy of the scalar feedback matrix. | |
Public Member Functions inherited from sfFDN::AudioProcessor | |
Additional Inherited Members | |
Protected Member Functions inherited from sfFDN::AudioProcessor | |
| AudioProcessor (const AudioProcessor &)=default | |
| AudioProcessor & | operator= (const AudioProcessor &)=default |
| AudioProcessor (AudioProcessor &&) noexcept=default | |
| AudioProcessor & | operator= (AudioProcessor &&) noexcept=default |
A scalar feedback matrix processor.
This processor applies a square feedback matrix to the input audio buffer. The public matrix convention is row-major: flat[row*N+col] = A[row,col], y = A*x.
| sfFDN::ScalarFeedbackMatrix::ScalarFeedbackMatrix | ( | const ScalarFeedbackMatrixOptions & | config | ) |
Constructs a scalar feedback matrix.
| config | The configuration for the scalar feedback matrix. |
|
overridevirtual |
Clears the internal state of the processor.
This is a no-op for ScalarFeedbackMatrix as it has no internal state.
Implements sfFDN::AudioProcessor.
|
overridevirtual |
Creates a copy of the scalar feedback matrix.
Implements sfFDN::AudioProcessor.
| float sfFDN::ScalarFeedbackMatrix::GetCoefficient | ( | uint32_t | row, |
| uint32_t | col ) const |
Get a specific coefficient from the matrix.
Uses the row-major convention: A[row,col] = flat[row*N+col].
| row | The row index (destination) |
| col | The column index (source) |
| bool sfFDN::ScalarFeedbackMatrix::GetMatrix | ( | std::span< float > | matrix | ) | const |
Retrieves the matrix coefficients.
| matrix | A span of size order * order to fill with the matrix coefficients in row-major order: filled[row*N+col] = A[row,col]. |
order * order in size. | uint32_t sfFDN::ScalarFeedbackMatrix::GetSize | ( | ) | const |
Returns the size of the square matrix (number of rows/columns).
|
overridevirtualnoexcept |
Returns the number of input channels supported by the processor.
Implements sfFDN::AudioProcessor.
|
overridevirtualnoexcept |
Returns the number of output channels produced by the processor.
Implements sfFDN::AudioProcessor.
|
overridevirtualnoexcept |
Processes the input audio buffer through the feedback matrix.
| input | AudioBuffer containing the input audio data. The number of channels must match the matrix order returned by GetSize(). |
| output | AudioBuffer to fill with the processed audio data. The number of channels must match the matrix order. |
Implements sfFDN::AudioProcessor.
| bool sfFDN::ScalarFeedbackMatrix::SetMatrix | ( | std::span< const float > | matrix | ) |
Sets the matrix coefficients.
| matrix | A span of matrix coefficients in row-major order: flat[row*N+col] = A[row,col]. The span must contain exactly order * order elements (where order is the value returned by GetSize()). The size of the matrix cannot be changed by this method; passing the wrong number of elements is rejected and leaves the current state unchanged. |