SAF
Loading...
Searching...
No Matches
beamformer.h File Reference

Generates beamformers/virtual microphones in arbitrary directions with several different beam patterns to choose from. More...

#include "_common.h"

Go to the source code of this file.

Functions

void beamformer_create (void **const phBeam)
 Creates an instance of beamformer.
 
void beamformer_destroy (void **const phBeam)
 Destroys an instance of beamformer.
 
void beamformer_init (void *const hBeam, int samplerate)
 Initialises an instance of beamformer with default settings.
 
void beamformer_process (void *const hBeam, const float *const *inputs, float *const *outputs, int nInputs, int nOutputs, int nSamples)
 Generates beamformers/virtual microphones in the specified directions.
 
void beamformer_refreshSettings (void *const hBeam)
 Sets all intialisation flags to 1; re-initialising all settings/variables as beamformer is currently configured, at next available opportunity.
 
void beamformer_setBeamOrder (void *const hBeam, int newValue)
 Sets the beamforming order (see SH_ORDERS enum)
 
void beamformer_setBeamAzi_deg (void *const hBeam, int index, float newAzi_deg)
 Sets a beamformer azimuth direction of a given index, in DEGREES.
 
void beamformer_setBeamElev_deg (void *const hBeam, int index, float newElev_deg)
 Sets a beamformer elevation direction for a given index, in DEGREES.
 
void beamformer_setNumBeams (void *const hBeam, int new_nBeams)
 Sets the number of beamformers to generate.
 
void beamformer_setChOrder (void *const hBeam, int newOrder)
 Sets the Ambisonic channel ordering convention to decode with, in order to match the convention employed by the input signals (see CH_ORDER enum)
 
void beamformer_setNormType (void *const hBeam, int newType)
 Sets the Ambisonic normalisation convention to decode with, in order to match with the convention employed by the input signals (see NORM_TYPES enum)
 
void beamformer_setBeamType (void *const hBeam, int newID)
 Sets the beamforming approach to employ (see STATIC_BEAM_TYPES enum)
 
int beamformer_getFrameSize (void)
 Returns the processing framesize (i.e., number of samples processed with every _process() call )
 
int beamformer_getBeamOrder (void *const hBeam)
 Returns the beamforming order (see SH_ORDERS enum)
 
float beamformer_getBeamAzi_deg (void *const hBeam, int index)
 Returns the beamformer azimuth direction of a given index h, in DEGREES.
 
float beamformer_getBeamElev_deg (void *const hBeam, int index)
 Returns the beamformer elevation direction of a given index, in DEGREES.
 
int beamformer_getNumBeams (void *const hBeam)
 Returns the number of beamformers being generated.
 
int beamformer_getMaxNumBeams (void)
 Returns the maximum number of beamformers permitted.
 
int beamformer_getNSHrequired (void *const hBeam)
 Returns the number of spherical harmonic signals required by the currently selected beamforming order: (current_order+1)^2.
 
int beamformer_getChOrder (void *const hBeam)
 Returns the Ambisonic channel ordering convention currently being used to decode with, which should match the convention employed by the input signals (see CH_ORDER enum)
 
int beamformer_getNormType (void *const hBeam)
 Returns the Ambisonic normalisation convention currently being usedto decode with, which should match the convention employed by the input signals (see NORM_TYPES enum)
 
int beamformer_getBeamType (void *const hBeam)
 Returns the beamforming approach employed (see STATIC_BEAM_TYPES enum)
 
int beamformer_getProcessingDelay (void)
 Returns the processing delay in samples (may be used for delay compensation features)
 

Detailed Description

Generates beamformers/virtual microphones in arbitrary directions with several different beam patterns to choose from.

Author
Leo McCormack
Date
17.05.2019
License
ISC

Definition in file beamformer.h.

Function Documentation

◆ beamformer_create()

void beamformer_create ( void **const phBeam)

Creates an instance of beamformer.

Parameters
[in]phBeam(&) address of beamformer handle
Examples
beamformer.h.

Definition at line 29 of file beamformer.c.

◆ beamformer_destroy()

void beamformer_destroy ( void **const phBeam)

Destroys an instance of beamformer.

Parameters
[in]phBeam(&) address of beamformer handle
Examples
beamformer.h.

Definition at line 56 of file beamformer.c.

◆ beamformer_getBeamAzi_deg()

float beamformer_getBeamAzi_deg ( void *const hBeam,
int index )

Returns the beamformer azimuth direction of a given index h, in DEGREES.

Examples
beamformer.h.

Definition at line 288 of file beamformer.c.

◆ beamformer_getBeamElev_deg()

float beamformer_getBeamElev_deg ( void *const hBeam,
int index )

Returns the beamformer elevation direction of a given index, in DEGREES.

Examples
beamformer.h.

Definition at line 294 of file beamformer.c.

◆ beamformer_getBeamOrder()

int beamformer_getBeamOrder ( void *const hBeam)

Returns the beamforming order (see SH_ORDERS enum)

Examples
beamformer.h.

Definition at line 282 of file beamformer.c.

◆ beamformer_getBeamType()

int beamformer_getBeamType ( void *const hBeam)

Returns the beamforming approach employed (see STATIC_BEAM_TYPES enum)

Examples
beamformer.h.

Definition at line 329 of file beamformer.c.

◆ beamformer_getChOrder()

int beamformer_getChOrder ( void *const hBeam)

Returns the Ambisonic channel ordering convention currently being used to decode with, which should match the convention employed by the input signals (see CH_ORDER enum)

Examples
beamformer.h.

Definition at line 317 of file beamformer.c.

◆ beamformer_getFrameSize()

int beamformer_getFrameSize ( void )

Returns the processing framesize (i.e., number of samples processed with every _process() call )

Examples
beamformer.h.

Definition at line 277 of file beamformer.c.

◆ beamformer_getMaxNumBeams()

int beamformer_getMaxNumBeams ( void )

Returns the maximum number of beamformers permitted.

Examples
beamformer.h.

Definition at line 306 of file beamformer.c.

◆ beamformer_getNormType()

int beamformer_getNormType ( void *const hBeam)

Returns the Ambisonic normalisation convention currently being usedto decode with, which should match the convention employed by the input signals (see NORM_TYPES enum)

Examples
beamformer.h.

Definition at line 323 of file beamformer.c.

◆ beamformer_getNSHrequired()

int beamformer_getNSHrequired ( void *const hBeam)

Returns the number of spherical harmonic signals required by the currently selected beamforming order: (current_order+1)^2.

Examples
beamformer.h.

Definition at line 311 of file beamformer.c.

◆ beamformer_getNumBeams()

int beamformer_getNumBeams ( void *const hBeam)

Returns the number of beamformers being generated.

Examples
beamformer.h.

Definition at line 300 of file beamformer.c.

◆ beamformer_getProcessingDelay()

int beamformer_getProcessingDelay ( void )

Returns the processing delay in samples (may be used for delay compensation features)

Examples
beamformer.h.

Definition at line 335 of file beamformer.c.

◆ beamformer_init()

void beamformer_init ( void *const hBeam,
int samplerate )

Initialises an instance of beamformer with default settings.

Parameters
[in]hBeambeamformer handle
[in]samplerateHost samplerate.
Examples
beamformer.h.

Definition at line 71 of file beamformer.c.

◆ beamformer_process()

void beamformer_process ( void *const hBeam,
const float *const * inputs,
float *const * outputs,
int nInputs,
int nOutputs,
int nSamples )

Generates beamformers/virtual microphones in the specified directions.

Parameters
[in]hBeambeamformer handle
[in]inputsInput channel buffers; 2-D array: nInputs x nSamples
[in]outputsOutput channel buffers; 2-D array: nOutputs x nSamples
[in]nInputsNumber of input channels
[in]nOutputsNumber of output channels
[in]nSamplesNumber of samples in 'inputs'/'output' matrices
Examples
beamformer.h.

Definition at line 95 of file beamformer.c.

◆ beamformer_refreshSettings()

void beamformer_refreshSettings ( void *const hBeam)

Sets all intialisation flags to 1; re-initialising all settings/variables as beamformer is currently configured, at next available opportunity.

Examples
beamformer.h.

Definition at line 199 of file beamformer.c.

◆ beamformer_setBeamAzi_deg()

void beamformer_setBeamAzi_deg ( void *const hBeam,
int index,
float newAzi_deg )

Sets a beamformer azimuth direction of a given index, in DEGREES.

Examples
beamformer.h.

Definition at line 221 of file beamformer.c.

◆ beamformer_setBeamElev_deg()

void beamformer_setBeamElev_deg ( void *const hBeam,
int index,
float newElev_deg )

Sets a beamformer elevation direction for a given index, in DEGREES.

Examples
beamformer.h.

Definition at line 232 of file beamformer.c.

◆ beamformer_setBeamOrder()

void beamformer_setBeamOrder ( void *const hBeam,
int newValue )

Sets the beamforming order (see SH_ORDERS enum)

If the beamforming order is higher than the input signal order, the extra required channels are filled with zeros. If the beamforming order is lower than the input signal order, the number input signals is truncated accordingly.

Examples
beamformer.h.

Definition at line 207 of file beamformer.c.

◆ beamformer_setBeamType()

void beamformer_setBeamType ( void *const hBeam,
int newID )

Sets the beamforming approach to employ (see STATIC_BEAM_TYPES enum)

Examples
beamformer.h.

Definition at line 266 of file beamformer.c.

◆ beamformer_setChOrder()

void beamformer_setChOrder ( void *const hBeam,
int newOrder )

Sets the Ambisonic channel ordering convention to decode with, in order to match the convention employed by the input signals (see CH_ORDER enum)

Examples
beamformer.h.

Definition at line 252 of file beamformer.c.

◆ beamformer_setNormType()

void beamformer_setNormType ( void *const hBeam,
int newType )

Sets the Ambisonic normalisation convention to decode with, in order to match with the convention employed by the input signals (see NORM_TYPES enum)

Examples
beamformer.h.

Definition at line 259 of file beamformer.c.

◆ beamformer_setNumBeams()

void beamformer_setNumBeams ( void *const hBeam,
int new_nBeams )

Sets the number of beamformers to generate.

Examples
beamformer.h.

Definition at line 241 of file beamformer.c.