HoaLibrary
2.0
High Order Ambisonics Library
|
The ambisonic encoder. More...
#include <Encoder.h>
Public Member Functions | |
Encoder (unsigned int order) | |
The encoder constructor. More... | |
~Encoder () | |
The encoder destructor. More... | |
void | setAzimuth (const double azimuth) |
This method set the angle of azimuth. More... | |
double | getAzimuth () const |
This method performs the encoding with single precision. More... | |
void | process (const float input, float *outputs) |
This method performs the encoding with single precision. More... | |
void | process (const double input, double *outputs) |
This method performs the encoding 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... | |
The ambisonic encoder.
The encoder should be used to encode a signal in the spherical harmonics domain depending of an order of decomposition. It allows to control the azimuth of the encoding.
Hoa2D::Encoder::Encoder | ( | unsigned int | order | ) |
The encoder constructor.
The encoder constructor allocates and initialize the member values to computes spherical harmonics coefficients depending of a decomposition order. The order must be at least 1.
order | The order. |
Definition at line 11 of file Encoder.cpp.
Hoa2D::Encoder::~Encoder | ( | ) |
The encoder destructor.
The encoder destructor free the memory.
Definition at line 55 of file Encoder.cpp.
|
inline |
This method performs the encoding with single precision.
You should use this method for in-place or not-in-place processing and performs the encoding sample by sample. The outputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics.
input | The input sample. |
outputs | The output array.Get the azimuth angle The method returns the last angle of encoding between 0 and 2π. |
void Hoa2D::Encoder::process | ( | const float | input, |
float * | outputs | ||
) |
This method performs the encoding with single precision.
You should use this method for in-place or not-in-place processing and performs the encoding sample by sample. The outputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics.
input | The input sample. |
outputs | The output array. |
Definition at line 23 of file Encoder.cpp.
void Hoa2D::Encoder::process | ( | const double | input, |
double * | outputs | ||
) |
This method performs the encoding with double precision.
You should use this method for in-place or not-in-place processing and performs the encoding sample by sample. The outputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics.
input | The input sample. |
outputs | The output array. |
Definition at line 39 of file Encoder.cpp.
void Hoa2D::Encoder::setAzimuth | ( | const double | azimuth | ) |
This method set the angle of azimuth.
The angle of azimuth in radian and you should prefer to use it between 0 and 2 Pi to avoid recursive wrapping of the value. The direction of rotation is counterclockwise. The 0 radian is Pi/2 phase shifted relative to a mathematical representation of a circle, then the 0 radian is at the "front" of the soundfield.
azimuth | The azimuth. |
Definition at line 16 of file Encoder.cpp.