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

The planewaves peak level meter. More...

#include <Meter.h>

Inheritance diagram for Hoa3D::Meter:
Hoa3D::Planewaves

Public Member Functions

 Meter (unsigned int numberOfLoudspeakers, unsigned int numberOfRows, unsigned int numberOfColumns)
 The meter constructor. More...
 
 ~Meter ()
 The meter destructor. More...
 
void setLoudspeakerPosition (unsigned int index, double azimuth, double elevation)
 Set the position of a loudspeaker. More...
 
unsigned int getNumberOfRows () const
 Retrieve the number of rows. More...
 
unsigned int getNumberOfColumns () const
 Retrieve the number of column. More...
 
void process (const float *inputs)
 This method performs the widening with single precision. More...
 
void process (const double *inputs)
 This method performs the widening with double precision. More...
 
- Public Member Functions inherited from Hoa3D::Planewaves
 Planewaves (unsigned int numberOfLoudspeakers)
 The planewaves constructor. More...
 
 ~Planewaves ()
 The planewaves destructor. More...
 
void setLoudspeakerPosition (unsigned int index, double azimuth, double elevation)
 Set the position of a loudspeaker. More...
 
unsigned int getNumberOfLoudspeakers () const
 Retrieve the number of loudspeakers. More...
 
double getLoudspeakerAzimuth (unsigned int index) const
 Retrieve the azimuth of a loudspeaker. More...
 
double getLoudspeakerElevation (unsigned int index) const
 Retrieve the elevation of a loudspeaker. More...
 
double getLoudspeakerAbscissa (unsigned int index) const
 Retrieve the abscissa of a loudspeaker. More...
 
double getLoudspeakerOrdinate (unsigned int index) const
 Retrieve the ordinate of a loudspeaker. More...
 
double getLoudspeakerHeight (unsigned int index) const
 Retrieve the height of a loudspeaker. More...
 
std::string getLoudspeakerName (unsigned int index)
 Retrieve the number of loudspeaker. More...
 

Detailed Description

The planewaves peak level meter.

The meter should be used to widen the sound propagation.

Definition at line 17 of file Meter.h.

Constructor & Destructor Documentation

Hoa3D::Meter::Meter ( unsigned int  numberOfLoudspeakers,
unsigned int  numberOfRows,
unsigned int  numberOfColumns 
)

The meter constructor.

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

Parameters
orderThe order.

Definition at line 11 of file Meter.cpp.

Hoa3D::Meter::~Meter ( )

The meter destructor.

The meter destructor free the memory.

Definition at line 109 of file Meter.cpp.

Member Function Documentation

unsigned int Hoa3D::Meter::getNumberOfColumns ( ) const
inline

Retrieve the number of column.

Retrieve the number of column used to discretize the ambisonic sphere.
Returns
This method returns the number of column used to discretize the sphere.

Definition at line 92 of file Meter.h.

unsigned int Hoa3D::Meter::getNumberOfRows ( ) const
inline

Retrieve the number of rows.

Retrieve the number of rows used to discretize the ambisonic sphere.
Returns
This method returns the number of rows used to discretize the sphere.

Definition at line 82 of file Meter.h.

void Hoa3D::Meter::process ( const float *  inputs)

This method performs the widening with single precision.

You should use this method for in-place or not-in-place processing and performs the widening sample by sample. The inputs array and outputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics.

Parameters
inputsThe inputs array.

Definition at line 69 of file Meter.cpp.

void Hoa3D::Meter::process ( const double *  inputs)

This method performs the widening with double precision.

You should use this method for in-place or not-in-place processing and performs the widening sample by sample. The inputs array and outputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics.

Parameters
inputsThe inputs array.

Definition at line 89 of file Meter.cpp.

void Hoa3D::Meter::setLoudspeakerPosition ( unsigned int  index,
double  azimuth,
double  elevation 
)

Set the position of a loudspeaker.

Set the position of a loudspeaker with polar coordinates. The azimtuh is in radian between 0 and 2 Pi, O is the front of the soundfield and Pi is the back of the sound field. The elevation is in radian between -1/2 Pi and 1/2 Pi, -1/2 Pi the the bottom of the sound field, 0 is the center of the sound field and 1/2 Pi is the top of the sound field. The maximum index must be the number of loudspeakers - 1.

Parameters
indexThe index of the loudspeaker.
azimuthThe azimuth.
elevationThe elevation.

Definition at line 38 of file Meter.cpp.