HoaLibrary
2.0
High Order Ambisonics Library
|
The ambisonic irregular decoder. More...
#include <Decoder.h>
Public Member Functions | |
DecoderIrregular (unsigned int order, unsigned int numberOfChannels) | |
The irregular decoder constructor. More... | |
~DecoderIrregular () | |
The irregular decoder destructor. More... | |
void | setChannelsOffset (double offset) |
Set the offset of the channels. More... | |
double | getChannelsOffset () const |
Get the offset of the channels. More... | |
void | setChannelAzimuth (unsigned int index, double azimuth) |
Set the azimuth of a channel. More... | |
void | setChannelsAzimtuh (double *azimuths) |
Set the azimtuh of all the channels. More... | |
void | process (const float *input, float *output) |
This method performs the irregular decoding with single precision. More... | |
void | process (const double *input, double *output) |
This method performs the irregular decoding with double precision. More... | |
![]() | |
Ambisonic (unsigned int order) | |
The ambisonic constructor. More... | |
~Ambisonic () | |
The ambisonic destructor. More... | |
unsigned int | getOrder () const |
Retrieve the decomposition order. More... | |
unsigned int | getNumberOfHarmonics () const |
Retrieve the number of harmonics. More... | |
long | getHarmonicArgument (unsigned int index) const |
Retrieve the argument of an harmonic. More... | |
long | getHarmonicBand (unsigned int index) const |
Retrieve the band of an harmonic. More... | |
std::string | getHarmonicsName (unsigned int index) const |
Retrieve a name for an harmonic. More... | |
![]() | |
Planewaves (unsigned int numberOfChannels) | |
The planewaves constructor. More... | |
~Planewaves () | |
The planewaves destructor. More... | |
unsigned int | getNumberOfChannels () const |
Retrieve the number of channels. More... | |
double | getChannelAzimuth (unsigned int index) const |
Retrieve the azimuth of a channel. More... | |
double | getChannelAbscissa (unsigned int index) const |
Retrieve the abscissa of a channel. More... | |
double | getChannelOrdinate (unsigned int index) const |
Retrieve the ordinate of a channel. More... | |
std::string | getChannelName (unsigned int index) |
Retrieve a name for a channel. More... | |
Additional Inherited Members | |
![]() | |
void | setChannelAzimuth (unsigned int index, double azimuth) |
Set the azimuth of a channel. More... | |
void | setChannelsAzimuth (double *azimuths) |
Set the azimtuh of all the channels. More... | |
The ambisonic irregular decoder.
The irregular decoder should be used to decode an ambisonic sound field for a set a channels not equally spaced on a circle, like stereo or 5.1, depending on a decomposition order. The number of channels must be at least 1.
Hoa2D::DecoderIrregular::DecoderIrregular | ( | unsigned int | order, |
unsigned int | numberOfChannels | ||
) |
The irregular decoder constructor.
The irregular decoder constructor allocates and initialize the member values to the decoding matrix depending of a decomposition order and a number of channels. The order and the number of channels must be at least 1.
order | The order |
numberOfChannels | The number of channels. |
Definition at line 62 of file Decoder.cpp.
Hoa2D::DecoderIrregular::~DecoderIrregular | ( | ) |
The irregular decoder destructor.
The irregular decoder destructor free the memory.
Definition at line 183 of file Decoder.cpp.
|
inline |
void Hoa2D::DecoderIrregular::process | ( | const float * | input, |
float * | output | ||
) |
This method performs the irregular decoding with single precision.
You should use this method for in-place or not-in-place processing and performs the irregular decoding sample by sample. The inputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics and the outputs array contains the channels samples and the minimum size must be the number of channels.
input | The input sample. |
outputs | The output array that contains samples destinated to channels. |
Definition at line 173 of file Decoder.cpp.
void Hoa2D::DecoderIrregular::process | ( | const double * | input, |
double * | output | ||
) |
This method performs the irregular decoding with double precision.
You should use this method for in-place or not-in-place processing and performs the irregular decoding sample by sample. The inputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics and the outputs array contains the channels samples and the minimum size must be the number of channels.
input | The input sample. |
outputs | The output array that contains samples destinated to channels. |
Definition at line 178 of file Decoder.cpp.
void Hoa2D::DecoderIrregular::setChannelAzimuth | ( | unsigned int | index, |
double | azimuth | ||
) |
Set the azimuth of a channel.
Set the azimuth of a channel. The azimuth is in radian between 0 and 2 Pi, O is the front of the soundfield and Pi is the back of the sound field. The maximum index must be the number of channel - 1.
index | The index of the loudspeaker. |
azimuth | The azimuth. |
Definition at line 84 of file Decoder.cpp.
void Hoa2D::DecoderIrregular::setChannelsAzimtuh | ( | double * | azimuths | ) |
Set the azimtuh of all the channels.
Set the azimtuh of all the channels. It is more efficient to set all the channels azimuths at the same time because even if only one channel has changed, all the decoding matrix have to be recomputed. The azimuths are in radian between 0 and 2 Pi, O is the front of the soundfield and Pi is the back of the sound field. The azimtuhs array must have a minimum size of the number of channels.
azimuths | The azimuths array. |
Definition at line 78 of file Decoder.cpp.
void Hoa2D::DecoderIrregular::setChannelsOffset | ( | double | offset | ) |
Set the offset of the channels.
Set the azimuth offset of the channels in radian.
offset | An azimuth value. |
Definition at line 72 of file Decoder.cpp.