SAF
Loading...
Searching...
No Matches
array2sh.c File Reference

Spatially encodes spherical microphone array signals into spherical harmonic signals (aka: Ambisonic signals) utilising theoretical encoding filters. More...

Go to the source code of this file.

Functions

void array2sh_create (void **const phA2sh)
 Creates an instance of array2sh.
 
void array2sh_destroy (void **const phM2sh)
 Destroys an instance of array2sh.
 
void array2sh_init (void *const hA2sh, int sampleRate)
 Initialises an instance of array2sh with default settings.
 
void array2sh_evalEncoder (void *const hA2sh)
 Evaluates the encoder, based on current global/user parameters.
 
void array2sh_process (void *const hA2sh, const float *const *inputs, float *const *const outputs, int nInputs, int nOutputs, int nSamples)
 Spatially encode microphone/hydrophone array signals into spherical harmonic signals.
 
void array2sh_refreshSettings (void *const hA2sh)
 Sets all intialisation flags to 1; re-initialising all settings/variables as array2sh is currently configured, at next available opportunity.
 
void array2sh_setEncodingOrder (void *const hA2sh, int newOrder)
 Sets the encoding order (see SH_ORDERS enum)
 
void array2sh_setRequestEncoderEvalFLAG (void *const hA2sh, int newState)
 Evaluates the performance of the current encoding filters when applied to a theoretical model of the currently configured array; two established objective metrics are then computed; more information in [1].
 
void array2sh_setEvalStatus (void *const hA2sh, ARRAY2SH_EVAL_STATUS new_evalStatus)
 Sets current eval status (see ARRAY2SH_EVAL_STATUS enum)
 
void array2sh_setDiffEQpastAliasing (void *const hA2sh, int newState)
 Analyses what the theoretical spatial aliasing frequency is, and conducts diffuse-field equalisation above this (enable: 1, disable: 0).
 
void array2sh_setPreset (void *const hA2sh, ARRAY2SH_MICROPHONE_ARRAY_PRESETS preset)
 Sets a pre-defined microphone/hydrophone array preset (See ARRAY2SH_MICROPHONE_ARRAY_PRESETS enum)
 
void array2sh_setSensorAzi_rad (void *const hA2sh, int index, float newAzi_rad)
 Sets a particular sensor's azimuth (radians) w.r.t to the origin of the array.
 
void array2sh_setSensorElev_rad (void *const hA2sh, int index, float newElev_rad)
 Sets a particular sensor's elevation (radians) w.r.t to the origin of the array.
 
void array2sh_setSensorAzi_deg (void *const hA2sh, int index, float newAzi_deg)
 Sets a particular sensor's azimuth (degrees) w.r.t to the origin of the array.
 
void array2sh_setSensorElev_deg (void *const hA2sh, int index, float newElev_deg)
 Sets a particular sensor's elevation (degrees) w.r.t to the origin of the array.
 
void array2sh_setNumSensors (void *const hA2sh, int newQ)
 Sets the number of sensors in the array.
 
void array2sh_setr (void *const hA2sh, float newr)
 Sets the radius of the array.
 
void array2sh_setR (void *const hA2sh, float newR)
 Sets the radius (in meters) of the scatterer (only for Rigid arrays).
 
void array2sh_setArrayType (void *const hA2sh, int newType)
 Sets the type of array (see ARRAY2SH_ARRAY_TYPES enum)
 
void array2sh_setWeightType (void *const hA2sh, int newType)
 Sets the type of weights to use (see ARRAY2SH_WEIGHT_TYPES enum)
 
void array2sh_setFilterType (void *const hA2sh, int newType)
 Sets the type filter design to employ for computing the encoding matrices (see ARRAY2SH_FILTER_TYPES enum)
 
void array2sh_setRegPar (void *const hA2sh, float newVal)
 Sets the value of the regularisation parameter (the maximum permitted gain of the filters), in DECIBELS.
 
void array2sh_setChOrder (void *const hA2sh, int newOrder)
 Sets the Ambisonic channel ordering convention to encode with, in order to match the convention employed by the input signals (see CH_ORDER enum)
 
void array2sh_setNormType (void *const hA2sh, int newType)
 Sets the Ambisonic normalisation convention to encode with, in order to match with the convention employed by the input signals (see NORM_TYPES enum)
 
void array2sh_setc (void *const hA2sh, float newc)
 Sets the speed of sound of the medium (~343m/s air, ~1480m/s water), in m/s.
 
void array2sh_setGain (void *const hA2sh, float newGain)
 Sets the amount of post gain to apply after the encoding, in DECIBELS.
 
int array2sh_getFrameSize (void)
 Returns the processing framesize (i.e., number of samples processed with every _process() call )
 
ARRAY2SH_EVAL_STATUS array2sh_getEvalStatus (void *const hA2sh)
 Returns current eval status (see ARRAY2SH_EVAL_STATUS enum)
 
int array2sh_getReinitSHTmatrixFLAG (void *const hA2sh)
 Returns 0 if SHT is not be reinitialised, 1: if it is.
 
float array2sh_getProgressBar0_1 (void *const hA2sh)
 (Optional) Returns current intialisation/processing progress, between 0..1
 
void array2sh_getProgressBarText (void *const hA2sh, char *text)
 (Optional) Returns current intialisation/processing progress text
 
int array2sh_getRequestEncoderEvalFLAG (void *const hA2sh)
 Returns a flag, which is '1' if there has been a recent request to evaluate the current encoding performance, or '0', if there hasn't.
 
int array2sh_getDiffEQpastAliasing (void *const hA2sh)
 Flag to enabled/disable diffuse equalisation above the spatial aliasing limit of the array (0: disabled, 1: enabled).
 
int array2sh_getEncodingOrder (void *const hA2sh)
 Returns the current encoding order (see SH_ORDERS enum)
 
float array2sh_getSensorAzi_rad (void *const hA2sh, int index)
 Returns a particular sensor's azimuth w.r.t to the origin of the array, in RADIANS.
 
float array2sh_getSensorElev_rad (void *const hA2sh, int index)
 Returns a particular sensor's elevation w.r.t to the origin of the array, in RADIANS.
 
float array2sh_getSensorAzi_deg (void *const hA2sh, int index)
 Returns a particular sensor's azimuth w.r.t to the origin of the array, in DEGREES.
 
float array2sh_getSensorElev_deg (void *const hA2sh, int index)
 Returns a particular sensor's elevation w.r.t to the origin of the array, in DEGREES.
 
int array2sh_getNumSensors (void *const hA2sh)
 Returns the number of sensors in the array.
 
int array2sh_getMaxNumSensors (void)
 Returns the maximum supported number of sensors which can be in the array.
 
int array2sh_getMinNumSensors (void *const hA2sh)
 Returns the minimum number of sensors which can be in the array [(current_order+1)^2].
 
int array2sh_getNSHrequired (void *const hA2sh)
 Returns the number of spherical harmonic signals required by the current encoding order: (current_order+1)^2.
 
float array2sh_getr (void *const hA2sh)
 Returns the radius of the array, in meters.
 
float array2sh_getR (void *const hA2sh)
 Returns the radius of the scatterer, in meters.
 
int array2sh_getArrayType (void *const hA2sh)
 Returns the type of array.
 
int array2sh_getWeightType (void *const hA2sh)
 Returns the type of weights to use see ARRAY2SH_WEIGHT_TYPES enum.
 
int array2sh_getFilterType (void *const hA2sh)
 Returns the type filter design to employ for computing the encoding matrices (see ARRAY2SH_FILTER_TYPES enum)
 
float array2sh_getRegPar (void *const hA2sh)
 Returns the value of the regurlisation parameter; the maximum permitted gain provided by the filters, in DECIBELS.
 
int array2sh_getChOrder (void *const hA2sh)
 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 array2sh_getNormType (void *const hA2sh)
 Returns the Ambisonic normalisation convention currently being usedto decode with, which should match the convention employed by the input signals (see NORM_TYPES enum)
 
float array2sh_getc (void *const hA2sh)
 Returns the speed of sound of the medium (~343m/s air, ~1480m/s water), in m/s.
 
float array2sh_getGain (void *const hA2sh)
 Returns the amount of post gain to apply after the encoding, in DECIBELS.
 
float * array2sh_getFreqVector (void *const hA2sh, int *nFreqPoints)
 Returns a pointer to the frequency vector.
 
float ** array2sh_getbN_inv (void *const hA2sh, int *nCurves, int *nFreqPoints)
 Returns the regularised inversion of the modal coefficients per frequency (may be used for optional plotting purposes)
 
float ** array2sh_getbN_modal (void *const hA2sh, int *nCurves, int *nFreqPoints)
 Returns the direct inversion of the modal coefficients per frequency (may be used for optional plotting purposes)
 
float * array2sh_getSpatialCorrelation_Handle (void *const hA2sh, int *nCurves, int *nFreqPoints)
 Returns a pointer to the spatial correlation [1] data.
 
float * array2sh_getLevelDifference_Handle (void *const hA2sh, int *nCurves, int *nFreqPoints)
 Returns a pointer to the level-difference [1] data.
 
int array2sh_getSamplingRate (void *const hA2sh)
 Returns the DAW/Host sample rate.
 
int array2sh_getProcessingDelay ()
 Returns the processing delay in samples (may be used for delay compensation features)
 

Detailed Description

Spatially encodes spherical microphone array signals into spherical harmonic signals (aka: Ambisonic signals) utilising theoretical encoding filters.

The algorithms within array2sh were pieced together and developed in collaboration with Symeon Delikaris-Manias and Angelo Farina. A detailed explanation of the algorithms within array2sh can be found in [1]. Also included, is a diffuse-field equalisation option for frequencies past aliasing, developed in collaboration with Archontis Politis, 8.02.2019

Note
Since the algorithms are based on theory, only array designs where there are analytical solutions available are supported. i.e. only spherical or cylindrical arrays, which have phase-matched sensors. For more information, the reader is referred to [2,3].
Test
test__saf_example_array2sh()
See also
[1] McCormack, L., Delikaris-Manias, S., Farina, A., Pinardi, D., and Pulkki, V., "Real-time conversion of sensor array signals into spherical harmonic signals with applications to spatially localised sub-band sound-field analysis," in Audio Engineering Society Convention 144, Audio Engineering Society, 2018.
[2] Williams EG. Fourier acoustics: sound radiation and nearfield acoustical holography. Elsevier; 1999 Jun 10.
[3] Rafaely B. Fundamentals of spherical array processing. Berlin: Springer; 2015 Feb 18.
Author
Leo McCormack
Date
13.09.2017
License
ISC

Definition in file array2sh.c.

Function Documentation

◆ array2sh_create()

void array2sh_create ( void **const phA2sh)

Creates an instance of array2sh.

Parameters
[in]phA2sh(&) address of array2sh handle

Definition at line 52 of file array2sh.c.

◆ array2sh_destroy()

void array2sh_destroy ( void **const phA2sh)

Destroys an instance of array2sh.

Parameters
[in]phA2sh(&) address of array2sh handle

Definition at line 104 of file array2sh.c.

◆ array2sh_evalEncoder()

void array2sh_evalEncoder ( void *const hA2sh)

Evaluates the encoder, based on current global/user parameters.

Parameters
[in]hA2sharray2sh handle

Definition at line 161 of file array2sh.c.

◆ array2sh_getArrayType()

int array2sh_getArrayType ( void *const hA2sh)

Returns the type of array.

See ARRAY2SH_ARRAY_TYPES enum

Definition at line 630 of file array2sh.c.

◆ array2sh_getbN_inv()

float ** array2sh_getbN_inv ( void *const hA2sh,
int * nCurves,
int * nFreqPoints )

Returns the regularised inversion of the modal coefficients per frequency (may be used for optional plotting purposes)

Parameters
[in]hA2sharray2sh handle
[out]nCurves(&) number of equalisation curves (current_order+1)
[out]nFreqPoints(&) number of frequencies
Returns
Equalisation curves/regularised modal coefficients; nCurves x nFreqPoints

Definition at line 687 of file array2sh.c.

◆ array2sh_getbN_modal()

float ** array2sh_getbN_modal ( void *const hA2sh,
int * nCurves,
int * nFreqPoints )

Returns the direct inversion of the modal coefficients per frequency (may be used for optional plotting purposes)

Parameters
[in]hA2sharray2sh handle
[out]nCurves(&) number of equalisation curves (current_order+1)
[out]nFreqPoints(&) number of frequencies
Returns
Unregularised modal coefficients; nCurves x nFreqPoints

Definition at line 695 of file array2sh.c.

◆ array2sh_getc()

float array2sh_getc ( void *const hA2sh)

Returns the speed of sound of the medium (~343m/s air, ~1480m/s water), in m/s.

Definition at line 668 of file array2sh.c.

◆ array2sh_getChOrder()

int array2sh_getChOrder ( void *const hA2sh)

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)

Definition at line 656 of file array2sh.c.

◆ array2sh_getDiffEQpastAliasing()

int array2sh_getDiffEQpastAliasing ( void *const hA2sh)

Flag to enabled/disable diffuse equalisation above the spatial aliasing limit of the array (0: disabled, 1: enabled).

Developed in collaboration with Archontis Politis.

Note
In general, theoretical encoding filters have a tendency to boost the aliased frequencies. Whereas, measurement-based filters (through a least-squares solution), tend to attenuate them. Neither of these are correct or incorrect, since, strictly (spatially) speaking, we should be placing a low-pass filter at the spatial aliasing frequency. However, since we usually do not want to remove this high frequency energy from e.g. an Ambisonic reproduction, we would argue that equalising the aliased components so that they have a flat spectrum, is probably the way to go; and is exactly what this feature does.

Definition at line 551 of file array2sh.c.

◆ array2sh_getEncodingOrder()

int array2sh_getEncodingOrder ( void *const hA2sh)

Returns the current encoding order (see SH_ORDERS enum)

Definition at line 557 of file array2sh.c.

◆ array2sh_getEvalStatus()

ARRAY2SH_EVAL_STATUS array2sh_getEvalStatus ( void *const hA2sh)

Returns current eval status (see ARRAY2SH_EVAL_STATUS enum)

Definition at line 521 of file array2sh.c.

◆ array2sh_getFilterType()

int array2sh_getFilterType ( void *const hA2sh)

Returns the type filter design to employ for computing the encoding matrices (see ARRAY2SH_FILTER_TYPES enum)

Definition at line 644 of file array2sh.c.

◆ array2sh_getFrameSize()

int array2sh_getFrameSize ( void )

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

Definition at line 516 of file array2sh.c.

◆ array2sh_getFreqVector()

float * array2sh_getFreqVector ( void *const hA2sh,
int * nFreqPoints )

Returns a pointer to the frequency vector.

Parameters
[in]hA2sharray2sh handle
[out]nFreqPoints(&) number of frequencies
Returns
Vector of centre frequencies; nFreqPoints x 1

Definition at line 680 of file array2sh.c.

◆ array2sh_getGain()

float array2sh_getGain ( void *const hA2sh)

Returns the amount of post gain to apply after the encoding, in DECIBELS.

Definition at line 674 of file array2sh.c.

◆ array2sh_getLevelDifference_Handle()

float * array2sh_getLevelDifference_Handle ( void *const hA2sh,
int * nCurves,
int * nFreqPoints )

Returns a pointer to the level-difference [1] data.

This is given per frequency, and is measure of the mean level difference between the encoded spherical harmonics using the current configuration is to ideal spherical harmonics

Note
This objective measure is based on analytical models of the currently configured array, and may differ in practice (i.e. with a real microphone array)
Parameters
[in]hA2sharray2sh handle
[out]nCurves(&) number of equalisation curves (current_order+1)
[out]nFreqPoints(&) number of frequencies
Returns
Level difference per order and frequency; FLAT: nCurves x nFreqPoints
See also
[1] Moreau, S., Daniel, J., Bertet, S., 2006, 3D sound field recording with higher order ambisonics-objective measurements and validation of spherical microphone. In Audio Engineering Society Convention 120.

Definition at line 711 of file array2sh.c.

◆ array2sh_getMaxNumSensors()

int array2sh_getMaxNumSensors ( void )

Returns the maximum supported number of sensors which can be in the array.

Definition at line 599 of file array2sh.c.

◆ array2sh_getMinNumSensors()

int array2sh_getMinNumSensors ( void *const hA2sh)

Returns the minimum number of sensors which can be in the array [(current_order+1)^2].

Definition at line 604 of file array2sh.c.

◆ array2sh_getNormType()

int array2sh_getNormType ( void *const hA2sh)

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

Definition at line 662 of file array2sh.c.

◆ array2sh_getNSHrequired()

int array2sh_getNSHrequired ( void *const hA2sh)

Returns the number of spherical harmonic signals required by the current encoding order: (current_order+1)^2.

Definition at line 610 of file array2sh.c.

◆ array2sh_getNumSensors()

int array2sh_getNumSensors ( void *const hA2sh)

Returns the number of sensors in the array.

Definition at line 591 of file array2sh.c.

◆ array2sh_getProcessingDelay()

int array2sh_getProcessingDelay ( void )

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

Definition at line 725 of file array2sh.c.

◆ array2sh_getProgressBar0_1()

float array2sh_getProgressBar0_1 ( void *const hA2sh)

(Optional) Returns current intialisation/processing progress, between 0..1

  • 0: intialisation/processing has started
  • 1: intialisation/processing has ended

Definition at line 533 of file array2sh.c.

◆ array2sh_getProgressBarText()

void array2sh_getProgressBarText ( void *const hA2sh,
char * text )

(Optional) Returns current intialisation/processing progress text

Note
"text" string should be (at least) of length: PROGRESSBARTEXT_CHAR_LENGTH

Definition at line 539 of file array2sh.c.

◆ array2sh_getr()

float array2sh_getr ( void *const hA2sh)

Returns the radius of the array, in meters.

Definition at line 616 of file array2sh.c.

◆ array2sh_getR()

float array2sh_getR ( void *const hA2sh)

Returns the radius of the scatterer, in meters.

Definition at line 623 of file array2sh.c.

◆ array2sh_getRegPar()

float array2sh_getRegPar ( void *const hA2sh)

Returns the value of the regurlisation parameter; the maximum permitted gain provided by the filters, in DECIBELS.

Definition at line 650 of file array2sh.c.

◆ array2sh_getReinitSHTmatrixFLAG()

int array2sh_getReinitSHTmatrixFLAG ( void *const hA2sh)

Returns 0 if SHT is not be reinitialised, 1: if it is.

Definition at line 527 of file array2sh.c.

◆ array2sh_getRequestEncoderEvalFLAG()

int array2sh_getRequestEncoderEvalFLAG ( void *const hA2sh)

Returns a flag, which is '1' if there has been a recent request to evaluate the current encoding performance, or '0', if there hasn't.

Definition at line 545 of file array2sh.c.

◆ array2sh_getSamplingRate()

int array2sh_getSamplingRate ( void *const hA2sh)

Returns the DAW/Host sample rate.

Definition at line 719 of file array2sh.c.

◆ array2sh_getSensorAzi_deg()

float array2sh_getSensorAzi_deg ( void *const hA2sh,
int index )

Returns a particular sensor's azimuth w.r.t to the origin of the array, in DEGREES.

Definition at line 577 of file array2sh.c.

◆ array2sh_getSensorAzi_rad()

float array2sh_getSensorAzi_rad ( void *const hA2sh,
int index )

Returns a particular sensor's azimuth w.r.t to the origin of the array, in RADIANS.

Definition at line 563 of file array2sh.c.

◆ array2sh_getSensorElev_deg()

float array2sh_getSensorElev_deg ( void *const hA2sh,
int index )

Returns a particular sensor's elevation w.r.t to the origin of the array, in DEGREES.

Definition at line 584 of file array2sh.c.

◆ array2sh_getSensorElev_rad()

float array2sh_getSensorElev_rad ( void *const hA2sh,
int index )

Returns a particular sensor's elevation w.r.t to the origin of the array, in RADIANS.

Definition at line 570 of file array2sh.c.

◆ array2sh_getSpatialCorrelation_Handle()

float * array2sh_getSpatialCorrelation_Handle ( void *const hA2sh,
int * nCurves,
int * nFreqPoints )

Returns a pointer to the spatial correlation [1] data.

This is given per frequency, and is measure of how similar the encoded spherical harmonics using the current configuration is to ideal spherical harmonics. 1=perfect <1: less good/ aliasing

Note
This objective measure is based on analytical models of the currently configured array, and may differ in practice (i.e. with a real microphone array)
Parameters
[in]hA2sharray2sh handle
[out]nCurves(&) number of equalisation curves (current_order+1)
[out]nFreqPoints(&) number of frequencies
Returns
Spatial correlation per order and frequency; FLAT: nCurves x nFreqPoints
See also
[1] Moreau, S., Daniel, J., Bertet, S., 2006, 3D sound field recording with higher order ambisonics-objective measurements and validation of spherical microphone. In Audio Engineering Society Convention 120.

Definition at line 703 of file array2sh.c.

◆ array2sh_getWeightType()

int array2sh_getWeightType ( void *const hA2sh)

Returns the type of weights to use see ARRAY2SH_WEIGHT_TYPES enum.

Definition at line 637 of file array2sh.c.

◆ array2sh_init()

void array2sh_init ( void *const hA2sh,
int samplerate )

Initialises an instance of array2sh with default settings.

Parameters
[in]hA2sharray2sh handle
[in]samplerateHost samplerate.

Definition at line 148 of file array2sh.c.

◆ array2sh_process()

void array2sh_process ( void *const hA2sh,
const float *const * inputs,
float *const * outputs,
int nInputs,
int nOutputs,
int nSamples )

Spatially encode microphone/hydrophone array signals into spherical harmonic signals.

Parameters
[in]hA2sharray2sh 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

Definition at line 185 of file array2sh.c.

◆ array2sh_refreshSettings()

void array2sh_refreshSettings ( void *const hA2sh)

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

Definition at line 277 of file array2sh.c.

◆ array2sh_setArrayType()

void array2sh_setArrayType ( void *const hA2sh,
int newType )

Sets the type of array (see ARRAY2SH_ARRAY_TYPES enum)

Definition at line 436 of file array2sh.c.

◆ array2sh_setc()

void array2sh_setc ( void *const hA2sh,
float newc )

Sets the speed of sound of the medium (~343m/s air, ~1480m/s water), in m/s.

Definition at line 496 of file array2sh.c.

◆ array2sh_setChOrder()

void array2sh_setChOrder ( void *const hA2sh,
int newOrder )

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

Definition at line 482 of file array2sh.c.

◆ array2sh_setDiffEQpastAliasing()

void array2sh_setDiffEQpastAliasing ( void *const hA2sh,
int newState )

Analyses what the theoretical spatial aliasing frequency is, and conducts diffuse-field equalisation above this (enable: 1, disable: 0).

Thanks to Dr. Archontis Politis for suggesting and designing this feature.

Definition at line 317 of file array2sh.c.

◆ array2sh_setEncodingOrder()

void array2sh_setEncodingOrder ( void *const hA2sh,
int newOrder )

Sets the encoding order (see SH_ORDERS enum)

Definition at line 284 of file array2sh.c.

◆ array2sh_setEvalStatus()

void array2sh_setEvalStatus ( void *const hA2sh,
ARRAY2SH_EVAL_STATUS new_evalStatus )

Sets current eval status (see ARRAY2SH_EVAL_STATUS enum)

Definition at line 306 of file array2sh.c.

◆ array2sh_setFilterType()

void array2sh_setFilterType ( void *const hA2sh,
int newType )

Sets the type filter design to employ for computing the encoding matrices (see ARRAY2SH_FILTER_TYPES enum)

Definition at line 460 of file array2sh.c.

◆ array2sh_setGain()

void array2sh_setGain ( void *const hA2sh,
float newGain )

Sets the amount of post gain to apply after the encoding, in DECIBELS.

Definition at line 507 of file array2sh.c.

◆ array2sh_setNormType()

void array2sh_setNormType ( void *const hA2sh,
int newType )

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

Definition at line 489 of file array2sh.c.

◆ array2sh_setNumSensors()

void array2sh_setNumSensors ( void *const hA2sh,
int newQ )

Sets the number of sensors in the array.

Definition at line 391 of file array2sh.c.

◆ array2sh_setPreset()

void array2sh_setPreset ( void *const hA2sh,
ARRAY2SH_MICROPHONE_ARRAY_PRESETS preset )

Sets a pre-defined microphone/hydrophone array preset (See ARRAY2SH_MICROPHONE_ARRAY_PRESETS enum)

Definition at line 327 of file array2sh.c.

◆ array2sh_setr()

void array2sh_setr ( void *const hA2sh,
float newr )

Sets the radius of the array.

Definition at line 410 of file array2sh.c.

◆ array2sh_setR()

void array2sh_setR ( void *const hA2sh,
float newR )

Sets the radius (in meters) of the scatterer (only for Rigid arrays).

Note
R <= r. i.e. the sensors may protrude from the rigid scattering surface, or be flush with the surface of the array

Definition at line 423 of file array2sh.c.

◆ array2sh_setRegPar()

void array2sh_setRegPar ( void *const hA2sh,
float newVal )

Sets the value of the regularisation parameter (the maximum permitted gain of the filters), in DECIBELS.

Definition at line 471 of file array2sh.c.

◆ array2sh_setRequestEncoderEvalFLAG()

void array2sh_setRequestEncoderEvalFLAG ( void *const hA2sh,
int newState )

Evaluates the performance of the current encoding filters when applied to a theoretical model of the currently configured array; two established objective metrics are then computed; more information in [1].

See also
[1] Moreau, S., Daniel, J., Bertet, S., 2006, 3D sound field recording with higher order ambisonics-objective measurements and validation of spherical microphone. In Audio Engineering Society Convention 120.

Definition at line 300 of file array2sh.c.

◆ array2sh_setSensorAzi_deg()

void array2sh_setSensorAzi_deg ( void *const hA2sh,
int index,
float newAzi_deg )

Sets a particular sensor's azimuth (degrees) w.r.t to the origin of the array.

Input Arguments: hA2sh - array2sh handle index - sensor index newAzi_deg - sensor azimuth in DEGREES

Definition at line 364 of file array2sh.c.

◆ array2sh_setSensorAzi_rad()

void array2sh_setSensorAzi_rad ( void *const hA2sh,
int index,
float newAzi_rad )

Sets a particular sensor's azimuth (radians) w.r.t to the origin of the array.

Parameters
[in]hA2sharray2sh handle
[in]indexSensor index
[in]newAzi_radSensor azimuth in RADIANS

Definition at line 338 of file array2sh.c.

◆ array2sh_setSensorElev_deg()

void array2sh_setSensorElev_deg ( void *const hA2sh,
int index,
float newElev_deg )

Sets a particular sensor's elevation (degrees) w.r.t to the origin of the array.

Parameters
[in]hA2sharray2sh handle
[in]indexSensor index
[in]newElev_degSensor elevation in DEGREES

Definition at line 378 of file array2sh.c.

◆ array2sh_setSensorElev_rad()

void array2sh_setSensorElev_rad ( void *const hA2sh,
int index,
float newElev_rad )

Sets a particular sensor's elevation (radians) w.r.t to the origin of the array.

Parameters
[in]hA2sharray2sh handle
[in]indexSensor index
[in]newElev_radSensor elevation in RADIANS

Definition at line 351 of file array2sh.c.

◆ array2sh_setWeightType()

void array2sh_setWeightType ( void *const hA2sh,
int newType )

Sets the type of weights to use (see ARRAY2SH_WEIGHT_TYPES enum)

Definition at line 448 of file array2sh.c.