HoaLibrary  2.0
High Order Ambisonics Library
 All Classes Namespaces Functions Enumerations Enumerator
Public Member Functions | List of all members
Hoa3D::Ambisonic Class Reference

The ambisonic class. More...

#include <Ambisonic.h>

Inheritance diagram for Hoa3D::Ambisonic:
Hoa3D::Decoder Hoa3D::Encoder Hoa3D::Map Hoa3D::Optim Hoa3D::Rotate Hoa3D::Scope Hoa3D::Wider

Public Member Functions

 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...
 

Detailed Description

The ambisonic class.

The ambisonics classes inherit from this classe. It computes the number of harmonics depending of the decomposition order and sorts the arguments and the bands of the harmonics in arrays.

Definition at line 21 of file Ambisonic.h.

Constructor & Destructor Documentation

Hoa3D::Ambisonic::Ambisonic ( unsigned int  order)

The ambisonic constructor.

The ambisonic constructor allocates and initializes the generale member values depending of a decomposition order. The order must be at least 1.

Parameters
orderThe order.

Definition at line 11 of file Ambisonic.cpp.

Hoa3D::Ambisonic::~Ambisonic ( )

The ambisonic destructor.

The ambisonic destructor free the memory.

Definition at line 30 of file Ambisonic.cpp.

Member Function Documentation

int Hoa3D::Ambisonic::getHarmonicArgument ( const unsigned int  index) const
inline

Retrieve the argument of an harmonic.

The argument of an harmonic is in the range -band to band. The harmonics are sorted by their bands, from 0 to the decomposition order. In each band contains 2 * band + 1 harmonics, sorted by their arguments in the range -band to band. The harmonic input and output arrays in process method of ambisonic classes must have this configuration. For the first bands, the harmonics arrangement is h[0, 0] h[1, 0] h[1, -1] h[1, 1] h[2, 0] h[2, -1] h[2, 1] h[2, -2] h[2, 2] etc. with h[band, argument].

Parameters
indexThe global index of an harmonic.
Returns
The method returns the argument of the harmonic if the harmonic exists, otherwise the function generates an error.
See Also
getHarmonicBand()
getHarmonicsName()

Definition at line 63 of file Ambisonic.h.

unsigned int Hoa3D::Ambisonic::getHarmonicBand ( const unsigned int  index) const
inline

Retrieve the band of an harmonic.

The bands of the harmonics are in the range 0 to the decomposition order. Each band contains 2 * band + 1 harmonics in the range -band to band. The harmonic input and output arrays in process method of ambisonic classes must have this configuration. For the first bands, the harmonics arrangement is h[0, 0] h[1, 0] h[1, -1] h[1, 1] h[2, 0] h[2, -1] h[2, 1] h[2, -2] h[2, 2] etc. with h[band, argument].

Parameters
indexThe global index of an harmonic.
Returns
The method returns the band of the harmonic if the harmonic exists, otherwise the function generates an error.
See Also
getHarmonicArgument()
getHarmonicsName()

Definition at line 79 of file Ambisonic.h.

std::string Hoa3D::Ambisonic::getHarmonicsName ( const unsigned int  index) const
inline

Retrieve a name for an harmonic.

Retrieve a name for an harmonic in a std::string format that will be "harmonic band argument".

Parameters
indexThe global index of an harmonic.
Returns
The method returns a name for the harmonic that contains its band and its argument if the harmonic exists, otherwise the function generates an error.
See Also
getHarmonicBand()
getHarmonicArgument()

Definition at line 93 of file Ambisonic.h.

unsigned int Hoa3D::Ambisonic::getNumberOfHarmonics ( ) const
inline

Retrieve the number of harmonics.

Retrieve the number of harmonics of an ambisonic class.

Definition at line 51 of file Ambisonic.h.

unsigned int Hoa3D::Ambisonic::getOrder ( ) const
inline

Retrieve the decomposition order.

Retrieve the decomposition order of an ambisonic class.

Definition at line 46 of file Ambisonic.h.