HoaLibrary
2.0
High Order Ambisonics Library
|
The ambisonic vector. More...
#include <Vector.h>
Public Member Functions | |
Vector (unsigned int numberOfChannels) | |
The vector constructor. More... | |
~Vector () | |
The optimization 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 azimtuh of a channel. More... | |
void | setChannelsAzimuth (double *azimuth) |
Set the azimtuh of all the channels. 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 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 vector.
The vector class compute the energy and the velocity vector of a soudfield for a set of channels. 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 and the ordinate.
Hoa2D::Vector::Vector | ( | unsigned int | numberOfChannels | ) |
The vector constructor.
The optimization constructor allocates and initialize the member values to computes vectors. The number of channels must be at least 1.
numberOfChannels | The number of channels. |
Definition at line 11 of file Vector.cpp.
Hoa2D::Vector::~Vector | ( | ) |
The optimization destructor.
The optimization destructor free the memory.
Definition at line 151 of file Vector.cpp.
|
inline |
void Hoa2D::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 contains the channels samples and the minimum size must be the number of channels. The outputs array contains the vectors cartesian coordinates and the minimum size must be 4. The coordinates arrangement in the outputs array is velocity abscissa, velocity ordinate, energy abscissa, energy ordinate.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 139 of file Vector.cpp.
void Hoa2D::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 contains the channels samples and the minimum size must be the number of channels. The outputs array contains the vectors cartesian coordinates and the minimum size must be 4. The coordinates arrangement in the outputs array is velocity abscissa, velocity ordinate, energy abscissa, energy ordinate.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 145 of file Vector.cpp.
void Hoa2D::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 channels 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 2. The coordinates arrangement in the outputs array is energy abscissa, energy ordinate.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 92 of file Vector.cpp.
void Hoa2D::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 channels 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 2. The coordinates arrangement in the outputs array is energy abscissa, energy ordinate.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 115 of file Vector.cpp.
void Hoa2D::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 channels samples and the minimum size must be the number of channels. The outputs array contains the vectors cartesian coordinates and the minimum size must be 2. The coordinates arrangement in the outputs array is velocity abscissa, velocity ordinate.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 54 of file Vector.cpp.
void Hoa2D::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 channels samples and the minimum size must be the number of channels. The outputs array contains the vectors cartesian coordinates and the minimum size must be 2. The coordinates arrangement in the outputs array is velocity abscissa, velocity ordinate.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 73 of file Vector.cpp.
void Hoa2D::Vector::setChannelAzimuth | ( | unsigned int | index, |
double | azimuth | ||
) |
Set the azimtuh of a channel.
Set the azimtuh of a channel. 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 maximum index must be the number of channel - 1.
index | The index of the channel. |
azimuth | The azimuth. |
Definition at line 37 of file Vector.cpp.
void Hoa2D::Vector::setChannelsAzimuth | ( | double * | azimuth | ) |
Set the azimtuh of all the channels.
Set the azimtuh of all the channels. 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 44 of file Vector.cpp.
void Hoa2D::Vector::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 27 of file Vector.cpp.