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

#include <gain_vector.hpp>

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

Public Member Functions

 GainVector (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr)
 
 ~GainVector ()
 
void setup (std::size_t numberOfChannels, std::size_t interpolationSteps, bool controlInputs=false, SampleType initialGainLinear=static_cast< SampleType >(1.0))
 
void setup (std::size_t numberOfChannels, std::size_t interpolationSteps, bool controlInputs, efl::BasicVector< SampleType > const &initialGainsLinear)
 
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 applying channel-specific gains to a multichannel audio signal. The gains can be changed at runtime. Optionally, the class features smooth transitions if gains are changed. 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.

Constructor & Destructor Documentation

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

Constructor.

Parameters
contextThe signal flow context specifying basic parameters for audio processing.
nameThe name of the component. Must be unique within the containing component (if there is one).
parentA containing composite component if the GainVector is embedded in a signal flow, nullptr otherwise. Optional parameter, default: nullptr (no parent)
visr::rcl::GainVector::~GainVector ( )
default

Destructor. Instantiated (default) in the implementation file.

Member Function Documentation

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

The process method applies the (interpolated) delay and gain values to the stream of input samples.

Implements visr::AtomicComponent.

void visr::rcl::GainVector::setup ( std::size_t  numberOfChannels,
std::size_t  interpolationSteps,
bool  controlInputs = false,
SampleType  initialGainLinear = static_cast<SampleType>(1.0) 
)

Setup method to initialise the object and set the parameters.

Parameters
numberOfChannelsThe number of single audio waveforms in the multichannel input and output waveforms. .
interpolationStepsThe number of samples needed for the transition after new delays and/or gains are set. It must be an integral multiple of the period of the signal flow. The value "0" denotes an immediate application of the new settings.
controlInputsWhether the component should contain parameter inputs for the gain parameter.
initialGainLinearThe initial delay value for all channels (in linear scale, default: 1.0)
void visr::rcl::GainVector::setup ( std::size_t  numberOfChannels,
std::size_t  interpolationSteps,
bool  controlInputs,
efl::BasicVector< SampleType > const &  initialGainsLinear 
)

Setup method to initialise the object and set the parameters.

Parameters
numberOfChannelsThe number of signals in the input signal.
interpolationStepsThe number of samples needed for the transition after a new gain is set. The value "0" enforces the immediate application of the new gain values.
controlInputsWhether the component should contain parameter inputs for the gain and delay parameter.
initialGainsLinearThe initial gain values for all channels, given in a linear scale. The the number of elements in this vector must match the channel number of this object.

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