![]() |
VISR
0.11.8
Versatile Interactive Scene Renderer
|
#include <biquad_iir_filter.hpp>
Public Member Functions | |
BiquadIirFilter (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr) | |
BiquadIirFilter (SignalFlowContext const &context, char const *name, CompositeComponent *parent, std::size_t numberOfChannels, std::size_t numberOfBiquads, bool controlInput=false) | |
BiquadIirFilter (SignalFlowContext const &context, char const *name, CompositeComponent *parent, std::size_t numberOfChannels, std::size_t numberOfBiquads, rbbl::BiquadCoefficient< SampleType > const &initialBiquad, bool controlInput=false) | |
BiquadIirFilter (SignalFlowContext const &context, char const *name, CompositeComponent *parent, std::size_t numberOfChannels, std::size_t numberOfBiquads, rbbl::BiquadCoefficientList< SampleType > const &coeffs, bool controlInput=false) | |
BiquadIirFilter (SignalFlowContext const &context, char const *name, CompositeComponent *parent, std::size_t numberOfChannels, std::size_t numberOfBiquads, rbbl::BiquadCoefficientMatrix< SampleType > const &coeffs, bool controlInput=false) | |
void | setup (std::size_t numberOfChannels, std::size_t numberOfBiquads, bool controlInput=false) |
void | setup (std::size_t numberOfChannels, std::size_t numberOfBiquads, rbbl::BiquadCoefficient< SampleType > const &initialBiquad, bool controlInput=false) |
void | setup (std::size_t numberOfChannels, std::size_t numberOfBiquads, rbbl::BiquadCoefficientList< SampleType > const &coeffs, bool controlInput=false) |
void | setup (std::size_t numberOfChannels, std::size_t numberOfBiquads, rbbl::BiquadCoefficientMatrix< SampleType > const &coeffs, bool controlInput=false) |
void | process () |
void | setCoefficients (std::size_t channelIndex, std::size_t biquadIndex, rbbl::BiquadCoefficient< SampleType > const &coeffs) |
void | setChannelCoefficients (std::size_t channelIndex, rbbl::BiquadCoefficientList< SampleType > const &coeffs) |
void | setCoefficientMatrix (rbbl::BiquadCoefficientMatrix< SampleType > const &coeffs) |
![]() | |
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 multichannel IIR filter consisting of a fixed, arbitrary number of biquads per channel. This class has one input port named "in" and one output port named "out". The widths of the input and the output port are identical and is set by the argument numberOfChannels in the setup() method.
|
explicit |
Constructor that yields a basic, uninitialised object. A setup() method must be called before the component can be used for rendering.
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 that yields a fully initialised object. It is not needed to call a setup() afterwards. This overload sets all EQs to a flat response.
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. |
numberOfChannels | The number of single audio waveforms in the multichannel input and output waveforms. . |
numberOfBiquads | The number of biquads per audio channel. |
controlInput | Flag whether to instantiate a parameter port for receiving filter update commands. |
|
explicit |
Constructor that yields a fully initialised object. It is not needed to call a setup() afterwards. This overload sets all biquad sections to the same initial value.
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. |
numberOfChannels | The number of single audio waveforms in the multichannel input and output waveforms. . |
numberOfBiquads | The number of biquads per audio channel. |
initialBiquad | The initial setting for the filter characteristics. All biquads in all channels are set to this coefficient set. The default is a flat, direct-feedthrough filter |
controlInput | Flag whether to instantiate a parameter port for receiving filter update commands. |
|
explicit |
Constructor that yields a fully initialised object. It is not needed to call a setup() afterwards. This overload sets each channel to the same sequence of biquad sections.
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. |
numberOfChannels | The number of signals in the input signal. |
numberOfBiquads | The number of biquad sections for each channel. |
coeffs | The initial biquad coefficients, which are set identically for all channels. The number of biquad coefficient sets in this parameter must equal the numberOfBiquads parameter. |
controlInput | Flag whether to instantiate a parameter port for receiving filter update commands. |
|
explicit |
Constructor that yields a fully initialised object. It is not needed to call a setup() afterwards. This overload accepts a matrix of biquad filters to specifically initialise every biquad section for each channel.
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. Setup method to initialise the object and set the biquad filters individually for each filter channel and biquad section. |
numberOfChannels | The number of signals in the input signal. |
numberOfBiquads | The number of biquad sections for each channel. |
coeffs | The initial biquad coefficients as a matrix of size numberOfChannels x numberOfBiquads |
controlInput | Flag whether to instantiate a parameter port for receiving filter update commands. |
|
virtual |
The process method applies the IIR filters to the audio channels. values to the stream of input samples.
Implements visr::AtomicComponent.
void visr::rcl::BiquadIirFilter::setChannelCoefficients | ( | std::size_t | channelIndex, |
rbbl::BiquadCoefficientList< SampleType > const & | coeffs | ||
) |
Set the biquad coefficients for a filter channel.
channelIndex | The index of the filter channel. |
coeffs | The biquad coefficients. The number of sections must match the configured number of biquads of the component. |
std::out_of_range | If channelIndex exceeds the number of filter channels. |
std::invalid_argument | If the number of biquads in coeffs does not match the number of biquad sections in this component. |
void visr::rcl::BiquadIirFilter::setCoefficientMatrix | ( | rbbl::BiquadCoefficientMatrix< SampleType > const & | coeffs | ) |
Set the biquad coefficients for a filter channel.
coeffs | The matrix of biquad coefficients, dimension numberOfChannels x numberOfBiquadSections |
std::invalid_argument | If the matrix dimension differs from numberOfChannels x numberOfBiquadSections |
void visr::rcl::BiquadIirFilter::setCoefficients | ( | std::size_t | channelIndex, |
std::size_t | biquadIndex, | ||
rbbl::BiquadCoefficient< SampleType > const & | coeffs | ||
) |
Support for runtime changes of the filter coefficients.
channelIndex | The index of the filter channel. |
biquadIndex | The index of the biquad section to be set. |
coeffs | The set of biquad IIR coefficients. |
std::out_of_range | If channelIndex exceeds the number of filter channels. |
std::out_of_range | If biquadIndex exceeds the number of biquad sections of this component. |
void visr::rcl::BiquadIirFilter::setup | ( | std::size_t | numberOfChannels, |
std::size_t | numberOfBiquads, | ||
bool | controlInput = false |
||
) |
Setup method to initialise the object and set all eq parameters to a default (flat) response.
numberOfChannels | The number of single audio waveforms in the multichannel input and output waveforms. . |
numberOfBiquads | The number of biquads per audio channel. |
controlInput | Flag whether to instantiate a parameter port for receiving filter update commands. |
void visr::rcl::BiquadIirFilter::setup | ( | std::size_t | numberOfChannels, |
std::size_t | numberOfBiquads, | ||
rbbl::BiquadCoefficient< SampleType > const & | initialBiquad, | ||
bool | controlInput = false |
||
) |
Setup method to initialise the object and set the parameters.
numberOfChannels | The number of single audio waveforms in the multichannel input and output waveforms. . |
numberOfBiquads | The number of biquads per audio channel. |
initialBiquad | The initial setting for the filter characteristics. All biquads in all channels are set to this coefficient set. The default is a flat, direct-feedthrough filter |
controlInput | Flag whether to instantiate a parameter port for receiving filter update commands. |
void visr::rcl::BiquadIirFilter::setup | ( | std::size_t | numberOfChannels, |
std::size_t | numberOfBiquads, | ||
rbbl::BiquadCoefficientList< SampleType > const & | coeffs, | ||
bool | controlInput = false |
||
) |
Setup method to initialise the object and set the parameters.
numberOfChannels | The number of signals in the input signal. |
numberOfBiquads | The number of biquad sections for each channel. |
coeffs | The initial biquad coefficients, which are set identically for all channels. The number of biquad coefficient sets in this parameter must equal the numberOfBiquads parameter. |
controlInput | Flag whether to instantiate a parameter port for receiving filter update commands. |
void visr::rcl::BiquadIirFilter::setup | ( | std::size_t | numberOfChannels, |
std::size_t | numberOfBiquads, | ||
rbbl::BiquadCoefficientMatrix< SampleType > const & | coeffs, | ||
bool | controlInput = false |
||
) |
Setup method to initialise the object and set the biquad filters individually for each filter channel and biquad section.
numberOfChannels | The number of signals in the input signal. |
numberOfBiquads | The number of biquad sections for each channel. |
coeffs | The initial biquad coefficients as a matrix of size numberOfChannels x numberOfBiquads |
controlInput | Flag whether to instantiate a parameter port for receiving filter update commands. |