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

The ambisonic scope. More...

#include <Scope.h>

Inheritance diagram for Hoa2D::Scope:
Hoa2D::Ambisonic

Public Member Functions

 Scope (unsigned int order, unsigned int numberOfPoints)
 The scope constructor. More...
 
 ~Scope ()
 The Scope destructor. More...
 
unsigned int getNumberOfPoints () const
 Retrieve the number of points. More...
 
double getValue (unsigned int pointIndex) const
 Retrieve the value of a point of the circular harmonics projection. More...
 
double getRadius (unsigned int pointIndex) const
 Retrieve the radius of a point of the circular harmonics projection. More...
 
double getAzimuth (unsigned int pointIndex) const
 Retrieve the azimuth of a point of the circular harmonics projection. More...
 
double getAbscissa (unsigned int pointIndex) const
 Retrieve the abscissa of a point of the circular harmonics projection. More...
 
double getOrdinate (unsigned int pointIndex) const
 Retrieve the ordinate of a point of the circular harmonics projection. More...
 
void process (const float *inputs)
 This method performs the circular harmonics projection with single precision. More...
 
void process (const double *inputs)
 This method performs the circular harmonics 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...
 

Detailed Description

The ambisonic scope.

The scope discretize a circle by a set of point and uses a decoder to project the circular harmonics on it. This class should be used for graphical interfaces outside the digital signal processing if the number of points to discretize the circle is very large. Then you should prefer to record snapshot of the circular harmonics and to call the process method at an interval adapted to a graphical rendering.

Definition at line 18 of file Scope.h.

Constructor & Destructor Documentation

Hoa2D::Scope::Scope ( unsigned int  order,
unsigned int  numberOfPoints 
)

The scope constructor.

The scope constructor allocates and initialize the member values to computes circular harmonics projection on a circle depending on a decomposition order and a circle discretization. The circle is discretized by the number of points. The order must be at least 1. The number of points and column should be at least 3 (but it's very low).

Parameters
orderThe order.
numberOfPointsThe number of points.

Definition at line 11 of file Scope.cpp.

Hoa2D::Scope::~Scope ( )

The Scope destructor.

The Scope destructor free the memory.

Definition at line 50 of file Scope.cpp.

Member Function Documentation

double Hoa2D::Scope::getAbscissa ( unsigned int  pointIndex) const
inline

Retrieve the abscissa of a point of the circular harmonics projection.

Retrieve the abscissa of the circular harmonics projection for a given point defined by an index.The maximum index must be the number of points - 1.

Parameters
pointIndexThe point index of the point.
Returns
This method returns the abscissa of a point of the ambisonic circle.
See Also
getOrdinate

Definition at line 103 of file Scope.h.

double Hoa2D::Scope::getAzimuth ( unsigned int  pointIndex) const
inline

Retrieve the azimuth of a point of the circular harmonics projection.

Retrieve the azimuth of the circular harmonics projection for a given point defined by an index.The maximum index must be the number of points - 1.

Parameters
pointIndexThe point index of the point.
Returns
This method returns the azimuth of a point of the ambisonic circle.
See Also
getValue
getRadius

Definition at line 89 of file Scope.h.

unsigned int Hoa2D::Scope::getNumberOfPoints ( ) const
inline

Retrieve the number of points.

Retrieve the number of points used to discretize the ambisonic circle.

Returns
This method returns the number of points used to discretize the circle.

Definition at line 45 of file Scope.h.

double Hoa2D::Scope::getOrdinate ( unsigned int  pointIndex) const
inline

Retrieve the ordinate of a point of the circular harmonics projection.

Retrieve the ordinate of the circular harmonics projection for a given point defined by an index.The maximum index must be the number of points - 1.

Parameters
pointIndexThe point index of the point.
Returns
This method returns the ordinate of a point of the ambisonic circle.
See Also
getAbscissa

Definition at line 117 of file Scope.h.

double Hoa2D::Scope::getRadius ( unsigned int  pointIndex) const
inline

Retrieve the radius of a point of the circular harmonics projection.

Retrieve the radius of the circular harmonics projection for a given point defined by an index. This the absolute of the result of the projection. For the index, 0 is the 0 azimtuh of the circle. The maximum index must be the number of points - 1.

Parameters
pointIndexThe point index of the point.
Returns
This method returns the radius of a point of the ambisonic circle.
See Also
getAzimuth
getValue

Definition at line 74 of file Scope.h.

double Hoa2D::Scope::getValue ( unsigned int  pointIndex) const
inline

Retrieve the value of a point of the circular harmonics projection.

Retrieve the result value of the circular harmonics projection for a given point defined by an index. The absolute of the value can be used as the radius of the point for a 2 dimentionnal representation. For the index, 0 is the 0 azimtuh of the circle. The maximum index must be the number of points - 1.
Parameters
pointIndexThe point index of the point.
Returns
This method returns the value of a point of the ambisonic circle.
See Also
getradius
getAzimuth

Definition at line 59 of file Scope.h.

void Hoa2D::Scope::process ( const float *  inputs)

This method performs the circular harmonics projection with single precision.

You should use this method to compute the projection of the circular harmonics over an ambisonics circle. The inputs array contains the circular harmonics samples and the minimum size must be the number of harmonics.

Parameters
inputsThe inputs array.

Definition at line 24 of file Scope.cpp.

void Hoa2D::Scope::process ( const double *  inputs)

This method performs the circular harmonics projection with double precision.

You should use this method to compute the projection of the circular harmonics over an ambisonics circle. The inputs array contains the circular harmonics samples and the minimum size must be the number of harmonics.

Parameters
inputsThe inputs array.

Definition at line 39 of file Scope.cpp.