HOA Library  beta 3.0
High Order Ambisonics Library
Public Member Functions | List of all members
MultiEncoder< D, T > Class Template Reference

The class generates manages a set of encoders. More...

#include <Hoa_MultiEncoder.hpp>

Inheritance diagram for MultiEncoder< D, T >:
ProcessorHarmonics< D, T > Processor< D, T >

Public Member Functions

 MultiEncoder (size_t order, size_t nsources)
 The map constructor. More...
 
 ~MultiEncoder ()
 The map destructor.
 
size_t getNumberOfSources () const
 Returns the number of sources.
 
void setRadius (size_t index, T radius) hoa_noexcept
 Sets the radius of a source. More...
 
void setWidening (size_t index, T widening) hoa_noexcept
 Sets the widening factor of a source (wrapper for radius). More...
 
void setAzimuth (size_t index, T azimuth) hoa_noexcept
 Sets the azimuth of a source. More...
 
void setElevation (size_t index, T elevation)
 Sets the elevation of a source. More...
 
void setMute (size_t index, const bool muted)
 Mutes or unmutes a source. More...
 
void setFisheye (T fisheye) hoa_noexcept
 Applies a fisheye effect on the sources positions. More...
 
getRadius (size_t index) const
 Returns the radius of a source.
 
getWidening (size_t index) const
 Returns the widening value of a source.
 
getAzimuth (size_t index) const
 Returns the azimuth of a source.
 
getElevation (size_t index) const
 Returns the elevation of a source.
 
bool getMute (size_t index) const
 Returns the mute status of a source.
 
void process (const T *input, T *outputs) hoa_noexcept hoa_override
 The method performs the encoding of the harmonics signal. More...
 
- Public Member Functions inherited from ProcessorHarmonics< D, T >
 ProcessorHarmonics (const size_t order) hoa_noexcept
 The harmonics constructor. More...
 
virtual ~ProcessorHarmonics () hoa_noexcept
 The harmonics destructor.
 
size_t getDecompositionOrder () const hoa_noexcept
 Returns the order of decomposition.
 
size_t getNumberOfHarmonics () const hoa_noexcept
 Returns the number of harmonics.
 
size_t getHarmonicDegree (const size_t index) const hoa_noexcept
 Returns the degree of an harmonic. More...
 
long getHarmonicOrder (const size_t index) const hoa_noexcept
 Returns the azimuthal order of an harmonic. More...
 
size_t getHarmonicIndex (const size_t degree, const long order) const hoa_noexcept
 Returns the index of an harmonic given the degree and the azimuthal order. More...
 
std::string getHarmonicName (const size_t index) const hoa_noexcept
 Returns the name of an harmonic. More...
 
getHarmonicNormalization (const size_t index) const hoa_noexcept
 Returns the normalization of an harmonic. More...
 
getHarmonicSemiNormalization (const size_t index) const hoa_noexcept
 Returns the semi-normalization of an harmonic. More...
 
- Public Member Functions inherited from Processor< D, T >
virtual ~Processor () hoa_noexcept
 The destructor.
 

Detailed Description

template<Dimension D, typename T>
class hoa::MultiEncoder< D, T >

The class generates manages a set of encoders.

The class is just a wrapper to manage a set encoders that can be muted.

Definition at line 21 of file Hoa_MultiEncoder.hpp.

Constructor & Destructor Documentation

MultiEncoder ( size_t  order,
size_t  nsources 
)
inline

The map constructor.

Parameters
orderThe order.
nsourcesThe number of sources.

Definition at line 28 of file Hoa_MultiEncoder.hpp.

Member Function Documentation

void setRadius ( size_t  index,
radius 
)
inline

Sets the radius of a source.

Parameters
indexThe index of the source.
radiusThe radius.

Definition at line 53 of file Hoa_MultiEncoder.hpp.

void setWidening ( size_t  index,
widening 
)
inline

Sets the widening factor of a source (wrapper for radius).

Parameters
indexThe index of the source.
wideningThe widening value.

Definition at line 60 of file Hoa_MultiEncoder.hpp.

void setAzimuth ( size_t  index,
azimuth 
)
inline

Sets the azimuth of a source.

Parameters
indexThe index of the source.
azimuthThe azimuth.

Definition at line 67 of file Hoa_MultiEncoder.hpp.

void setElevation ( size_t  index,
elevation 
)
inline

Sets the elevation of a source.

Parameters
indexThe index of the source.
elevationThe elevation.

Definition at line 74 of file Hoa_MultiEncoder.hpp.

void setMute ( size_t  index,
const bool  muted 
)
inline

Mutes or unmutes a source.

Parameters
indexThe index of the source.
mutedThe mute status.

Definition at line 81 of file Hoa_MultiEncoder.hpp.

void setFisheye ( fisheye)
inline

Applies a fisheye effect on the sources positions.

The fishEye value is between \(0\) and \(1\). At \(0\), the sound field all the sources are equally dispatched around the equator and at \(1\), the the sources are are concentrer in front of the audience.

Definition at line 89 of file Hoa_MultiEncoder.hpp.

void process ( const T *  input,
T *  outputs 
)
inlinevirtual

The method performs the encoding of the harmonics signal.

The inputs array contains the samples of the sources to encode and the outputs array contains the spherical harmonics samples thus the minimum size of the array must be the number of sources and the number of harmonics.

Parameters
inputThe inputs array.
outputsThe outputs array.

Reimplemented from Processor< D, T >.

Definition at line 136 of file Hoa_MultiEncoder.hpp.