50#ifndef __ARRAY2SH_INTERNAL_H_INCLUDED__
51#define __ARRAY2SH_INTERNAL_H_INCLUDED__
65#if !defined(ARRAY2SH_FRAME_SIZE)
66# if defined(FRAME_SIZE)
67# define ARRAY2SH_FRAME_SIZE ( FRAME_SIZE )
69# define ARRAY2SH_FRAME_SIZE ( 128 )
72#define HOP_SIZE ( 128 )
73#define HYBRID_BANDS ( HOP_SIZE + 5 )
74#define TIME_SLOTS ( ARRAY2SH_FRAME_SIZE / HOP_SIZE )
75#define MAX_NUM_SENSORS ( ARRAY2SH_MAX_NUM_SENSORS )
76#define MAX_EVAL_FREQ_HZ ( 20e3f )
77#define MAX_NUM_SENSORS_IN_PRESET ( MAX_NUM_SENSORS )
80#if (ARRAY2SH_FRAME_SIZE % HOP_SIZE != 0)
81# error "ARRAY2SH_FRAME_SIZE must be an integer multiple of HOP_SIZE"
89typedef struct _array2sh_arrayPars {
105typedef struct _array2sh
140 double_complex* L_diff_fal;
141 double_complex* L_diff;
142 double_complex* E_diff;
143 double_complex* W_diffEQ_tmp;
144 double_complex* W_tmp;
#define MAX_SH_ORDER
Maximum supported Ambisonic order.
PROC_STATUS
Current status of the processing loop.
NORM_TYPES
Available Ambisonic normalisation conventions.
CH_ORDER
Available Ambisonic channel ordering conventions.
#define MAX_NUM_SH_SIGNALS
Maximum number of spherical harmonic components/signals supported.
#define HYBRID_BANDS
Number of frequency bands.
Spatially encodes spherical microphone array signals into spherical harmonic signals (aka: Ambisonic ...
ARRAY2SH_MICROPHONE_ARRAY_PRESETS
Available microphone array presets.
ARRAY2SH_FILTER_TYPES
Available encoding filter approaches.
ARRAY2SH_WEIGHT_TYPES
List of supported sensor directivities and array construction types.
ARRAY2SH_ARRAY_TYPES
List of supported array types.
ARRAY2SH_EVAL_STATUS
Current status of the encoder evaluation output data.
void array2sh_evaluateSHTfilters(void *hA2sh)
Evaluates the spherical harmonic transform performance with the currently configured microphone/hydro...
void array2sh_calculate_sht_matrix(void *const hA2sh)
Computes the spherical harmonic transform (SHT) matrix, to spatially encode input microphone/hydropho...
void array2sh_initTFT(void *const hA2sh)
Initialise the filterbank used by array2sh.
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.
void array2sh_calculate_mag_curves(void *const hA2sh)
Computes the magnitude responses of the equalisation filters; the absolute values of the regularised ...
#define MAX_NUM_SENSORS
Maximum permitted number of inputs/sensors.
void array2sh_apply_diff_EQ(void *const hA2sh)
Applies diffuse-field equalisation at frequencies above the spatial aliasing limit.
void array2sh_destroyArray(void **const hPars)
Destroys an instance of a struct, which contains the array configuration data.
void array2sh_createArray(void **const hPars)
Creates an instance of a struct, which contains the array configuration data.
Main include header for the Spatial_Audio_Framework (SAF)
Include header for SAF externals.
Contains variables for describing the microphone/hydrophone array.
int Q
Current number of sensors.
float R
radius of scatterer (only for rigid arrays)
ARRAY2SH_ARRAY_TYPES arrayType
see ARRAY2SH_ARRAY_TYPES
ARRAY2SH_WEIGHT_TYPES weightType
see ARRAY2SH_WEIGHT_TYPES
int newQ
New number of sensors (current value replaced by this after next re-init)
Main structure for array2sh.
float ** SHframeTD
Output SH signals in the time-domain; MAX_NUM_SH_SIGNALS x ARRAY2SH_FRAME_SIZE.
float_complex *** inputframeTF
Input sensor signals in the time-domain; HYBRID_BANDS x MAX_NUM_SENSORS x TIME_SLOTS.
float progressBar0_1
Current (re)initialisation progress, between [0..1].
double_complex * bN
Temp vector for the modal coefficients.
PROC_STATUS procStatus
see PROC_STATUS
char * progressBarText
Current (re)initialisation step, string.
float c
speed of sound, m/s
void * hSTFT
filterbank handle
float ** bN_modal_dB
modal responses / no regulaisation; HYBRID_BANDS x (MAX_SH_ORDER +1)
void * arraySpecs
array configuration
float gain_dB
post gain, dB
float ** inputFrameTD
Input sensor signals in the time-domain; MAX_NUM_SENSORS x ARRAY2SH_FRAME_SIZE.
float_complex *** SHframeTF
Output SH signals in the time-domain; HYBRID_BANDS x MAX_NUM_SH_SIGNALS x TIME_SLOTS.
ARRAY2SH_EVAL_STATUS evalStatus
see ARRAY2SH_EVAL_STATUS
float * cSH
spatial correlation; HYBRID_BANDS x 1
int reinitSHTmatrixFLAG
0: do not reinit; 1: reinit;
int new_order
new encoding order (current value will be replaced by this after next re-init)
float ** bN_inv_dB
modal responses / with regularisation; HYBRID_BANDS x (MAX_SH_ORDER +1)
float regPar
regularisation upper gain limit, dB;
float * lSH
level difference; HYBRID_BANDS x 1
NORM_TYPES norm
Ambisonic normalisation convention (see NORM_TYPES)
ARRAY2SH_MICROPHONE_ARRAY_PRESETS preset
currently selected MIC preset
ARRAY2SH_FILTER_TYPES filterType
encoding filter approach
int enableDiffEQpastAliasing
0: disabled, 1: enabled
int order
current encoding order
int evalRequestedFLAG
0: do not reinit; 1: reinit;
CH_ORDER chOrdering
Ambisonic channel order convention (see CH_ORDER)