HoaLibrary
2.0
High Order Ambisonics Library
|
The planewaves vector. More...
#include <Vector.h>
Public Member Functions | |
Vector (unsigned int numberOfLoudspeakers) | |
The vector constructor. More... | |
~Vector () | |
The optimization destructor. More... | |
void | setLoudspeakerPosition (unsigned int index, double azimuth, double elevation) |
Set the position of a loudspeaker. More... | |
void | process (const float *inputs, float *outputs) |
This method compute the energy and velocity vectors with single precision. More... | |
void | process (const double *inputs, double *outputs) |
This method compute the energy and velocity vectors with double precision. More... | |
void | processVelocity (const float *inputs, float *outputs) |
This method compute the velocity vector with single precision. More... | |
void | processVelocity (const double *inputs, double *outputs) |
This method compute the velocity vector with double precision. More... | |
void | processEnergy (const float *inputs, float *outputs) |
This method compute the energy vector with single precision. More... | |
void | processEnergy (const double *inputs, double *outputs) |
This method compute the energy vector with double precision. More... | |
![]() | |
Planewaves (unsigned int numberOfLoudspeakers) | |
The planewaves constructor. More... | |
~Planewaves () | |
The planewaves destructor. More... | |
void | setLoudspeakerPosition (unsigned int index, double azimuth, double elevation) |
Set the position of a loudspeaker. More... | |
unsigned int | getNumberOfLoudspeakers () const |
Retrieve the number of loudspeakers. More... | |
double | getLoudspeakerAzimuth (unsigned int index) const |
Retrieve the azimuth of a loudspeaker. More... | |
double | getLoudspeakerElevation (unsigned int index) const |
Retrieve the elevation of a loudspeaker. More... | |
double | getLoudspeakerAbscissa (unsigned int index) const |
Retrieve the abscissa of a loudspeaker. More... | |
double | getLoudspeakerOrdinate (unsigned int index) const |
Retrieve the ordinate of a loudspeaker. More... | |
double | getLoudspeakerHeight (unsigned int index) const |
Retrieve the height of a loudspeaker. More... | |
std::string | getLoudspeakerName (unsigned int index) |
Retrieve the number of loudspeaker. More... | |
The planewaves vector.
The vector class compute the energy and the velocity vector of a soudfield with signal of a spjerical set of loudspeakers. It is an useful tool to characterize the quality of the sound field resitution. For futher information : Michael A. Gerzon, General metatheorie of auditory localisation. Audio Engineering Society Preprint, 3306, 1992. This class retreive the cartesian coordinates of the vectors, the abscissa, the ordinate and the height.
Hoa3D::Vector::Vector | ( | unsigned int | numberOfLoudspeakers | ) |
The vector constructor.
The optimization constructor allocates and initialize the member values to computes vectors. The numberOfLoudspeakers must be at least 1.
numberOfLoudspeakers | The number of loudspeakers. |
Definition at line 11 of file Vector.cpp.
Hoa3D::Vector::~Vector | ( | ) |
The optimization destructor.
The optimization destructor free the memory.
Definition at line 151 of file Vector.cpp.
void Hoa3D::Vector::process | ( | const float * | inputs, |
float * | outputs | ||
) |
This method compute the energy and velocity vectors with single precision.
You should use this method for in-place or not-in-place processing and compute the vectors sample by sample. The inputs array and contains the spherical harmonics samples and the minimum size must be the number of harmonics. The outputs array contains the vectors cartesian coordinates and the minimum size must be 6. The coordinates arrengement in the outputs array is velocity abscissa, velocity ordinate, velocity height, energy abscissa, energy ordinate, energy height.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 139 of file Vector.cpp.
void Hoa3D::Vector::process | ( | const double * | inputs, |
double * | outputs | ||
) |
This method compute the energy and velocity vectors with double precision.
You should use this method for in-place or not-in-place processing and compute the vectors sample by sample. The inputs array and contains the spherical harmonics samples and the minimum size must be the number of harmonics. The outputs array contains the vectors cartesian coordinates and the minimum size must be 6. The coordinates arrengement in the outputs array is velocity abscissa, velocity ordinate, velocity height, energy abscissa, energy ordinate, energy height.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 145 of file Vector.cpp.
void Hoa3D::Vector::processEnergy | ( | const float * | inputs, |
float * | outputs | ||
) |
This method compute the energy vector with single precision.
You should use this method for in-place or not-in-place processing and compute the vectors sample by sample. The inputs array and contains the spherical harmonics samples and the minimum size must be the number of harmonics. The outputs array contains the vectors cartesian coordinates and the minimum size must be 3. The coordinates arrengement in the outputs array is energy abscissa, energy ordinate, energy height.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 86 of file Vector.cpp.
void Hoa3D::Vector::processEnergy | ( | const double * | inputs, |
double * | outputs | ||
) |
This method compute the energy vector with double precision.
You should use this method for in-place or not-in-place processing and compute the vectors sample by sample. The inputs array and contains the spherical harmonics samples and the minimum size must be the number of harmonics. The outputs array contains the vectors cartesian coordinates and the minimum size must be 3. The coordinates arrengement in the outputs array is energy abscissa, energy ordinate, energy height.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 112 of file Vector.cpp.
void Hoa3D::Vector::processVelocity | ( | const float * | inputs, |
float * | outputs | ||
) |
This method compute the velocity vector with single precision.
You should use this method for in-place or not-in-place processing and compute the vectors sample by sample. The inputs array and contains the spherical harmonics samples and the minimum size must be the number of harmonics. The outputs array contains the vectors cartesian coordinates and the minimum size must be 3. The coordinates arrengement in the outputs array is velocity abscissa, velocity ordinate, velocity height.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 41 of file Vector.cpp.
void Hoa3D::Vector::processVelocity | ( | const double * | inputs, |
double * | outputs | ||
) |
This method compute the velocity vector with double precision.
You should use this method for in-place or not-in-place processing and compute the vectors sample by sample. The inputs array and contains the spherical harmonics samples and the minimum size must be the number of harmonics. The outputs array contains the vectors cartesian coordinates and the minimum size must be 3. The coordinates arrengement in the outputs array is velocity abscissa, velocity ordinate, velocity height.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 64 of file Vector.cpp.
void Hoa3D::Vector::setLoudspeakerPosition | ( | unsigned int | index, |
double | azimuth, | ||
double | elevation | ||
) |
Set the position of a loudspeaker.
Set the position of a loudspeaker with polar coordinates. The azimtuh 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 elevation is in radian between -1/2 Pi and 1/2 Pi, -1/2 Pi the the bottom of the sound field, 0 is the center of the sound field and 1/2 Pi is the top of the sound field. The maximum index must be the number of loudspeakers - 1.
index | The index of the loudspeaker. |
azimuth | The azimuth. |
elevation | The elevation. |
Definition at line 30 of file Vector.cpp.