HoaLibrary
2.0
High Order Ambisonics Library
|
The ambisonic multi-encoder with distance compensation. More...
#include <Map.h>
Public Member Functions | |
Map (unsigned int order, unsigned int numberOfSources) | |
The map constructor. More... | |
~Map () | |
The map destructor. More... | |
void | setAzimuth (unsigned int index, const double azimuth) |
This method set the angle of azimuth of a source. More... | |
void | setElevation (unsigned int index, const double elevation) |
This method set the angle of elevation of a source. More... | |
void | setDistance (unsigned int index, const double distance) |
This method set the diatnce of a source. More... | |
unsigned int | getNumberOfSources () const |
This method retrieve the number of sources. More... | |
void | process (const float *inputs, float *outputs) |
This method performs the encoding with distance compensation with single precision. More... | |
void | process (const double *inputs, double *outputs) |
This method performs the encoding with distance compensation 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... | |
int | getHarmonicArgument (const unsigned int index) const |
Retrieve the argument of an harmonic. More... | |
unsigned int | getHarmonicBand (const unsigned int index) const |
Retrieve the band of an harmonic. More... | |
std::string | getHarmonicsName (const unsigned int index) const |
Retrieve a name for an harmonic. More... | |
The ambisonic multi-encoder with distance compensation.
The map is a multi Encoder with distance compensation. It uses intances of the Wider class to decrease the directionnality of sources by simulating fractionnal orders when the sources are inside the ambisonic sphere and a simple diminution of the gain when the sources get away from the ambisonic sphere.
Hoa3D::Map::Map | ( | unsigned int | order, |
unsigned int | numberOfSources | ||
) |
The map constructor.
The map constructor allocates and initialize the member values and classes depending of a decomposition order and the number of sources. The order and the number of sources must be at least 1.
order | The order. |
numberOfSources | The number of sources. |
Hoa3D::Map::~Map | ( | ) |
|
inline |
void Hoa3D::Map::process | ( | const float * | inputs, |
float * | outputs | ||
) |
This method performs the encoding with distance compensation with single precision.
You should use this method for in-place or not-in-place processing and performs the encoding with distance compensation sample by sample. The inputs array contains the samples of the sources and the minimum size sould be the number of sources. The outputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics.
inputs | The inputs array. |
outputs | The outputs array. |
void Hoa3D::Map::process | ( | const double * | inputs, |
double * | outputs | ||
) |
This method performs the encoding with distance compensation with double precision.
You should use this method for in-place or not-in-place processing and performs the encoding with distance compensation sample by sample. The inputs array contains the samples of the sources and the minimum size sould be the number of sources. The outputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics.
inputs | The inputs array. |
outputs | The outputs array. |
void Hoa3D::Map::setAzimuth | ( | unsigned int | index, |
const double | azimuth | ||
) |
This method set the angle of azimuth of a source.
The angle of azimuth in radian, look at the Encoder for further informations. The index must be between 0 and the number of sources.
index | The index of the source. |
azimuth | The azimuth. |
void Hoa3D::Map::setDistance | ( | unsigned int | index, |
const double | distance | ||
) |
This method set the diatnce of a source.
The distance is between 0 and infinity. At 0, the source is in the center of the ambisonic sphere and at 1, the source is at the surface of the ambisonic sphere. Over 1, the source get away the ambisonic sphere. The index must be between 0 and the number of sources.
index | The index of the source. |
elevation | The elevation. |
void Hoa3D::Map::setElevation | ( | unsigned int | index, |
const double | elevation | ||
) |
This method set the angle of elevation of a source.
The angle of elevation in radian, look at the Encoder for further informations. The index must be between 0 and the number of sources.
index | The index of the source. |
elevation | The elevation. |