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

The ambisonic class. More...

#include <Ambisonic.h>

Inheritance diagram for Hoa2D::Ambisonic:
Hoa2D::DecoderBinaural Hoa2D::DecoderIrregular Hoa2D::DecoderMulti Hoa2D::DecoderRegular Hoa2D::Encoder Hoa2D::Map Hoa2D::Optim Hoa2D::Projector Hoa2D::Recomposer Hoa2D::Rotate Hoa2D::Scope Hoa2D::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...
 
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...
 

Detailed Description

The ambisonic class.

Most of the ambisonic classes inherit from this classe. It computes the number of harmonics, their arguments and their orders depending of the decomposition order. etc...

Definition at line 18 of file Ambisonic.h.

Constructor & Destructor Documentation

Hoa2D::Ambisonic::Ambisonic ( unsigned int  order)

The ambisonic constructor.

The ambisonic constructor allocates and initializes the generale member values depending of a decomposition order.

Parameters
orderThe order, must be at least 1.

Definition at line 11 of file Ambisonic.cpp.

Hoa2D::Ambisonic::~Ambisonic ( )

The ambisonic destructor.

The ambisonic destructor.

Definition at line 25 of file Ambisonic.cpp.

Member Function Documentation

long Hoa2D::Ambisonic::getHarmonicArgument ( unsigned int  index) const
inline

Retrieve the argument of an harmonic.

The argument of an harmonic is in the range -order to order. The harmonics are sorted by their bands, from 0 to the decomposition order and, in each band, there are the 2 harmonics with the arguments -band and band. For the first bands, the harmonics arrangement is h[0] h[-1] h[1] h[-2] h[2] h[-3] h[3]etc. with h[argument].

Parameters
indexThe 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 65 of file Ambisonic.h.

long Hoa2D::Ambisonic::getHarmonicBand ( 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 harmonics with the arguments -band and band. For the first bands, the harmonics arrangement is h[0] h[-1] h[1] h[-2] h[2] h[-3] h[3], etc. with h[argument].

Parameters
indexThe 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 Hoa2D::Ambisonic::getHarmonicsName ( 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 argument".

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

Definition at line 94 of file Ambisonic.h.

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

Retrieve the number of harmonics.

Retrieve the number of harmonics.

Returns
The number of harmonics.

Definition at line 52 of file Ambisonic.h.

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

Retrieve the decomposition order.

Retrieve the decomposition order.

Returns
The order.

Definition at line 42 of file Ambisonic.h.