#include <gain_matrix.hpp>
|
| GainMatrix (std::size_t numberOfInputs, std::size_t numberOfOutputs, std::size_t blockLength, std::size_t interpolationSteps, ElementType initialValue=static_cast< ElementType >(0.0), std::size_t alignment=0) |
|
| GainMatrix (std::size_t numberOfInputs, std::size_t numberOfOutputs, std::size_t blockLength, std::size_t interpolationSteps, efl::BasicMatrix< ElementType > const &initialGains, std::size_t alignment=0) |
|
| ~GainMatrix () |
|
void | process (ElementType const *const *input, ElementType *const *output) |
|
void | process (ElementType const *const *input, ElementType *const *output, efl::BasicMatrix< ElementType > const &newGains) |
|
void | setNewGains (efl::BasicMatrix< ElementType > const &newGains) |
|
template<typename ElementType>
class visr::rbbl::GainMatrix< ElementType >
Processing component to apply a potentially time-varying gain matrix operation to a vector of audio input signals, producing a vector output signals
- Template Parameters
-
ElementType | The data type used for the audio samples and the gain values. Class is explicitly instantiated for element types float and double. |
◆ GainMatrix() [1/2]
template<typename ElementType >
visr::rbbl::GainMatrix< ElementType >::GainMatrix |
( |
std::size_t |
numberOfInputs, |
|
|
std::size_t |
numberOfOutputs, |
|
|
std::size_t |
blockLength, |
|
|
std::size_t |
interpolationSteps, |
|
|
ElementType |
initialValue = static_cast<ElementType>(0.0) , |
|
|
std::size_t |
alignment = 0 |
|
) |
| |
|
explicit |
Constructor, sets all matrix gains to common value (default: 0.0)
- Parameters
-
numberOfInputs | The number of input channels of the audio processor, i.e., the number of columns of the matrix. |
numberOfOutputs | The number of output channels of the audio processor, i.e., the number of rows of the matrix. |
blockLength | The number of samples in each input or output channel processed in each invocation of process() |
interpolationSteps | The duration of a transition to a new set of gain value, specified in samples. Must be an integer multiple of the blockLength parameter. |
initialValue | The initial value (linear scale) for all gain values in the matrix. |
alignment | the minimum alignment for the input and output vectors as well as the internally stored data members, given as a number of samples. |
◆ GainMatrix() [2/2]
template<typename ElementType >
visr::rbbl::GainMatrix< ElementType >::GainMatrix |
( |
std::size_t |
numberOfInputs, |
|
|
std::size_t |
numberOfOutputs, |
|
|
std::size_t |
blockLength, |
|
|
std::size_t |
interpolationSteps, |
|
|
efl::BasicMatrix< ElementType > const & |
initialGains, |
|
|
std::size_t |
alignment = 0 |
|
) |
| |
|
explicit |
Constructor, sets matrix gains according to a given matrix.
- Parameters
-
numberOfInputs | The number of input channels of the audio processor, i.e., the number of columns of the matrix. |
numberOfOutputs | The number of output channels of the audio processor, i.e., the number of rows of the matrix. |
blockLength | The number of samples in each input or output channel processed in each invocation of process() |
interpolationSteps | The duration of a transition to a new set of gain value, specified in samples. Must be an integer multiple of the blockLength parameter. |
initialGains | The initial matrix gains (in linear scale). Must be a matrix with dimension numberOfOutputs * numberOfInputs . |
alignment | The minimum alignment for the input and output vectors as well as the internally stored data members, given as a number of samples. |
◆ ~GainMatrix()
template<typename ElementType >
◆ process() [1/2]
template<typename ElementType >
void visr::rbbl::GainMatrix< ElementType >::process |
( |
ElementType const *const * |
input, |
|
|
ElementType *const * |
output |
|
) |
| |
Process multichannel audio by matrixing the number of blockLength
samples (specified in the constructor) from each input channel to the range of the output channels. If a new set of gain values has been set previously, the transition to the new value will continue. After that, matrixing will be performed using the new gain values.
- Parameters
-
| input | A range of arrays containing the input sample vectors. Must be numberOfInputs elements long, and each sample vector must contain at least blockLength elements. |
[out] | output | Range of arrays containing the output sample vectors. Must be numberOfOutputs elements long, and each sample vector must contain at least blockLength elements. |
◆ process() [2/2]
template<typename ElementType >
Set a new matrix of gain values and process multichannel audio by matrixing the number of blockLength
samples (specified in the constructor) from each input channel to the range of the output channels. If no new set of gain values has been set previously, a transition will start that will change the used gains to the new values over a period of interpolationSteps
samples. If there is a transition currently active, the current interpolated gains will be used as the starting point of a new transistion process (taking interpolationSteps
samples). transition to the new value will continue. After that, matrixing will be performed using the new gain values.
- Parameters
-
| input | A range of arrays containing the input sample vectors. Must be numberOfInputs elements long, and each sample vector must contain at least blockLength elements. |
[out] | output | The output Range of arrays containing the output sample vectors. Must be numberOfOutputs elements long, and each sample vector must contain at least blockLength elements. |
| newGains | The matrix of new gain values, dimension must be numerOfInputs * numberOfOutputs . |
◆ setNewGains()
template<typename ElementType >
Set a new gain matrix. If no new set of gain values has been set previously, a transition will start that will change the used gains to the new values over a period of interpolationSteps
samples. If there is a transition currently active, the current interpolated gains will be used as the starting point of a new transistion process (taking interpolationSteps
samples).
- Parameters
-
newGains | The matrix of new gain values, dimension must be numerOfInputs * numberOfOutputs . |
The documentation for this class was generated from the following files:
- C:/Local/dev/gitlab-runner/builds/a913a013/0/s3a/VISR/src/librbbl/gain_matrix.hpp
- C:/Local/dev/gitlab-runner/builds/a913a013/0/s3a/VISR/src/librbbl/gain_matrix.cpp