VISR  0.11.1
Versatile Interactive Scene Renderer
visr::rcl::PanningCalculator Class Reference

#include <panning_calculator.hpp>

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

Public Types

enum  PanningMode {
  PanningMode::Nothing = 0, PanningMode::LF = 1, PanningMode::HF = 2, PanningMode::Diffuse = 4,
  PanningMode::Dualband = LF | HF, PanningMode::All = Dualband | Diffuse
}
 
enum  Normalisation { Normalisation::Default = 0, Normalisation::Amplitude = 1, Normalisation::Energy = 2 }
 
using CoefficientType = SampleType
 

Public Member Functions

 PanningCalculator (SignalFlowContext const &context, char const *name, CompositeComponent *parent, std::size_t numberOfObjects, panning::LoudspeakerArray const &arrayConfig, bool adaptiveListenerPosition=false, bool separateLowpassPanning=false)
 
 PanningCalculator (SignalFlowContext const &context, char const *name, CompositeComponent *parent, std::size_t numberOfObjects, panning::LoudspeakerArray const &arrayConfig, bool adaptiveListenerPosition, PanningMode panningMode=PanningMode::LF, Normalisation lfNormalisation=Normalisation::Default, Normalisation hfNormalisation=Normalisation::Default, Normalisation diffuseNormalisation=Normalisation::Default, pml::ListenerPosition const &listenerPosition=pml::ListenerPosition(0.0f, 0.0f, 0.0f))
 
 PanningCalculator (PanningCalculator const &)=delete
 
 ~PanningCalculator ()
 
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 calculating the gains for a variety of panning algorithms from a set of audio object descriptions.

Member Typedef Documentation

Type of the gain coefficients. We use the same type as the samples in the signal flow graph

Todo:
maybe this should become a template parameter.

Member Enumeration Documentation

Enumerator
Default 

Use the default value for the frequency regime in question.

Amplitude 

l_1 (amplitude/low frequency) normalisation

Energy 

l_2 (energy/high-frequency) normalisation

Enumerator
Nothing 

Not used as a real choice, just for bit-testing.

LF 
HF 
Diffuse 
Dualband 
All 

Constructor & Destructor Documentation

visr::rcl::PanningCalculator::PanningCalculator ( SignalFlowContext const &  context,
char const *  name,
CompositeComponent parent,
std::size_t  numberOfObjects,
panning::LoudspeakerArray const &  arrayConfig,
bool  adaptiveListenerPosition = false,
bool  separateLowpassPanning = false 
)
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.
numberOfObjectsThe number of VBAP objects to be processed.
arrayConfigThe array configuration object.
adaptiveListenerPositionWhether the rendering supports adaptation to a tracked listener.
separateLowpassPanningWhether to generate two separate gain matrixes for low and high frequencies.
visr::rcl::PanningCalculator::PanningCalculator ( SignalFlowContext const &  context,
char const *  name,
CompositeComponent parent,
std::size_t  numberOfObjects,
panning::LoudspeakerArray const &  arrayConfig,
bool  adaptiveListenerPosition,
PanningMode  panningMode = PanningMode::LF,
Normalisation  lfNormalisation = Normalisation::Default,
Normalisation  hfNormalisation = Normalisation::Default,
Normalisation  diffuseNormalisation = Normalisation::Default,
pml::ListenerPosition const &  listenerPosition = pml::ListenerPosition(0.0f, 0.0f, 0.0f ) 
)
explicit

Constructor. This is a legacy constructor that doesn't use the HF/LF port specification or noralisation options.

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.
numberOfObjectsThe number of VBAP objects to be processed.
arrayConfigThe array configuration object.
adaptiveListenerPositionWhether the rendering supports adaptation to a tracked listener.
panningModeSelect the gain outputs provided (LF, HF, Diffuse or any combination thereof)
lfNormalisationThe normalisation norm used for the LF gains. Default is 'Energy' as in plain VBAP if HF panning is deactivated, or 'Amplitude' if HF panning is present.
hfNormalisationThe normalisation norm used for the HF (VBIP) gains. Default is 'Energy'.
diffuseNormalisationThe normalisation norm used for the diffuse gains. Default is 'Energy'.
listenerPositionThe initial listener position (central position, default is (0,0,0)
visr::rcl::PanningCalculator::PanningCalculator ( PanningCalculator const &  )
delete

Disabled (deleted) copy constructor

visr::rcl::PanningCalculator::~PanningCalculator ( )
default

` Destructor.

Member Function Documentation

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

The process function. It takes a vector of objects as input and calculates a vector of output gains.

Implements visr::AtomicComponent.


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