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... | |
void | setMode (Mode mode) |
This method set the optimization mode. More... | |
Mode | getMode () const |
Retrieve 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... | |
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 optimization.
The optimization should be used to optimize the ambisonic sound field. There are 3 optimization modes, Basic (no optimizations), 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 sphere) and for a listener placed at the perfect center of the sphere. MaxRe should be used for auditory confined to the center of the sphere. InPhase should be used when the auditory covers the entire loudspeaker area and when the loudspeakers arragement is not a perfect sphere or when the loudspeakers are not to equal distance. Note that the optimizations decrease the precision sound field restitution thus it can be compared to particular cases of the fractional orders.
enum Hoa3D::Optim::Mode |
Hoa3D::Optim::Optim | ( | unsigned int | order, |
Mode | mode | ||
) |
The optimization constructor.
The optimization constructor allocates and initialize the member values to computes spherical harmonics weighted coefficients depending of a decomposition order. The order must be at least 1.
order | The order. |
mode | The optimization mode. |
Hoa3D::Optim::~Optim | ( | ) |
|
inline |
void Hoa3D::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 Hoa3D::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. |