VISR  0.11.8
Versatile Interactive Scene Renderer
visr::rcl::GainMatrix Class Reference

#include <gain_matrix.hpp>

Inheritance diagram for visr::rcl::GainMatrix:
visr::AtomicComponent visr::Component

Public Member Functions

 GainMatrix (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr)
 
void setup (std::size_t numberOfInputs, std::size_t numberOfOutputs, std::size_t interpolationSteps, SampleType initialGain=static_cast< SampleType >(0.0), bool controlInput=true)
 
void setup (std::size_t numberOfInputs, std::size_t numberOfOutputs, std::size_t interpolationSteps, efl::BasicMatrix< SampleType > const &initialGains, bool controlInput=true)
 
void process ()
 
- Public Member Functions inherited from visr::AtomicComponent
 AtomicComponent (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr)
 
 AtomicComponent (AtomicComponent const &)=delete
 
 AtomicComponent (AtomicComponent &&)=delete
 
virtual ~AtomicComponent () override
 
- Public Member Functions inherited from visr::Component
 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
 
Componentoperator= (Component const &)=delete
 
Componentoperator= (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
 
AudioPortBaseaudioPort (char const *portName)
 
AudioPortBase const & audioPort (char const *portName) const
 
AudioPortBaseaudioPort (std::string const &portName)
 
AudioPortBase const & audioPort (std::string const &portName) const
 
ParameterPortBaseparameterPort (char const *portName)
 
ParameterPortBase const & parameterPort (char const *portName) const
 
ParameterPortBaseparameterPort (std::string const &portName)
 
ParameterPortBase const & parameterPort (std::string const &portName) const
 
SamplingFrequencyType samplingFrequency () const
 
std::size_t period () const
 
bool isTopLevel () const
 
impl::ComponentImplementationimplementation ()
 
impl::ComponentImplementation const & implementation () const
 

Additional Inherited Members

- Static Public Member Functions inherited from visr::Component
static const std::string & nameSeparator ()
 
- Protected Member Functions inherited from visr::Component
 Component (impl::ComponentImplementation *impl)
 

Detailed Description

Audio Component for matrixing a vector of input signals to a vector of output signals with a specific gain value for each routing point. The gain matrix can be changed at runtime. Optionally, the class features smooth transitions between differing gain settings. This class has one input port named "in" and one output port named "out". The width of these ports is determined by the arguments "numberOfInput" and "numberOfOutputs", respectively, which are passed to the setup() method.

Constructor & Destructor Documentation

◆ GainMatrix()

visr::rcl::GainMatrix::GainMatrix ( SignalFlowContext const &  context,
char const *  name,
CompositeComponent parent = nullptr 
)
explicit

Constructor.

Parameters
contextConfiguration object containing basic execution parameters.
nameThe name of the component. Must be unique within the containing composite component (if there is one).
parentPointer to a containing component if there is one. Specify nullptr in case of a top-level component

Member Function Documentation

◆ process()

void visr::rcl::GainMatrix::process ( )
virtual

Pure virtual process() function. The overriding methods of base classes are called in regular intervals, each processing a fixed number (context.period()) number of samples.

Implements visr::AtomicComponent.

◆ setup() [1/2]

void visr::rcl::GainMatrix::setup ( std::size_t  numberOfInputs,
std::size_t  numberOfOutputs,
std::size_t  interpolationSteps,
SampleType  initialGain = static_cast<SampleType>(0.0),
bool  controlInput = true 
)

Setup method to initialise the object and set the parameters.

Parameters
numberOfInputsThe number of signals in the input signal.
numberOfOutputsThe number of signals in the output signal.
interpolationStepsThe number of samples needed for the transition after a new gain is set. It must be an integral multiple of the period of the signal flow. The value "0" denotes an immediate application of the new gain value.
initialGainThe initial entries of the the gain matrix (linear scale). All entries are initialised to this value (default: 0.0)
controlInputFlag controlling whether to instantiate a parameter input to receive gain matrix updates.
Todo:
Describe the complete semantics of the transition.

◆ setup() [2/2]

void visr::rcl::GainMatrix::setup ( std::size_t  numberOfInputs,
std::size_t  numberOfOutputs,
std::size_t  interpolationSteps,
efl::BasicMatrix< SampleType > const &  initialGains,
bool  controlInput = true 
)

Setup method to initialise the object and set the parameters.

Parameters
numberOfInputsThe number of signals in the input signal.
numberOfOutputsThe number of signals in the output signal.
interpolationStepsThe number of samples needed for the transition after a new gain is set. It must be an integral multiple of the period of the signal flow. The value "0" denotes an immediate application of the new gain value.
initialGainsThe initial entries of the the gain matrix (linear scale). The row and column numbers of the matrix must match the arguments numberOfOutputs and numberOfInputs, respectively.
controlInputFlag controlling whether to instantiate a parameter input to receive gain matrix updates.

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