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

The ambisonic wider. More...

#include <Wider.h>

Inheritance diagram for Hoa2D::Wider:
Hoa2D::Ambisonic

Public Member Functions

 Wider (unsigned int order)
 The wider constructor. More...
 
 ~Wider ()
 The wider destructor. More...
 
void setWideningValue (const double value)
 This method set the widening value. More...
 
double getWideningValue () const
 This method retreive the widening value. More...
 
void process (const float *inputs, float *outputs)
 This method performs the widening with single precision. More...
 
void process (const double *inputs, double *outputs)
 This method performs the widening 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 wider.

The wider should be used to widen the sound propagation with fractional order simulution. The sound field precision depends to the decomposition order. The zero decomposition order has 1 omnidirectionnal harmonic and all the sounds seem to come from all the directions. While the order increases, the number of harmonics increases, the lobes of an encoded sounds narrow and the origin of the sounds is more accurate. Then fractional order can be used to decrease the sound field precision and to wide the sound field propagation.

Definition at line 17 of file Wider.h.

Constructor & Destructor Documentation

Hoa2D::Wider::Wider ( unsigned int  order)

The wider constructor.

The wider constructor allocates and initialize the member values to computes circular harmonics weighted coefficients depending of a decomposition order. The order must be at least 1.

Parameters
orderThe order.

Definition at line 11 of file Wider.cpp.

Hoa2D::Wider::~Wider ( )

The wider destructor.

The wider destructor free the memory.

Definition at line 59 of file Wider.cpp.

Member Function Documentation

double Hoa2D::Wider::getWideningValue ( ) const
inline

This method retreive the widening value.

The method returns the widening value.

Returns
The widening value.

Definition at line 50 of file Wider.h.

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

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 circular harmonics samples and the minimum size must be the number of harmonics.

Parameters
inputsThe inputs array.
outputsThe outputs array.

Definition at line 47 of file Wider.cpp.

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

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 circular harmonics samples and the minimum size must be the number of harmonics.

Parameters
inputsThe inputs array.
outputsThe outputs array.

Definition at line 53 of file Wider.cpp.

void Hoa2D::Wider::setWideningValue ( const double  value)

This method set the widening value.

The widening value is clipped between 0 and 1. At 1, the sound field has no changes. At 0, all the sound field is omnidirectionnal, only the harmonic [0 0] remains. From 0 to 1, the circular hamronics appears in logarithmic way to linearly increase the sound field precision.

Parameters
valueThe widening value.

Definition at line 42 of file Wider.cpp.