VISR  0.12.0
Versatile Interactive Scene Renderer
visr::rbbl::InterpolatingConvolverUniform< SampleType > Class Template Reference

#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 &param)
 
void setInterpolants (InterpolationParameterSet const &param)
 
void clearInterpolants ()
 

Detailed Description

template<typename SampleType>
class visr::rbbl::InterpolatingConvolverUniform< SampleType >

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.

Template Parameters
SampleTypeThe floating-point type of the signal samples

Member Typedef Documentation

◆ FrequencyDomainType

Constructor & Destructor Documentation

◆ InterpolatingConvolverUniform()

template<typename SampleType >
visr::rbbl::InterpolatingConvolverUniform< SampleType >::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" 
)
explicit

Constructor.

Parameters
numberOfInputsThe number of input signals processed.
numberOfOutputsThe number of output channels produced.
blockLengthThe numbers of samples processed for each input or output channels in one process() call.
maxFilterLengthThe maximum length of the FIR filters (in samples).
maxRoutingPointsThe maximum number of routing points between input and output channels, i.e., the number of filter operations to be calculated.
maxFilterEntriesThe 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.
numberOfInterpolantsThe number of filters used for interpolating a single filter.
transitionSamplesDuration of a filter crossfade in samples.
initialRoutingsThe initial set of routing points.
initialInterpolantsList of initial interpolation coefficients to determine the filters for convolution.
initialFiltersThe initial set of filter coefficients. The matrix rows represent the distinct filters.
alignmentThe 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.
fftImplementationA string to determine the FFT wrapper to be used. The default value results in using the default FFT implementation for the given data type.

◆ ~InterpolatingConvolverUniform()

Destructor.

Member Function Documentation

◆ blockLength()

template<typename SampleType >
std::size_t visr::rbbl::InterpolatingConvolverUniform< SampleType >::blockLength ( ) const
inline

◆ clearFilters()

template<typename SampleType >
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::clearFilters ( )

Manipulation of the contained filter representations. Reset all filters to zero.

◆ clearInterpolants()

template<typename SampleType >
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::clearInterpolants ( )

Set all interpolation weights and filter indices to zero.

◆ clearRoutingTable()

template<typename SampleType >
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::clearRoutingTable ( )

Manipulation of the routing table. Remove all entries from the routing table.

◆ initFilters()

template<typename SampleType >
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.

Parameters
newFiltersThe matrix of new filters, with each row representing a filter.
Exceptions
std::invalid_argumentIf the number of filters (number of rows) exceeds the maximum admissible number of filters.
std::invalid_argumeentIf the length of the filters (number of matrix columns) exceeds the maximum admissible length,

◆ initRoutingTable()

template<typename SampleType >
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.

Parameters
routingsA vector of routing entries
Exceptions
std::invalid_argumentIf the number of new entries exceeds the maximally permitted number of routings
std::invalid_argumentIf any input, output, or filter index exceeds the admissible range for the respective type.

◆ maxFilterLength()

template<typename SampleType >
std::size_t visr::rbbl::InterpolatingConvolverUniform< SampleType >::maxFilterLength ( ) const
inline

◆ maxNumberOfFilterEntries()

template<typename SampleType >
std::size_t visr::rbbl::InterpolatingConvolverUniform< SampleType >::maxNumberOfFilterEntries ( ) const
inline

◆ maxNumberOfRoutingPoints()

template<typename SampleType >
std::size_t visr::rbbl::InterpolatingConvolverUniform< SampleType >::maxNumberOfRoutingPoints ( ) const
inline

◆ numberOfInputs()

template<typename SampleType >
std::size_t visr::rbbl::InterpolatingConvolverUniform< SampleType >::numberOfInputs ( ) const
inline

◆ numberOfInterpolants()

template<typename SampleType >
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.

◆ numberOfOutputs()

template<typename SampleType >
std::size_t visr::rbbl::InterpolatingConvolverUniform< SampleType >::numberOfOutputs ( ) const
inline

◆ numberOfRoutingPoints()

template<typename SampleType >
std::size_t visr::rbbl::InterpolatingConvolverUniform< SampleType >::numberOfRoutingPoints ( ) const
inline

◆ process()

template<typename SampleType >
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 
)

◆ removeRoutingEntry()

template<typename SampleType >
bool visr::rbbl::InterpolatingConvolverUniform< SampleType >::removeRoutingEntry ( std::size_t  inputIdx,
std::size_t  outputIdx 
)
Returns
true if the entry was removes, false if not (i.e., the entry did not exist).

◆ setImpulseResponse()

template<typename SampleType >
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::setImpulseResponse ( SampleType const *  ir,
std::size_t  filterLength,
std::size_t  filterIdx,
std::size_t  alignment = 0 
)

◆ setInterpolant()

template<typename SampleType >
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::setInterpolant ( rbbl::InterpolationParameter const &  param)

Set new interpolation weights for a single filter entry.

◆ setInterpolants()

template<typename SampleType >
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::setInterpolants ( InterpolationParameterSet const &  param)

Set filter interpolants for a sequence of routing entries

Todo:
Decide whether to clear the existing interpolants.

◆ setRoutingEntry() [1/2]

template<typename SampleType >
void visr::rbbl::InterpolatingConvolverUniform< SampleType >::setRoutingEntry ( FilterRouting const &  routing)

Add a new routing to the routing table.

Exceptions
std::invalid_argumentIf adding the entry would exceed the maximally permitted number of routings
std::invalid_argumentIf any input, output, or filter index exceeds the admissible range for the respective type.

◆ setRoutingEntry() [2/2]

template<typename SampleType >
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.

Exceptions
std::invalid_argumentIf adding the entry would exceed the maximally permitted number of routings
std::invalid_argumentIf any input, output, or filter index exceeds the admissible range for the respective type.

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