SAF
Loading...
Searching...
No Matches
array2sh_internal.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

static void array2sh_replicate_order (void *const hA2sh, int order)
 Takes the bNs computed up to N+1, and replicates them to be of length (N+1)^2 (replicating the 1st order bNs 3 times, 2nd -> 5 times etc.)
 
void array2sh_initTFT (void *const hA2sh)
 Initialise the filterbank used by array2sh.
 
void array2sh_calculate_sht_matrix (void *const hA2sh)
 Computes the spherical harmonic transform (SHT) matrix, to spatially encode input microphone/hydrophone signals into spherical harmonic signals.
 
void array2sh_apply_diff_EQ (void *const hA2sh)
 Applies diffuse-field equalisation at frequencies above the spatial aliasing limit.
 
void array2sh_calculate_mag_curves (void *const hA2sh)
 Computes the magnitude responses of the equalisation filters; the absolute values of the regularised inversed modal coefficients.
 
void array2sh_evaluateSHTfilters (void *hA2sh)
 Evaluates the spherical harmonic transform performance with the currently configured microphone/hydrophone array.
 
void array2sh_createArray (void **const hPars)
 Creates an instance of a struct, which contains the array configuration data.
 
void array2sh_destroyArray (void **const hPars)
 Destroys an instance of a struct, which contains the array configuration data.
 
void array2sh_initArray (void *const hPars, ARRAY2SH_MICROPHONE_ARRAY_PRESETS preset, int *arrayOrder, int firstInitFlag)
 Intialises an instance of a struct based on a preset, which contains the array configuration data.
 

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_internal.c.

Function Documentation

◆ array2sh_apply_diff_EQ()

void array2sh_apply_diff_EQ ( void *const hA2sh)

Applies diffuse-field equalisation at frequencies above the spatial aliasing limit.

Definition at line 380 of file array2sh_internal.c.

◆ array2sh_calculate_mag_curves()

void array2sh_calculate_mag_curves ( void *const hA2sh)

Computes the magnitude responses of the equalisation filters; the absolute values of the regularised inversed modal coefficients.

Definition at line 496 of file array2sh_internal.c.

◆ array2sh_calculate_sht_matrix()

void array2sh_calculate_sht_matrix ( void *const hA2sh)

Computes the spherical harmonic transform (SHT) matrix, to spatially encode input microphone/hydrophone signals into spherical harmonic signals.

Definition at line 95 of file array2sh_internal.c.

◆ array2sh_createArray()

void array2sh_createArray ( void **const hPars)

Creates an instance of a struct, which contains the array configuration data.

Parameters
[in]hPars(&) array configuration handle

Definition at line 606 of file array2sh_internal.c.

◆ array2sh_destroyArray()

void array2sh_destroyArray ( void **const hPars)

Destroys an instance of a struct, which contains the array configuration data.

Parameters
[in]hPars(&) array configuration handle

Definition at line 612 of file array2sh_internal.c.

◆ array2sh_evaluateSHTfilters()

void array2sh_evaluateSHTfilters ( void * hA2sh)

Evaluates the spherical harmonic transform performance with the currently configured microphone/hydrophone array.

Note
This is based on an analytical model of the array, so may differ in practice (although, it is usually pretty close, and saves from having to measure the array)

Definition at line 509 of file array2sh_internal.c.

◆ array2sh_initArray()

void array2sh_initArray ( void *const hPars,
ARRAY2SH_MICROPHONE_ARRAY_PRESETS preset,
int * arrayOrder,
int firstInitFLAG )

Intialises an instance of a struct based on a preset, which contains the array configuration data.

Parameters
[in]hPars(&) array configuration handle
[in]presetArray preset (see ARRAY2SH_MICROPHONE_ARRAY_PRESETS enum)
[in]arrayOrder(&) maximum encoding order of the current preset
[in]firstInitFLAG'1' this is the first time function is being called

Definition at line 621 of file array2sh_internal.c.

◆ array2sh_initTFT()

void array2sh_initTFT ( void *const hA2sh)

Initialise the filterbank used by array2sh.

Note
Call this function before array2sh_calculate_sht_matrix()

Definition at line 74 of file array2sh_internal.c.

◆ array2sh_replicate_order()

static void array2sh_replicate_order ( void *const hA2sh,
int order )
static

Takes the bNs computed up to N+1, and replicates them to be of length (N+1)^2 (replicating the 1st order bNs 3 times, 2nd -> 5 times etc.)

Definition at line 56 of file array2sh_internal.c.