HoaLibrary
2.0
High Order Ambisonics Library
|
The ambisonic recomposer. More...
#include <Recomposer.h>
Public Member Functions | |
Recomposer (unsigned int order, unsigned int numberOfChannels) | |
The recomposer constructor. More... | |
~Recomposer () | |
The recomposer destructor. More... | |
void | setAzimuth (unsigned int index, const double azimuth) |
This method set the angle of azimuth of a channel. More... | |
void | setWideningValue (unsigned int index, const double value) |
This method set the widening value of a channel. More... | |
void | setFisheye (const double fisheye) |
This method set the fisheye factor. More... | |
double | getAzimuth (unsigned int index) const |
This method retrieve the azimuth of a channel. More... | |
double | getWideningValue (unsigned int index) const |
This method retrieve the widening value of a channel. More... | |
void | processFixe (const float *inputs, float *outputs) |
This method performs the recomposition with single precision. More... | |
void | processFixe (const double *inputs, double *outputs) |
This method performs the recomposition with double precision. More... | |
void | processFisheye (const float *inputs, float *outputs) |
This method performs the fish-eye recomposition with single precision. More... | |
void | processFisheye (const double *inputs, double *outputs) |
This method performs the fish-eye recomposition with double precision. More... | |
void | processFree (const float *inputs, float *outputs) |
This method performs the free recomposition with single precision. More... | |
void | processFree (const double *inputs, double *outputs) |
This method performs the free recomposition with double precision. More... | |
![]() | |
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... | |
![]() | |
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 | |
![]() | |
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... | |
The ambisonic recomposer.
The recomposer should be in the planewaves domain to come back the the circular harmonics domain. The recomposition is similar to the several encoding exept that we consider planewaves (or virtual microphones) instead of sources. 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 20 of file Recomposer.h.
Hoa2D::Recomposer::Recomposer | ( | unsigned int | order, |
unsigned int | numberOfChannels | ||
) |
The recomposer constructor.
The recomposer constructor allocates and initialize the member values to recompose a set of planewaves in the circular harmonics domain. The order must be at least 1 and the number of channels must be a least the number of harmonics.
order | The order. |
numberOfChannels | The number of channels. |
Definition at line 11 of file Recomposer.cpp.
Hoa2D::Recomposer::~Recomposer | ( | ) |
The recomposer destructor.
The recomposer destructor free the memory.
Definition at line 118 of file Recomposer.cpp.
|
inline |
This method retrieve the azimuth of a channel.
Retrieve the azimuth of a source.
index | The index of the channel. |
Definition at line 75 of file Recomposer.h.
|
inline |
This method retrieve the widening value of a channel.
Retrieve the widening value of a channel.
index | The index of the channel. |
Definition at line 87 of file Recomposer.h.
void Hoa2D::Recomposer::processFisheye | ( | const float * | inputs, |
float * | outputs | ||
) |
This method performs the fish-eye recomposition with single precision.
You should use this method for in-place or not-in-place processing and performs the projection sample by sample. The outputs array contains the circular harmonics samples and the minimum size must be the number of harmonics and the inputs array contains the channels (or planewaves) samples and the minimum size must be a least the number of channels.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 74 of file Recomposer.cpp.
void Hoa2D::Recomposer::processFisheye | ( | const double * | inputs, |
double * | outputs | ||
) |
This method performs the fish-eye recomposition with double precision.
You should use this method for in-place or not-in-place processing and performs the projection sample by sample. The outputs array contains the circular harmonics samples and the minimum size must be the number of harmonics and the inputs array contains the channels (or planewaves) samples and the minimum size must be a least the number of channels.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 84 of file Recomposer.cpp.
void Hoa2D::Recomposer::processFixe | ( | const float * | inputs, |
float * | outputs | ||
) |
This method performs the recomposition with single precision.
You should use this method for in-place or not-in-place processing and performs the projection sample by sample. The outputs array contains the circular harmonics samples and the minimum size must be the number of harmonics and the inputs array contains the channels (or planewaves) samples and the minimum size must be a least the number of channels.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 64 of file Recomposer.cpp.
void Hoa2D::Recomposer::processFixe | ( | const double * | inputs, |
double * | outputs | ||
) |
This method performs the recomposition with double precision.
You should use this method for in-place or not-in-place processing and performs the projection sample by sample. The outputs array contains the circular harmonics samples and the minimum size must be the number of harmonics and the inputs array contains the channels (or planewaves) samples and the minimum size must be a least the number of channels.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 69 of file Recomposer.cpp.
void Hoa2D::Recomposer::processFree | ( | const float * | inputs, |
float * | outputs | ||
) |
This method performs the free recomposition with single precision.
You should use this method for in-place or not-in-place processing and performs the projection sample by sample. The outputs array contains the circular harmonics samples and the minimum size must be the number of harmonics and the inputs array contains the channels (or planewaves) samples and the minimum size must be a least the number of channels.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 94 of file Recomposer.cpp.
void Hoa2D::Recomposer::processFree | ( | const double * | inputs, |
double * | outputs | ||
) |
This method performs the free recomposition with double precision.
You should use this method for in-place or not-in-place processing and performs the projection sample by sample. The outputs array contains the circular harmonics samples and the minimum size must be the number of harmonics and the inputs array contains the channels (or planewaves) samples and the minimum size must be a least the number of channels.
inputs | The inputs array. |
outputs | The outputs array. |
Definition at line 106 of file Recomposer.cpp.
void Hoa2D::Recomposer::setAzimuth | ( | unsigned int | index, |
const double | azimuth | ||
) |
This method set the angle of azimuth of a channel.
The angle of azimuth in radian and you should prefer to use it between 0 and 2 Pi to avoid recursive wrapping of the value. The direction of rotation is counterclockwise. The 0 radian is Pi/2 phase shifted relative to a mathematical representation of a circle, then the 0 radian is at the "front" of the soundfield. The index must be between 0 and the number of channel - 1.
index | The index of the source. |
azimuth | The azimuth. |
Definition at line 38 of file Recomposer.cpp.
void Hoa2D::Recomposer::setFisheye | ( | const double | fisheye | ) |
This method set the fisheye factor.
The fisheye factor is between 0 and 1 and will defines the azimuth if the channels to retract or expand the soundfield foward the front.
Definition at line 50 of file Recomposer.cpp.
void Hoa2D::Recomposer::setWideningValue | ( | unsigned int | index, |
const double | value | ||
) |
This method set the widening value of a channel.
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.
index | The index of the source. |
value | The widening value. |
Definition at line 44 of file Recomposer.cpp.