![]() |
VISR
0.12.0
Versatile Interactive Scene Renderer
|
#include <interpolating_convolver_uniform.hpp>
Public Types | |
using | FrequencyDomainType = typename CrossfadingConvolverUniform< SampleType >::FrequencyDomainType |
Public Member Functions | |
InterpolatingConvolverUniform (std::size_t numberOfInputs, std::size_t numberOfOutputs, std::size_t blockLength, std::size_t maxFilterLength, std::size_t maxRoutingPoints, std::size_t maxFilterEntries, std::size_t numberOfInterpolants, std::size_t transitionSamples, FilterRoutingList const &initialRoutings=FilterRoutingList(), InterpolationParameterSet const &initialInterpolants=InterpolationParameterSet(), efl::BasicMatrix< SampleType > const &initialFilters=efl::BasicMatrix< SampleType >(), std::size_t alignment=0, char const *fftImplementation="default") | |
~InterpolatingConvolverUniform () | |
std::size_t | numberOfInputs () const |
std::size_t | numberOfOutputs () const |
std::size_t | blockLength () const |
std::size_t | maxNumberOfRoutingPoints () const |
std::size_t | maxNumberOfFilterEntries () const |
std::size_t | maxFilterLength () const |
std::size_t | numberOfRoutingPoints () const |
void | process (SampleType const *const input, std::size_t inputStride, SampleType *const output, std::size_t outputStride, std::size_t alignment=0) |
void | clearRoutingTable () |
void | initRoutingTable (FilterRoutingList const &routings) |
void | setRoutingEntry (FilterRouting const &routing) |
void | setRoutingEntry (std::size_t inputIdx, std::size_t outputIdx, std::size_t filterIdx, SampleType gain) |
bool | removeRoutingEntry (std::size_t inputIdx, std::size_t outputIdx) |
void | clearFilters () |
void | initFilters (efl::BasicMatrix< SampleType > const &newFilters) |
void | setImpulseResponse (SampleType const *ir, std::size_t filterLength, std::size_t filterIdx, std::size_t alignment=0) |
std::size_t | numberOfInterpolants () const |
void | setInterpolant (rbbl::InterpolationParameter const ¶m) |
void | setInterpolants (InterpolationParameterSet const ¶m) |
void | clearInterpolants () |
Generic class for MIMO convolution using a uniformly partioned fast convolution algorithm. It supports a arbitrary numbers of input and output channels and enables filters and an optional gain factor for arbitrary input-output connections.
SampleType | The floating-point type of the signal samples |
using visr::rbbl::InterpolatingConvolverUniform< SampleType >::FrequencyDomainType = typename CrossfadingConvolverUniform<SampleType>::FrequencyDomainType |
|
explicit |
Constructor.
numberOfInputs | The number of input signals processed. |
numberOfOutputs | The number of output channels produced. |
blockLength | The numbers of samples processed for each input or output channels in one process() call. |
maxFilterLength | The maximum length of the FIR filters (in samples). |
maxRoutingPoints | The maximum number of routing points between input and output channels, i.e., the number of filter operations to be calculated. |
maxFilterEntries | The maximum number of filters that can be stored within the filter. This number can be different from maxRoutingPoints , as the convolver can both reuse the same filter representation multiple times, or store multiple filter representations to enable switching of the filter characteristics at runtime. |
numberOfInterpolants | The number of filters used for interpolating a single filter. |
transitionSamples | Duration of a filter crossfade in samples. |
initialRoutings | The initial set of routing points. |
initialInterpolants | List of initial interpolation coefficients to determine the filters for convolution. |
initialFilters | The initial set of filter coefficients. The matrix rows represent the distinct filters. |
alignment | The alignment (given as a multiple of the sample type size) to be used to allocate all data structure. It also guaranteees the alignment of the input and output samples to the process call. |
fftImplementation | A string to determine the FFT wrapper to be used. The default value results in using the default FFT implementation for the given data type. |
|
default |
Destructor.
|
inline |
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::clearFilters | ( | ) |
Manipulation of the contained filter representations. Reset all filters to zero.
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::clearInterpolants | ( | ) |
Set all interpolation weights and filter indices to zero.
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::clearRoutingTable | ( | ) |
Manipulation of the routing table. Remove all entries from the routing table.
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::initFilters | ( | efl::BasicMatrix< SampleType > const & | newFilters | ) |
Load a new set of impulse responses, resetting all prior loaded filters. If there are fewer filters in the matrix than the maximum admissible number, the remaining filters are set to zero. Likewise, if the length of the new filters is less than the maximum allowed filter length, the remaining elements are set to zero.
newFilters | The matrix of new filters, with each row representing a filter. |
std::invalid_argument | If the number of filters (number of rows) exceeds the maximum admissible number of filters. |
std::invalid_argumeent | If the length of the filters (number of matrix columns) exceeds the maximum admissible length, |
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::initRoutingTable | ( | FilterRoutingList const & | routings | ) |
Initialize the routing table from a set of entries. All pre-existing entries are cleared beforehand.
routings | A vector of routing entries |
std::invalid_argument | If the number of new entries exceeds the maximally permitted number of routings |
std::invalid_argument | If any input, output, or filter index exceeds the admissible range for the respective type. |
|
inline |
|
inline |
|
inline |
|
inline |
std::size_t visr::rbbl::InterpolatingConvolverUniform< SampleType >::numberOfInterpolants | ( | ) | const |
Handling of interpolants (consisting of filter indices and the corresponding interpolation weights. Return the number of filters involved in one interpolation process.
|
inline |
|
inline |
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::process | ( | SampleType const *const | input, |
std::size_t | inputStride, | ||
SampleType *const | output, | ||
std::size_t | outputStride, | ||
std::size_t | alignment = 0 |
||
) |
bool visr::rbbl::InterpolatingConvolverUniform< SampleType >::removeRoutingEntry | ( | std::size_t | inputIdx, |
std::size_t | outputIdx | ||
) |
true
if the entry was removes, false
if not (i.e., the entry did not exist). void visr::rbbl::InterpolatingConvolverUniform< SampleType >::setImpulseResponse | ( | SampleType const * | ir, |
std::size_t | filterLength, | ||
std::size_t | filterIdx, | ||
std::size_t | alignment = 0 |
||
) |
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::setInterpolant | ( | rbbl::InterpolationParameter const & | param | ) |
Set new interpolation weights for a single filter entry.
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::setInterpolants | ( | InterpolationParameterSet const & | param | ) |
Set filter interpolants for a sequence of routing entries
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::setRoutingEntry | ( | FilterRouting const & | routing | ) |
Add a new routing to the routing table.
std::invalid_argument | If adding the entry would exceed the maximally permitted number of routings |
std::invalid_argument | If any input, output, or filter index exceeds the admissible range for the respective type. |
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::setRoutingEntry | ( | std::size_t | inputIdx, |
std::size_t | outputIdx, | ||
std::size_t | filterIdx, | ||
SampleType | gain | ||
) |
Add a new routing to the routing table.
std::invalid_argument | If adding the entry would exceed the maximally permitted number of routings |
std::invalid_argument | If any input, output, or filter index exceeds the admissible range for the respective type. |