HoaLibrary
2.0
High Order Ambisonics Library
|
The ambisonic optimization. More...
#include <Optim.h>
Public Types | |
enum | Mode { Basic = 0, MaxRe = 1, InPhase = 2 } |
Public Member Functions | |
Optim (unsigned int order, Mode mode) | |
The optimization constructor. More... | |
~Optim () | |
The optimization destructor. More... | |
Mode | getMode () const |
Retrieve the optimization mode. More... | |
void | setMode (Mode mode) |
This method set the optimization mode. More... | |
void | process (const float *inputs, float *outputs) |
This method performs the optimization with single precision. More... | |
void | process (const double *inputs, double *outputs) |
This method performs the optimization 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 optimization.
The optimization should be used to optimize the ambisonic sound field. There are 3 optimization modes, Basic (no optimization), MaxRe (energy vector optimization) and InPhase (energy and velocity vector optimization). Basic has no effect, it should be used with a perfect ambisonic loudspeakers, arrengement where all the loudspeakers are to equal distance on a circle, and for a listener placed at the perfect center of the circle. MaxRe should be used for auditory confined to the center of the circle. InPhase should be used when the auditory covers the entire loudspeakers area and when the loudspeakers arragement is not a perfect circle or when the loudspeakers are not to equal distance. Note that the optimizations decrease the precision of the sound field restitution thus it can be compared to particular cases of the fractional orders.
enum Hoa2D::Optim::Mode |
Hoa2D::Optim::Optim | ( | unsigned int | order, |
Mode | mode | ||
) |
Hoa2D::Optim::~Optim | ( | ) |
|
inline |
void Hoa2D::Optim::process | ( | const float * | inputs, |
float * | outputs | ||
) |
This method performs the optimization with single precision.
You should use this method for in-place or not-in-place processing and performs the optimization sample by sample. The inputs array and 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 Hoa2D::Optim::process | ( | const double * | inputs, |
double * | outputs | ||
) |
This method performs the optimization with double precision.
You should use this method for in-place or not-in-place processing and performs the optimization sample by sample. The inputs array and 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. |