#include <LoudspeakerArray.h>
◆ ChannelIndex
Type to denote the output signal channels for a regular loudspeaker.
- Note
- the channels are assumed to be specified and stored as one-offset numbers.
◆ LoudspeakerIdType
Id type to denote loudspeakers by name. This name is also used in the triplet (or polygon) specifications to define the VBAP triangulation.
◆ LoudspeakerIndexType
Type for specifying loudspeaker indices in triplets. At the moment, we use 'int' to let negative numbers denote invalid/unused triplets.
◆ SampleType
Typ used for all numeric quantities such as as positions coordinates.
◆ TripletType
◆ LoudspeakerArray() [1/2]
visr::panning::LoudspeakerArray::LoudspeakerArray |
( |
| ) |
|
Default contructor, initialises numbers of elements and channel indices to safe values.
◆ LoudspeakerArray() [2/2]
visr::panning::LoudspeakerArray::LoudspeakerArray |
( |
std::string const & |
xmlConfiguration | ) |
|
|
explicit |
Construct an initialised array configuration.
- Exceptions
-
std::invalid_argument | if the file xmlConfiguration is not found or inconsistent. |
◆ ~LoudspeakerArray()
visr::panning::LoudspeakerArray::~LoudspeakerArray |
( |
| ) |
|
Destructor.
- Note
- We need to provide a destructor implementation because we use a unique_ptr to the forward-declared class BiquadParameterMatrix.
◆ channelIndex()
ChannelIndex visr::panning::LoudspeakerArray::channelIndex |
( |
std::size_t |
spkIndex | ) |
const |
|
inline |
Return the loudspeaker index associated with a loudspeaker at a given position in the loudspeaker array.
- Note
- the indices are assigned to speaker positions during the setup process and do not necessarily the order in which they are specified in the configuration file.
- Exceptions
-
std::out_of_range | If index exceeds the number of regular loudspeaker. |
◆ getDelayAdjustment()
Return the delay adjustment vector (in seconds) holding the delays for all regular loudspeakers and subwoofers. The loudspeaker delays are ordered according to their zero-offset logical speaker numbers, followed by the subwoofers in their order of definition in the configuration file.
◆ getGainAdjustment()
Return the gain adjustment vector (linear scale) holding the gains for all regular loudspeakers and subwoofers. The loudspeaker gains are ordered according to their zero-offset logical speaker numbers, followed by the subwoofers in their order of definition in the configuration file.
◆ getLoudspeakerChannels()
ChannelIndex const* visr::panning::LoudspeakerArray::getLoudspeakerChannels |
( |
| ) |
const |
|
inline |
◆ getLoudspeakerDelayAdjustment()
SampleType visr::panning::LoudspeakerArray::getLoudspeakerDelayAdjustment |
( |
std::size_t |
spkIdx | ) |
const |
|
inline |
◆ getLoudspeakerGainAdjustment()
SampleType visr::panning::LoudspeakerArray::getLoudspeakerGainAdjustment |
( |
std::size_t |
spkIdx | ) |
const |
|
inline |
Gain and delay adjustments.
◆ getNumRegularSpeakers()
std::size_t visr::panning::LoudspeakerArray::getNumRegularSpeakers |
( |
| ) |
const |
|
inline |
Retrieve the number of regular loudspeakers, excluding virtual loudspeakers and subwoofers.
◆ getNumSpeakers()
std::size_t visr::panning::LoudspeakerArray::getNumSpeakers |
( |
| ) |
const |
|
inline |
Return the total number of loudspeakers, including virtual speaker positions. Subwoofers are not considered as regular louspeakers.
◆ getNumSubwoofers()
std::size_t visr::panning::LoudspeakerArray::getNumSubwoofers |
( |
| ) |
const |
|
inline |
Subwoofer configuration support. Supported only by the XML configuration format. Return the number of subwoofers.
◆ getNumTriplets()
std::size_t visr::panning::LoudspeakerArray::getNumTriplets |
( |
| ) |
const |
|
inline |
◆ getPosition() [1/4]
XYZ& visr::panning::LoudspeakerArray::getPosition |
( |
std::size_t |
iSpk | ) |
|
|
inline |
Return the position of a loudspeaker based on its sorted position.
◆ getPosition() [2/4]
XYZ const& visr::panning::LoudspeakerArray::getPosition |
( |
std::size_t |
iSpk | ) |
const |
|
inline |
◆ getPosition() [3/4]
Return the position of a loudspeaker given its string id
◆ getPosition() [4/4]
◆ getPositions() [1/2]
XYZ* visr::panning::LoudspeakerArray::getPositions |
( |
| ) |
|
|
inline |
◆ getPositions() [2/2]
XYZ const* visr::panning::LoudspeakerArray::getPositions |
( |
| ) |
const |
|
inline |
◆ getReroutingCoefficient()
SampleType visr::panning::LoudspeakerArray::getReroutingCoefficient |
( |
std::size_t |
virtIdx, |
|
|
std::size_t |
realIdx |
|
) |
| const |
|
inline |
Retrieve the rereouting coefficient from a virtual to a real loudspeaker
- Parameters
-
virtIdx | virtual loudspeaker index (zero-offset) |
realIdx | real loudspeaker index (zero-offset) This is the logical speaker index, not the channel index used for routing. |
- Returns
- Rerouting coefficient as a linear-scale gain value (not incorporating gain corrections applied to the channel signal).
- Exceptions
-
std::out_of_range | if either virtIdx or realIdx is out of the respective admissible range. |
◆ getReroutingCoefficients()
Virtual speaker rerouting matrix configuration support. Retrieve the matrix of rereouting coefficients from virtual to real loudspeakers
- Returns
- Reference to rereouting matrix, dimension number of virtual loudspeakers * number of physical loudspeakers.
◆ getSpeakerChannel()
ChannelIndex visr::panning::LoudspeakerArray::getSpeakerChannel |
( |
std::size_t |
spkIndex | ) |
const |
|
inline |
Return the output channel index from a the speaker id of a regular loudspeaker.
- Parameters
-
spkIndex | The index into the loudspeaker array. |
- Exceptions
-
std::out_of_range | If spkIndex exceeds the number of regular loudspeakers. |
- Note
- The indices into the loudspeakers are assigned during construction and do not necessarily match the order in the configuration file.
◆ getSpeakerChannelFromId()
Return the output channel index (one-offset) from a loudspeaker string id.
- Parameters
-
id | String id corresponding to an existing regular loudspeaker. |
- Exceptions
-
std::out_of_range | If id does not correspond to an existing regular loudspeaker. |
◆ getSpeakerIndexFromId()
Return the index into the loudspeaker array for a speaker denoted by its string id.
- Parameters
-
id | loudspeaker id for either a regular or virtual loudspeaker. |
- Exceptions
-
std::out_of_range | If index exceeds the range of regular and virtual loudspeakers. |
◆ getSubwooferChannel()
ChannelIndex visr::panning::LoudspeakerArray::getSubwooferChannel |
( |
std::size_t |
subIdx | ) |
const |
|
inline |
◆ getSubwooferChannels()
ChannelIndex const* visr::panning::LoudspeakerArray::getSubwooferChannels |
( |
| ) |
const |
|
inline |
◆ getSubwooferDelayAdjustment()
SampleType visr::panning::LoudspeakerArray::getSubwooferDelayAdjustment |
( |
std::size_t |
spkIdx | ) |
const |
|
inline |
◆ getSubwooferGain()
SampleType visr::panning::LoudspeakerArray::getSubwooferGain |
( |
std::size_t |
subIdx, |
|
|
std::size_t |
spkIdx |
|
) |
| const |
|
inline |
Retrieve the matrix gain from a given loudspeaker to a given subwoofer.
- Parameters
-
subIdx | Subwoofer index (zero-offset) |
spkIdx | Loudspeaker index (zero-offset) This is the logical speaker index, not the channel index used for routing. |
- Returns
- Linear-scale gain value (not incorporating gain corrections applied to the channel signal).
- Exceptions
-
std::out_of_range | if either subIdx or spkIdx is out of the respective admissible range. |
◆ getSubwooferGainAdjustment()
SampleType visr::panning::LoudspeakerArray::getSubwooferGainAdjustment |
( |
std::size_t |
spkIdx | ) |
const |
|
inline |
◆ getSubwooferGains()
Retrieve the gain matrix for panning loudspeaker signals into the subwoofers.
- Returns
- Reference to gain matrix, dimension number of subwoofers * number of physical loudspeakers.
◆ getTriplet() [1/2]
TripletType& visr::panning::LoudspeakerArray::getTriplet |
( |
std::size_t |
iTri | ) |
|
|
inline |
◆ getTriplet() [2/2]
TripletType const& visr::panning::LoudspeakerArray::getTriplet |
( |
std::size_t |
iTri | ) |
const |
|
inline |
◆ is2D()
bool visr::panning::LoudspeakerArray::is2D |
( |
| ) |
const |
|
inline |
◆ isInfinite()
bool visr::panning::LoudspeakerArray::isInfinite |
( |
| ) |
const |
|
inline |
◆ loadXmlFile()
void visr::panning::LoudspeakerArray::loadXmlFile |
( |
std::string const & |
filePath | ) |
|
Initialise the loudspeaker array object from a file containing an array configuration in XML format
- Parameters
-
filePath | Full file path(including path and file extension). |
◆ loadXmlStream()
void visr::panning::LoudspeakerArray::loadXmlStream |
( |
std::istream & |
stream | ) |
|
Initialise the loudspeaker array object from a stream holding the array configuration in XML format.
- Parameters
-
stream | Initialised stream object holding an XML configuration. |
◆ loadXmlString()
void visr::panning::LoudspeakerArray::loadXmlString |
( |
std::string const & |
xmlString | ) |
|
Initialise the loudspeaker array object from a string containg the array configuration in XML format.
- Parameters
-
xmlString | String containing a XML array configuration as the top-level node. |
◆ loudspeakerId()
Return the loudspeaker id (a string label) corresponding to the given (sorted) loudspeaker label.
- Parameters
-
index | zero-offset index into the loudspeaker array. |
- Exceptions
-
std::out_of_range | If index exceeds the range of regular and virt ual loudspeakers. |
◆ operator=()
Assignment operator We need an explicitly defined assignment operator because some members (BasicMatrix) intentionally do not have a copy constructor.
◆ outputEqualisationBiquads()
Return a matrix containing the biquad parameters for all output sections. The dimension of the matrix is
(numRegularSpeakers()+getNumSubwoofers()) x outputEqualisationNumberOfBiquads()
- Exceptions
-
◆ outputEqualisationNumberOfBiquads()
std::size_t visr::panning::LoudspeakerArray::outputEqualisationNumberOfBiquads |
( |
| ) |
const |
Query the number of biquads per output channel. Returns 0 if no equalisation configuration is present.
◆ outputEqualisationPresent()
bool visr::panning::LoudspeakerArray::outputEqualisationPresent |
( |
| ) |
const |
Optional support for equalization of ouput channels. Query if the array configuration contained an output equalisation configuration. Technically, that means that the XML file contains a outputEqConfiguration section.
◆ setTriplet()
std::size_t visr::panning::LoudspeakerArray::setTriplet |
( |
std::size_t |
iTri, |
|
|
std::size_t |
l1, |
|
|
std::size_t |
l2, |
|
|
std::size_t |
l3 |
|
) |
| |
|
inline |
The documentation for this class was generated from the following file: