VISR  0.12.0
Versatile Interactive Scene Renderer
visr::objectmodel::PointSourceWithReverb Class Reference

#include <point_source_with_reverb.hpp>

Inheritance diagram for visr::objectmodel::PointSourceWithReverb:
visr::objectmodel::PointSource visr::objectmodel::Object

Classes

class  DiscreteReflection
 
class  LateReverb
 

Public Types

using LateReverbCoeffs = std::array< SampleType, cNumberOfSubBands >
 
- Public Types inherited from visr::objectmodel::Object
using Coordinate = float
 
using Priority = unsigned char
 
using ChannelIndex = unsigned int
 

Public Member Functions

 PointSourceWithReverb ()=delete
 
 PointSourceWithReverb (ObjectId id)
 
virtual ~PointSourceWithReverb ()
 
ObjectTypeId type () const
 
std::unique_ptr< Objectclone () const
 
LateReverb const & lateReverb () const
 
LateReverblateReverb ()
 
SampleType const lateReverbOnset () const
 
void setLateReverbOnset (SampleType onset)
 
LateReverbCoeffs const & lateReverbDecayCoeffs () const
 
LateReverbCoeffs const & lateReverbLevels () const
 
LateReverbCoeffs const & lateReverbAttackTimes () const
 
void setLateReverbLevels (LateReverbCoeffs const &levels)
 
void setLateReverbLevels (SampleType const *levels, std::size_t numValues)
 
void setLateReverbDecayCoeffs (LateReverbCoeffs const &decay)
 
void setLateReverbDecayCoeffs (SampleType const *decay, std::size_t numValues)
 
void setLateReverbAttackTimes (LateReverbCoeffs const &attack)
 
void setLateReverbAttackTimes (SampleType const *attack, std::size_t numValues)
 
void setNumberOfDiscreteReflections (std::size_t numReflections)
 
std::size_t numberOfDiscreteReflections () const
 
DiscreteReflection const & discreteReflection (std::size_t reflIdx) const
 
DiscreteReflectiondiscreteReflection (std::size_t reflIdx)
 
- Public Member Functions inherited from visr::objectmodel::PointSource
 PointSource ()=delete
 
 PointSource (ObjectId id)
 
virtual ~PointSource ()
 
Coordinate x () const
 
Coordinate y () const
 
Coordinate z () const
 
bool channelLock () const
 
Coordinate channelLockDistance () const
 
void setChannelLock (Coordinate newDistance=cAlwaysChannelLock)
 
void unsetChannelLock ()
 
void setX (Coordinate newX)
 
void setY (Coordinate newY)
 
void setZ (Coordinate newZ)
 
- Public Member Functions inherited from visr::objectmodel::Object
 Object ()=delete
 
 Object (ObjectId id)
 
virtual ~Object ()=0
 
ObjectId id () const
 
GroupId groupId () const
 
void setGroupId (ObjectId newId)
 
LevelType level () const
 
void setLevel (LevelType newLevel)
 
Priority priority () const
 
void setPriority (Priority newPriority)
 
rbbl::ParametricIirCoefficientList< Coordinate > const & eqCoefficients () const
 
void setEqCoefficients (rbbl::ParametricIirCoefficientList< Coordinate > const &newCoeffs)
 
std::size_t numberOfChannels () const
 
ChannelIndex channelIndex (std::size_t index) const
 
void resetNumberOfChannels (std::size_t numChannels)
 
void setChannelIndex (std::size_t index, ChannelIndex channelIndex)
 

Static Public Attributes

static const std::size_t cNumberOfSubBands = 9
 
static const std::size_t cNumDiscreteReflectionBiquads = 10
 
- Static Public Attributes inherited from visr::objectmodel::Object
static const ObjectId cInvalidObjectId = UINT_MAX
 
static const GroupId cDefaultGroupId = 0
 
static const ChannelIndex cInvalidChannelIndex = UINT_MAX
 

Detailed Description

Audio object representing a monopole point source with corresponding object-based reverberation. Derived from PointSource.

Member Typedef Documentation

Data type for holding the subband information (levels and decay coefficients) for the generation of the late reerberation filters.

Constructor & Destructor Documentation

visr::objectmodel::PointSourceWithReverb::PointSourceWithReverb ( )
delete

Default constructor. Construct a PointSourceWithReverb with all data members set to default values.

visr::objectmodel::PointSourceWithReverb::PointSourceWithReverb ( ObjectId  id)
explicit

Construct a PointSourceWithReverb with a given object id and all data members set to default values.

visr::objectmodel::PointSourceWithReverb::~PointSourceWithReverb ( )
virtualdefault

Destructor.

Member Function Documentation

std::unique_ptr< Object > visr::objectmodel::PointSourceWithReverb::clone ( ) const
virtual

Clone function used to emulate 'virtual copy constructor' functionality. Must be implemented in every derived instantiated class.

Reimplemented from visr::objectmodel::PointSource.

DiscreteReflection const& visr::objectmodel::PointSourceWithReverb::discreteReflection ( std::size_t  reflIdx) const
inline

Return a discrete reflection specification with the given index (const version)

Exceptions
std::out_of_rangeIf reflIdx exceeds the number of discrete reflections.
DiscreteReflection& visr::objectmodel::PointSourceWithReverb::discreteReflection ( std::size_t  reflIdx)
inline

Return a discrete reflection specification with the given index.

Exceptions
std::out_of_rangeIf reflIdx exceeds the number of discrete reflections.
LateReverb const& visr::objectmodel::PointSourceWithReverb::lateReverb ( ) const
inline

Return a reference to the late reverb object (const version).

LateReverb& visr::objectmodel::PointSourceWithReverb::lateReverb ( )
inline

Return a reference to the late reverb object (non-const version).

LateReverbCoeffs const& visr::objectmodel::PointSourceWithReverb::lateReverbAttackTimes ( ) const
inline

Return the attack times for the late reverberation envelope. Returned as an array of time values [in seconds].

LateReverbCoeffs const& visr::objectmodel::PointSourceWithReverb::lateReverbDecayCoeffs ( ) const
inline

Return the late reverberation decay coefficients. Returned as an array of decay coefficients corresponding to the fixed subbands.

LateReverbCoeffs const& visr::objectmodel::PointSourceWithReverb::lateReverbLevels ( ) const
inline

Return the late reverberation levels. Returned as an array of linear levels corresponding to the fixed subbands.

SampleType const visr::objectmodel::PointSourceWithReverb::lateReverbOnset ( ) const
inline

Retrieve the initial delay (closely related to mixing time) for the late reverberation tail in seconds.

std::size_t visr::objectmodel::PointSourceWithReverb::numberOfDiscreteReflections ( ) const
inline

Return the number of discrete reflection specifications.

void visr::objectmodel::PointSourceWithReverb::setLateReverbAttackTimes ( LateReverbCoeffs const &  attack)
inline

Set the attack times for the late reverberation decay coefficients.

Parameters
attackThe attack times [in seconds] corresponding to the fixed subbands as a fixed-size array.
void visr::objectmodel::PointSourceWithReverb::setLateReverbAttackTimes ( SampleType const *  attack,
std::size_t  numValues 
)
inline

Set the attack times for the late reverberation decay coefficients.

Parameters
attackThe attick times corresponding to the fixed subbands.
numValuesThe number of values contained in the decay array.
Exceptions
std::invalid_argumentIf numValues does not match the fixed number of subbands.
void visr::objectmodel::PointSourceWithReverb::setLateReverbDecayCoeffs ( LateReverbCoeffs const &  decay)
inline

Set the late reverberation decay coefficients.

Parameters
decayThe decay coefficients corresponding to the fixed subbands as a fixed-size array.
void visr::objectmodel::PointSourceWithReverb::setLateReverbDecayCoeffs ( SampleType const *  decay,
std::size_t  numValues 
)
inline

Set the late reverberation decay coefficients from a vector.

Parameters
decayThe decay coefficients corresponding to the fixed subbands.
numValuesThe number of values contained in the decay array.
Exceptions
std::invalid_argumentIf numValues does not match the fixed number of subbands.
void visr::objectmodel::PointSourceWithReverb::setLateReverbLevels ( LateReverbCoeffs const &  levels)
inline

Set the late reverberation levels.

Parameters
levelsThe levels (linear scale) corresponding to the fixed subbands as a fixed-size array.
void visr::objectmodel::PointSourceWithReverb::setLateReverbLevels ( SampleType const *  levels,
std::size_t  numValues 
)
inline

Set the late reverberation levels from a vector.

Parameters
levelsThe levels (linear scale) corresponding to the fixed subbands.
numValuesThe number of values contained in the levels array.
Exceptions
std::invalid_argumentIf numValues does not match the fixed number of subbands.
void visr::objectmodel::PointSourceWithReverb::setLateReverbOnset ( SampleType  onset)
inline

Set the onset time for the late reverberation part.

Parameters
onsetOffset time in seconds.
void visr::objectmodel::PointSourceWithReverb::setNumberOfDiscreteReflections ( std::size_t  numReflections)

Set the number of discrete reflection specifications. This method invalidates all previously set reflections.

Parameters
numReflectionsThe new number of dicrete reflection specifications.
ObjectTypeId visr::objectmodel::PointSourceWithReverb::type ( ) const
virtual

Reimplemented from visr::objectmodel::PointSource.

Member Data Documentation

const std::size_t visr::objectmodel::PointSourceWithReverb::cNumberOfSubBands = 9
static

Number of subbands for the late reverberation levels and decay constants.

const std::size_t visr::objectmodel::PointSourceWithReverb::cNumDiscreteReflectionBiquads = 10
static

Number of biquad sections for the IIR filters representing the wall reflection filters of the early (discrete) reflections.

Todo:
Consider making this a systeem-wide configuration option.

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