SAL
A C++ library for spatial audio.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
sal::AmbisonicsMic Class Reference

#include <ambisonics.h>

Inheritance diagram for sal::AmbisonicsMic:
sal::Microphone

Public Member Functions

 AmbisonicsMic (const mcl::Point &position, mcl::Quaternion orientation, Int order, HoaNormalisation normalisation=HoaNormalisation::sqrt2, HoaOrdering ordering=HoaOrdering::Acn)
 
bool IsCoincident () const noexcept
 
Int num_channels () const noexcept
 
virtual void AddPlaneWaveRelative (const Sample *input_data, const Int num_samples, const mcl::Point &point, const Int wave_id, Buffer &output_buffer) noexcept
 
- Public Member Functions inherited from sal::Microphone
 Microphone (mcl::Point position, mcl::Quaternion orientation=mcl::Quaternion::Identity())
 
mcl::Point position () const noexcept
 
virtual void SetPosition (const mcl::Point &position) noexcept
 
mcl::Quaternion orientation () const noexcept
 
virtual void SetOrientation (const mcl::Quaternion &orientation) noexcept
 
void SetHandedness (const mcl::Handedness handedness) noexcept
 
void AddPlaneWave (const MonoBuffer &signal, const mcl::Point &point, Buffer &output_buffer) noexcept
 
void AddPlaneWave (const Sample *input_data, const Int num_samples, const mcl::Point &point, Buffer &output_buffer) noexcept
 
void AddPlaneWave (const Sample input_sample, const mcl::Point &point, Buffer &output_buffer) noexcept
 
void AddPlaneWave (const MonoBuffer &input_buffer, const mcl::Point &point, const Int wave_id, Buffer &output_buffer) noexcept
 
void AddPlaneWave (const Sample input_sample, const mcl::Point &point, const Int wave_id, Buffer &output_buffer) noexcept
 
virtual void AddPlaneWave (const Sample *input_data, const Int num_samples, const mcl::Point &point, const Int wave_id, Buffer &output_buffer) noexcept
 
virtual bool IsOmni () const noexcept
 
mcl::Point GetRelativePoint (const mcl::Point &point) const noexcept
 
virtual void Reset () noexcept
 
virtual ~Microphone ()
 
virtual void AddPlaneWaveRelative (const MonoBuffer &signal, const mcl::Point &point, const Int wave_id, Buffer &output_buffer) noexcept
 

Static Public Member Functions

static std::vector< mcl::Real > HorizontalEncoding (Int order, Angle theta)
 
static bool Test ()
 
- Static Public Member Functions inherited from sal::Microphone
static bool Test ()
 

Additional Inherited Members

- Protected Attributes inherited from sal::Microphone
mcl::Handedness handedness_
 

Constructor & Destructor Documentation

sal::AmbisonicsMic::AmbisonicsMic ( const mcl::Point &  position,
mcl::Quaternion  orientation,
Int  order,
HoaNormalisation  normalisation = HoaNormalisation::sqrt2,
HoaOrdering  ordering = HoaOrdering::Acn 
)
inline

Constructs an Ambisonics microphone. position is the position of the microphone in the recording space. order is the HOA order The microphone is placed horizontaly (equivalent directivity patterns) if theta = 0.0. I am thinking of soundfield microphone, which is pointing upwards.

Member Function Documentation

void sal::AmbisonicsMic::AddPlaneWaveRelative ( const Sample input_data,
const Int  num_samples,
const mcl::Point &  point,
const Int  wave_id,
Buffer output_buffer 
)
virtualnoexcept

This is implemented by the specific type of microphones. mcl::Point in this case is relative to the microphone reference system. This is the most important function of this object. This filters the sample sample as a function of the position from where the sound is incoming point. Info for developer: the directivity should preferably have a maximum in the direction of the x-axis For anthropomorphic directivities, the facing direction is the x-axis. An arrow going from the jaw trough the skull and up should preferrably be in the direction of plus-z-axis. Other choices could be made, as long as the conventions are kept at higher levels.

Implements sal::Microphone.

std::vector< mcl::Real > sal::AmbisonicsMic::HorizontalEncoding ( Int  order,
Angle  theta 
)
static
bool sal::AmbisonicsMic::IsCoincident ( ) const
inlinevirtualnoexcept

Implements sal::Microphone.

Int sal::AmbisonicsMic::num_channels ( ) const
inlinevirtualnoexcept

Implements sal::Microphone.

bool sal::AmbisonicsMic::Test ( )
static

The documentation for this class was generated from the following files: