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

The ambisonic projector. More...

#include <Projector.h>

Inheritance diagram for Hoa2D::Projector:
Hoa2D::Ambisonic Hoa2D::Planewaves

Public Member Functions

 Projector (unsigned int order, unsigned int numberOfChannels)
 The projector constructor. More...
 
 ~Projector ()
 The projector destructor. More...
 
void process (const float *inputs, float *outputs)
 This method performs the projection with single precision. More...
 
void process (const double *inputs, double *outputs)
 This method performs the projection with double precision. More...
 
- Public Member Functions inherited from Hoa2D::Ambisonic
 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...
 
- Public Member Functions inherited from Hoa2D::Planewaves
 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

- Protected Member Functions inherited from Hoa2D::Planewaves
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...
 

Detailed Description

The ambisonic projector.

The projector should be used to projects the circular harmonics on a circle and to give access to the planewaves domain. The projection is similar to the decoding exept that the circle discretization cannot be defined be the user. Then the number of channels (or planewaves) must be a least the number of harmonics, the first angle is 0 radian and the angular distances between the channels are equals.

Definition at line 19 of file Projector.h.

Constructor & Destructor Documentation

Hoa2D::Projector::Projector ( unsigned int  order,
unsigned int  numberOfChannels 
)

The projector constructor.

The projector constructor allocates and initialize the member values to project the circular harmonics on a circle. The order must be at least 1 and the number of channels must be a least the number of harmonics.

Parameters
orderThe order.
numberOfChannelsThe number of channels.

Definition at line 11 of file Projector.cpp.

Hoa2D::Projector::~Projector ( )

The projector destructor.

The projector destructor free the memory.

Definition at line 41 of file Projector.cpp.

Member Function Documentation

void Hoa2D::Projector::process ( const float *  inputs,
float *  outputs 
)

This method performs the projection with single precision.

You should use this method for in-place or not-in-place processing and performs the projection sample by sample. The inputs array contains the circular harmonics samples and the minimum size must be the number of harmonics and the outputs array contains the channels (or planewaves) samples and the minimum size must be a least the number of channels.

Parameters
inputsThe inputs array.
outputsThe outputs array.

Definition at line 31 of file Projector.cpp.

void Hoa2D::Projector::process ( const double *  inputs,
double *  outputs 
)

This method performs the projection with double precision.

You should use this method for in-place or not-in-place processing and performs the projection sample by sample. The inputs array contains the circular harmonics samples and the minimum size must be the number of harmonics and the outputs array contains the channels (or planewaves) samples and the minimum size must be a least the number of channels.

Parameters
inputsThe inputs array.
outputsThe outputs array.

Definition at line 36 of file Projector.cpp.