SAF
|
Internal header for the higher-order Ambisonics module (SAF_HOA_MODULE) More...
#include "saf_hoa.h"
#include "../saf_sh/saf_sh.h"
#include "../saf_vbap/saf_vbap.h"
#include "../saf_utilities/saf_utilities.h"
#include "saf_externals.h"
Go to the source code of this file.
Functions | |
void | getEPAD (int order, float *ls_dirs_deg, int nLS, float *decMtx) |
Computes the Energy preserving Ambisonic decoder (EPAD), as detailed in [1]. | |
void | getAllRAD (int order, float *ls_dirs_deg, int nLS, float *decMtx) |
Computes the All-round Ambisonics decoder (AllRAD), as detailed in [1], which is essentially a spherical harmonic approximation of VBAP patterns for the target loudspeaker setup. | |
void | getBinDecoder_LS (float_complex *hrtfs, float *hrtf_dirs_deg, int N_dirs, int N_bands, int order, float *weights, float_complex *decMtx) |
Computes a standard least-squares (LS) binaural ambisonic decoder. | |
void | getBinDecoder_LSDIFFEQ (float_complex *hrtfs, float *hrtf_dirs_deg, int N_dirs, int N_bands, int order, float *weights, float_complex *decMtx) |
Computes a least-squares (LS) binaural ambisonic decoder with diffuse-field equalisation [1]. | |
void | getBinDecoder_SPR (float_complex *hrtfs, float *hrtf_dirs_deg, int N_dirs, int N_bands, int order, float *weights, float_complex *decMtx) |
Computes a binaural ambisonic decoder based on spatial resampling (i.e, virtual loudspeaker decoding) [1]. | |
void | getBinDecoder_TA (float_complex *hrtfs, float *hrtf_dirs_deg, int N_dirs, int N_bands, int order, float *freqVector, float *itd_s, float *weights, float_complex *decMtx) |
Computes a binaural ambisonic decoder based on the time-alignment (TA) method described in [1]. | |
void | getBinDecoder_MAGLS (float_complex *hrtfs, float *hrtf_dirs_deg, int N_dirs, int N_bands, int order, float *freqVector, float *weights, float_complex *decMtx) |
Computes a binaural ambisonic decoder based on the magnitude least-squares (MagLS) method, first described in [1], with the algorithm given in [2]. | |
Internal header for the higher-order Ambisonics module (SAF_HOA_MODULE)
A collection of Ambisonics related functions. Many of which are derived from the MATLAB library found in [1].
Definition in file saf_hoa_internal.h.
void getAllRAD | ( | int | order, |
float * | ls_dirs_deg, | ||
int | nLS, | ||
float * | decMtx ) |
Computes the All-round Ambisonics decoder (AllRAD), as detailed in [1], which is essentially a spherical harmonic approximation of VBAP patterns for the target loudspeaker setup.
[in] | order | Decoding order |
[in] | ls_dirs_deg | Loudspeaker directions in DEGREES [azi elev]; FLAT: nLS x 2 |
[in] | nLS | Number of loudspeakers |
[out] | decMtx | Decoding matrix; FLAT: nLS x (order+1)^2 |
Definition at line 100 of file saf_hoa_internal.c.
void getBinDecoder_LS | ( | float_complex * | hrtfs, |
float * | hrtf_dirs_deg, | ||
int | N_dirs, | ||
int | N_bands, | ||
int | order, | ||
float * | weights, | ||
float_complex * | decMtx ) |
Computes a standard least-squares (LS) binaural ambisonic decoder.
The binaural ambisonic decoder is computed for each frequency bin/band, ready to be applied to input SH signals in the time-frequency domain, or, take the inverse-FFT and apply it via matrix convolution.
[in] | hrtfs | The HRTFs; FLAT: N_bands x NUM_EARS x N_dirs |
[in] | hrtf_dirs_deg | HRTF directions; FLAT: N_dirs x 2 |
[in] | N_dirs | Number of HRTF directions in set |
[in] | N_bands | Number of frequency bands/bins |
[in] | order | Decoding order |
[in] | weights | Integration weights (set to NULL if not available); N_dirs x 1 |
[out] | decMtx | Decoding matrix; FLAT: N_bands x NUM_EARS x (order+1)^2 |
Definition at line 162 of file saf_hoa_internal.c.
void getBinDecoder_LSDIFFEQ | ( | float_complex * | hrtfs, |
float * | hrtf_dirs_deg, | ||
int | N_dirs, | ||
int | N_bands, | ||
int | order, | ||
float * | weights, | ||
float_complex * | decMtx ) |
Computes a least-squares (LS) binaural ambisonic decoder with diffuse-field equalisation [1].
The binaural ambisonic decoder is computed for each frequency bin/band, ready to be applied to input SH signals in the time-frequency domain, or, take the inverse-FFT and apply it via matrix convolution.
[in] | hrtfs | The HRTFs; FLAT: N_bands x NUM_EARS x N_dirs |
[in] | hrtf_dirs_deg | HRTF directions; FLAT: N_dirs x 2 |
[in] | N_dirs | Number of HRTF directions in set |
[in] | N_bands | Number of frequency bands/bins |
[in] | order | Decoding order |
[in] | weights | Integration weights (set to NULL if not available); N_dirs x 1 |
[out] | decMtx | Decoding matrix; FLAT: N_bands x NUM_EARS x (order+1)^2 |
Definition at line 230 of file saf_hoa_internal.c.
void getBinDecoder_MAGLS | ( | float_complex * | hrtfs, |
float * | hrtf_dirs_deg, | ||
int | N_dirs, | ||
int | N_bands, | ||
int | order, | ||
float * | freqVector, | ||
float * | weights, | ||
float_complex * | decMtx ) |
Computes a binaural ambisonic decoder based on the magnitude least-squares (MagLS) method, first described in [1], with the algorithm given in [2].
The binaural ambisonic decoder is computed for each frequency bin/band, ready to be applied to input SH signals in the time-frequency domain, or, take the inverse-FFT and apply it via matrix convolution.
[in] | hrtfs | The HRTFs; FLAT: N_bands x NUM_EARS x N_dirs |
[in] | hrtf_dirs_deg | HRTF directions; FLAT: N_dirs x 2 |
[in] | N_dirs | Number of HRTF directions in set |
[in] | N_bands | Number of frequency bands/bins |
[in] | order | Decoding order |
[in] | freqVector | Frequency vector; N_bands x 1 |
[in] | weights | Integration weights (set to NULL if not available); N_dirs x 1 |
[out] | decMtx | Decoding matrix; FLAT: N_bands x NUM_EARS x (order+1)^2 |
Definition at line 526 of file saf_hoa_internal.c.
void getBinDecoder_SPR | ( | float_complex * | hrtfs, |
float * | hrtf_dirs_deg, | ||
int | N_dirs, | ||
int | N_bands, | ||
int | order, | ||
float * | weights, | ||
float_complex * | decMtx ) |
Computes a binaural ambisonic decoder based on spatial resampling (i.e, virtual loudspeaker decoding) [1].
The binaural ambisonic decoder is computed for each frequency bin/band, ready to be applied to input SH signals in the time-frequency domain, or, take the inverse-FFT and apply it via matrix convolution.
[in] | hrtfs | The HRTFs; FLAT: N_bands x NUM_EARS x N_dirs |
[in] | hrtf_dirs_deg | HRTF directions; FLAT: N_dirs x 2 |
[in] | N_dirs | Number of HRTF directions in set |
[in] | N_bands | Number of frequency bands/bins |
[in] | order | Decoding order |
[in] | weights | Integration weights (set to NULL if not available); N_dirs x 1 |
[out] | decMtx | Decoding matrix; FLAT: N_bands x NUM_EARS x (order+1)^2 |
Definition at line 332 of file saf_hoa_internal.c.
void getBinDecoder_TA | ( | float_complex * | hrtfs, |
float * | hrtf_dirs_deg, | ||
int | N_dirs, | ||
int | N_bands, | ||
int | order, | ||
float * | freqVector, | ||
float * | itd_s, | ||
float * | weights, | ||
float_complex * | decMtx ) |
Computes a binaural ambisonic decoder based on the time-alignment (TA) method described in [1].
The binaural ambisonic decoder is computed for each frequency bin/band, ready to be applied to input SH signals in the time-frequency domain, or, take the inverse-FFT and apply it via matrix convolution.
[in] | hrtfs | The HRTFs; FLAT: N_bands x NUM_EARS x N_dirs |
[in] | hrtf_dirs_deg | HRTF directions; FLAT: N_dirs x 2 |
[in] | N_dirs | Number of HRTF directions in set |
[in] | N_bands | Number of frequency bands/bins |
[in] | order | Decoding order |
[in] | freqVector | Frequency vector; N_bands x 1 |
[in] | itd_s | Interaural time differences (ITDs), seconds; N_dirs x 1 |
[in] | weights | Integration weights (set to NULL if not available); N_dirs x 1 |
[out] | decMtx | Decoding matrix; FLAT: N_bands x NUM_EARS x (order+1)^2 |
Definition at line 432 of file saf_hoa_internal.c.
void getEPAD | ( | int | order, |
float * | ls_dirs_deg, | ||
int | nLS, | ||
float * | decMtx ) |
Computes the Energy preserving Ambisonic decoder (EPAD), as detailed in [1].
[in] | order | Decoding order |
[in] | ls_dirs_deg | Loudspeaker directions in DEGREES [azi elev]; FLAT: nLS x 2 |
[in] | nLS | Number of loudspeakers |
[out] | decMtx | Decoding matrix; FLAT: nLS x (order+1)^2 |
Definition at line 41 of file saf_hoa_internal.c.