VISR  0.12.0
Versatile Interactive Scene Renderer
visr::rcl::SparseGainMatrix Class Reference

#include <sparse_gain_matrix.hpp>

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

Public Types

enum  ControlPortConfig {
  ControlPortConfig::No = 0, ControlPortConfig::RoutingPoints = 1, ControlPortConfig::RoutingList = 2, ControlPortConfig::Gain = 4,
  ControlPortConfig::All = RoutingPoints | RoutingList | Gain
}
 

Public Member Functions

 SparseGainMatrix (SignalFlowContext const &context, char const *name, CompositeComponent *parent, std::size_t numberOfInputs, std::size_t numberOfOutputs, std::size_t interpolationSteps, std::size_t maxRoutingPoints, rbbl::SparseGainRoutingList const &initialRoutings=rbbl::SparseGainRoutingList(), ControlPortConfig controlInputs=ControlPortConfig::No)
 
void process () override
 
- 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.

Member Enumeration Documentation

◆ ControlPortConfig

Enumeration describing which control parameter input are to be instantiated.

Enumerator
No 

No control inputs.

RoutingPoints 

Set individual routing points (with gains)

RoutingList 

Reset the complete list of routing points.

Gain 

A vector of gains corresponding to the routing entries.

All 

Convenience value that activates all control inputs.

Constructor & Destructor Documentation

◆ SparseGainMatrix()

visr::rcl::SparseGainMatrix::SparseGainMatrix ( SignalFlowContext const &  context,
char const *  name,
CompositeComponent parent,
std::size_t  numberOfInputs,
std::size_t  numberOfOutputs,
std::size_t  interpolationSteps,
std::size_t  maxRoutingPoints,
rbbl::SparseGainRoutingList const &  initialRoutings = rbbl::SparseGainRoutingList(),
ControlPortConfig  controlInputs = ControlPortConfig::No 
)
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
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.
maxRoutingPointsThe maimum number of routing points supported. This number must not be exceeded either in the initial setting or during run-time updates. This number also determines the size of the gain vector parameter for runtime updates.
initialRoutings
controlInputsEnumeration value to control which parameter inputs for runtime control are instantiated. See
See also
SparseGainMatrix::ControlPortConfig Multiple values can be combined by bit-wise or operations.
Todo:
Describe the complete semantics of the transition.

Member Function Documentation

◆ process()

void visr::rcl::SparseGainMatrix::process ( )
overridevirtual

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.


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