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

Internal header for the HADES module (SAF_HADES_MODULE) More...

#include "saf_hades_analysis.h"
#include "saf_hades_synthesis.h"
#include "saf.h"
#include "saf_externals.h"

Go to the source code of this file.

Data Structures

struct  CxMic
 Helper struct for averaging covariance matrices (block-wise) More...
 
struct  hades_analysis_data
 Main structure for hades analysis. More...
 
struct  hades_synthesis_data
 Main structure for hades synthesis. More...
 
struct  hades_param_container_data
 Parameter container to store the data from an analyser for one blocksize of audio. More...
 
struct  hades_radial_editor_data
 Main structure for hades radial (360degree) gain and direct-to-diffuse ratio editor. More...
 
struct  hades_signal_container_data
 Signal container to store one block of TF-domain audio data. More...
 

Macros

#define HADES_MAX_BLOCKSIZE   ( 4096 )
 Maximum supported blocksize.
 

Functions

void hades_getInterpolatedHRTFs (hades_analysis_handle const hAna, HADES_HRTF_INTERP_OPTIONS interpOption, hades_binaural_config *binConfig, float *target_dirs_deg, int nTargetDirs, float_complex *hrtf_interp)
 Binaural filter interpolator.
 
void hades_sdMUSIC_create (void **const phMUSIC, int nMics, float *grid_dirs_deg, int nDirs)
 Creates an instance of the space-domain MUSIC implementation.
 
void hades_sdMUSIC_destroy (void **const phMUSIC)
 Destroys an instance of the spherical harmonic domain MUSIC implementation, which may be used for computing pseudo-spectrums for visualisation/DoA estimation purposes.
 
void hades_sdMUSIC_compute (void *const hMUSIC, float_complex *A_grid, float_complex *Vn, int nSrcs, float *P_music, int *peak_inds)
 Computes a pseudo-spectrum based on the MUSIC algorithm optionally returning the grid indices corresponding to the N highest peaks (N=nSrcs)
 
float hades_comedie (float *lambda, int N)
 Returns an estimate of the diffuseness, based on [1].
 

Detailed Description

Internal header for the HADES module (SAF_HADES_MODULE)

The framework for binaural rendering of Hearing-Assistive/Augmented-reality Devices (HADES) is described further in [1].

See also
[1] Fernandez, J., McCormack, L., Hyvärinen, P., Politis, A., and Pulkki, V. 2022. “Enhancing binaural rendering of head-worn microphone arrays through the use of adaptive spatial covariance matching”, The Journal of the Acoustical Society of America 151, 2624-2635
Author
Leo McCormack and Janani Fernandez
Date
01.02.2021
License
GNU GPLv2

Definition in file saf_hades_internal.h.

Macro Definition Documentation

◆ HADES_MAX_BLOCKSIZE

#define HADES_MAX_BLOCKSIZE   ( 4096 )

Maximum supported blocksize.

Definition at line 53 of file saf_hades_internal.h.

Function Documentation

◆ hades_comedie()

float hades_comedie ( float * lambda,
int N )

Returns an estimate of the diffuseness, based on [1].

Parameters
[in]lambdaEigenvalues; N x 1
[in]NNumber of eigenvalues
Returns
an estimate of the diffuseness
See also
[1] Epain, N. and Jin, C.T., 2016. Spherical harmonic signal covariance and sound field diffuseness. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 24(10), pp.1796-1807.

Definition at line 242 of file saf_hades_internal.c.

◆ hades_getInterpolatedHRTFs()

void hades_getInterpolatedHRTFs ( hades_analysis_handle const hAna,
HADES_HRTF_INTERP_OPTIONS interpOption,
hades_binaural_config * binConfig,
float * target_dirs_deg,
int nTargetDirs,
float_complex * hrtf_interp )

Binaural filter interpolator.

Parameters
[in]hAnahades analysis handle
[in]interpOptionsee HADES_HRTF_INTERP_OPTIONS
[in]binConfigBinaural configuration
[in]target_dirs_degTarget/interpolation dirs, in degrees; FLAT: nTargetDirs x 2
[in]nTargetDirsNumber of target/interpolation directions
[out]hrtf_interpThe interpolated HRTFs; nBands x NUM_EARS x nTargetDirs

Definition at line 42 of file saf_hades_internal.c.

◆ hades_sdMUSIC_compute()

void hades_sdMUSIC_compute ( void *const hMUSIC,
float_complex * A_grid,
float_complex * Vn,
int nSrcs,
float * P_music,
int * peak_inds )

Computes a pseudo-spectrum based on the MUSIC algorithm optionally returning the grid indices corresponding to the N highest peaks (N=nSrcs)

Warning
The number of sources should not exceed: floor(nMics/2)!
Parameters
[in]hMUSICsdMUSIC handle
[in]A_gridScanning steering vectors; nMics x nGrid
[in]VnNoise subspace; FLAT: nSH x (nSH - nSrcs)
[in]nSrcsNumber of sources
[in]P_musicPseudo-spectrum (set to NULL if not wanted); nDirs x 1
[in]peak_indsIndices corresponding to the "nSrcs" highest peaks in the pseudo-spectrum (set to NULL if not wanted); nSrcs x 1

Definition at line 177 of file saf_hades_internal.c.

◆ hades_sdMUSIC_create()

void hades_sdMUSIC_create ( void **const phMUSIC,
int nMics,
float * grid_dirs_deg,
int nDirs )

Creates an instance of the space-domain MUSIC implementation.

Parameters
[in]phMUSIC(&) address of the sdMUSIC handle
[in]nMicsNumber of microphones in the array
[in]grid_dirs_degScanning grid directions; FLAT: nDirs x 2
[in]nDirsNumber of scanning directions

Definition at line 129 of file saf_hades_internal.c.

◆ hades_sdMUSIC_destroy()

void hades_sdMUSIC_destroy ( void **const phMUSIC)

Destroys an instance of the spherical harmonic domain MUSIC implementation, which may be used for computing pseudo-spectrums for visualisation/DoA estimation purposes.

Parameters
[in]phMUSIC(&) address of the sdMUSIC handle

Definition at line 156 of file saf_hades_internal.c.