![]() |
VISR
0.11.8
Versatile Interactive Scene Renderer
|
#include <fir_filter_matrix.hpp>
Public Types | |
enum | ControlPortConfig { ControlPortConfig::None = 0, ControlPortConfig::Filters = 1 << 0, ControlPortConfig::Routings = 1 << 1, ControlPortConfig::All = Filters | Routings } |
Public Member Functions | |
FirFilterMatrix (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr) | |
FirFilterMatrix (SignalFlowContext const &context, char const *name, CompositeComponent *parent, std::size_t numberOfInputs, std::size_t numberOfOutputs, std::size_t filterLength, std::size_t maxFilters, std::size_t maxRoutings, efl::BasicMatrix< SampleType > const &filters=efl::BasicMatrix< SampleType >(), rbbl::FilterRoutingList const &routings=rbbl::FilterRoutingList(), ControlPortConfig controlInputs=ControlPortConfig::None, char const *fftImplementation="default") | |
~FirFilterMatrix () | |
void | setup (std::size_t numberOfInputs, std::size_t numberOfOutputs, std::size_t filterLength, std::size_t maxFilters, std::size_t maxRoutings, efl::BasicMatrix< SampleType > const &filters=efl::BasicMatrix< SampleType >(), rbbl::FilterRoutingList const &routings=rbbl::FilterRoutingList(), ControlPortConfig controlInputs=ControlPortConfig::None, char const *fftImplementation="default") |
void | process () |
void | clearRoutings () |
void | addRouting (std::size_t inputIdx, std::size_t outputIdx, std::size_t filterIdx, SampleType const gain=static_cast< SampleType >(1.0)) |
void | addRouting (rbbl::FilterRouting const &routing) |
void | addRoutings (rbbl::FilterRoutingList const &routings) |
void | setRoutings (rbbl::FilterRoutingList const &routings) |
bool | removeRouting (std::size_t inputIdx, std::size_t outputIdx) |
void | clearFilters () |
void | setFilter (std::size_t filterIdx, SampleType const *const impulseResponse, std::size_t filterLength, std::size_t alignment=0) |
void | setFilters (efl::BasicMatrix< SampleType > const &filterSet) |
![]() | |
AtomicComponent (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr) | |
AtomicComponent (AtomicComponent const &)=delete | |
AtomicComponent (AtomicComponent &&)=delete | |
virtual | ~AtomicComponent () override |
![]() | |
Component (SignalFlowContext const &context, char const *componentName, CompositeComponent *parent) | |
Component (SignalFlowContext const &context, std::string const &componentName, CompositeComponent *parent) | |
Component (Component const &)=delete | |
Component (Component &&)=delete | |
Component & | operator= (Component const &)=delete |
Component & | operator= (Component &&)=delete |
virtual | ~Component () |
std::string const & | name () const |
std::string | fullName () const |
void | status (StatusMessage::Kind status, char const *message) |
template<typename ... MessageArgs> | |
void | status (StatusMessage::Kind status, MessageArgs ... args) |
bool | isComposite () const |
AudioPortBase & | audioPort (char const *portName) |
AudioPortBase const & | audioPort (char const *portName) const |
AudioPortBase & | audioPort (std::string const &portName) |
AudioPortBase const & | audioPort (std::string const &portName) const |
ParameterPortBase & | parameterPort (char const *portName) |
ParameterPortBase const & | parameterPort (char const *portName) const |
ParameterPortBase & | parameterPort (std::string const &portName) |
ParameterPortBase const & | parameterPort (std::string const &portName) const |
SamplingFrequencyType | samplingFrequency () const |
std::size_t | period () const |
bool | isTopLevel () const |
impl::ComponentImplementation & | implementation () |
impl::ComponentImplementation const & | implementation () const |
Additional Inherited Members | |
![]() | |
static const std::string & | nameSeparator () |
![]() | |
Component (impl::ComponentImplementation *impl) | |
A multiple input/multiple output FIR filter This class has one input port named "in" and one output port named "out". The widths of the input and the output port are set by the parameters numberOfInputs
and numberOfOutputs
in the setup() method.
|
strong |
|
explicit |
Constructor.
context | Configuration object containing basic execution parameters. |
name | The name of the component. Must be unique within the containing composite component (if there is one). |
parent | Pointer to a containing component if there is one. Specify nullptr in case of a top-level component |
|
explicit |
Constructor to create a fully initialised component (no need to call setup() ).
context | Configuration object containing basic execution parameters. |
name | The name of the component. Must be unique within the containing composite component (if there is one). |
parent | Pointer to a containing component if there is one. Specify nullptr in case of a top-level component |
numberOfInputs | The number of input signals. |
numberOfOutputs | The number of output signals. |
filterLength | The maximum admissible FIR filter length. |
maxFilters | The maximum number of filter specifications (single FIR filters) that can be stored within the component. |
maxRoutings | The maximum number of routings (i.e., the maximum number of simultaneously convolved signal/filter combinations supported by this filter. |
filters | The initial FIR filters stored as matrix rows. The filters 0...filters.numberOfRows() are initialised to these FIR filters, the remaining filter specifications are set to zero. Default: empty matrix, i.e., all filters are zero-initialised. |
routings | Initial set of filter routings. Default value: empty routing list, i.e., no signal routings are active initially. |
controlInputs | Enumeration to select which parameter update ports are instantiated. Default: ControlPortConfig::None |
fftImplementation | name of the FFt library to be used. See rbbl::FftWrapperFactory for available names. Optional parameter, default is "default", i.e., the default FFt library for the platform. |
visr::rcl::FirFilterMatrix::~FirFilterMatrix | ( | ) |
Desctructor
void visr::rcl::FirFilterMatrix::addRouting | ( | std::size_t | inputIdx, |
std::size_t | outputIdx, | ||
std::size_t | filterIdx, | ||
SampleType const | gain = static_cast<SampleType>(1.0) |
||
) |
Add a routing point in the filter matrix. If there is already an entry for the combination (inputIdx
, outputIdx
), the existing rntry is replaced.
inputIdx | The input signal index for the routing. |
outputIdx | The output signal index for this routing. |
filterIdx | The filter index for this routing (pointing to an entry to the filter container of this component) |
gain | An optional, frequency-independent gain for this routing. Optional argument, defaults to 1.0. |
std::invalid_argument | If inputIdx , outputIdx , or filterIdx exceed their respective admissible ranges |
void visr::rcl::FirFilterMatrix::addRouting | ( | rbbl::FilterRouting const & | routing | ) |
void visr::rcl::FirFilterMatrix::addRoutings | ( | rbbl::FilterRoutingList const & | routings | ) |
void visr::rcl::FirFilterMatrix::clearFilters | ( | ) |
void visr::rcl::FirFilterMatrix::clearRoutings | ( | ) |
Clear all routings points. The filters remain initialised.
|
virtual |
The process method performs the multichannel convolution.
Implements visr::AtomicComponent.
bool visr::rcl::FirFilterMatrix::removeRouting | ( | std::size_t | inputIdx, |
std::size_t | outputIdx | ||
) |
void visr::rcl::FirFilterMatrix::setFilter | ( | std::size_t | filterIdx, |
SampleType const *const | impulseResponse, | ||
std::size_t | filterLength, | ||
std::size_t | alignment = 0 |
||
) |
void visr::rcl::FirFilterMatrix::setFilters | ( | efl::BasicMatrix< SampleType > const & | filterSet | ) |
void visr::rcl::FirFilterMatrix::setRoutings | ( | rbbl::FilterRoutingList const & | routings | ) |
void visr::rcl::FirFilterMatrix::setup | ( | std::size_t | numberOfInputs, |
std::size_t | numberOfOutputs, | ||
std::size_t | filterLength, | ||
std::size_t | maxFilters, | ||
std::size_t | maxRoutings, | ||
efl::BasicMatrix< SampleType > const & | filters = efl::BasicMatrix<SampleType>() , |
||
rbbl::FilterRoutingList const & | routings = rbbl::FilterRoutingList() , |
||
ControlPortConfig | controlInputs = ControlPortConfig::None , |
||
char const * | fftImplementation = "default" |
||
) |
Setup method to initialise the object and set the parameters.
numberOfInputs | The number of input signals. |
numberOfOutputs | The number of output signals. |
filterLength | The maximum admissible FIR filter length. |
maxFilters | The maximum number of filter specifications (single FIR filters) that can be stored within the component. |
maxRoutings | The maximum number of routings (i.e., the maximum number of simultaneously convolved signal/filter combinations supported by this filter. |
filters | The initial FIR filters stored as matrix rows. The filters 0...filters.numberOfRows() are initialised to these FIR filters, the remaining filter specifications are set to zero. Default: empty matrix, i.e., all filters are zero-initialised. |
routings | Initial set of filter routings. Default value: empty routing list, i.e., no signal routings are active initially. |
controlInputs | Enumeration to select which parameter update ports are instantiated. Default: ControlPortConfig::None |
fftImplementation | name of the FFt library to be used. See rbbl::FftWrapperFactory for available names. Optional parameter, default is "default", i.e., the default FFt library for the platform. |