A sound-field visualiser based on the directional re-assignment of beamformer energy based on local DoA estimates.
A sound-field visualiser based on the directional re-assignment of beamformer energy based on local DoA estimates
#ifndef __DIRASS_H_INCLUDED__
#define __DIRASS_H_INCLUDED__
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
typedef enum {
typedef enum {
float samplerate);
const float *const * inputs,
int nInputs,
int nSamples,
int isPlaying);
float** grid_dirs,
float** pmap,
int* nDirs,
int* pmapWidth,
int* hfov,
float* aspectRatio);
#ifdef __cplusplus
}
#endif
#endif
A bunch of things that are common to many of the saf examples.
CODEC_STATUS
Current status of the codec.
int dirass_getInputOrder(void *const hDir)
Returns the current analysis/input order (see SH_ORDERS enum)
int dirass_getDiRAssMode(void *const hDir)
Returns the current analysis directional re-assignment mode (see DIRASS_REASS_MODES enum)
void dirass_setInputOrder(void *const hDir, int newValue)
Sets the input/analysis order (see SH_ORDERS enum)
void dirass_requestPmapUpdate(void *const hDir)
Informs dirass that it should compute a new activity-map.
void dirass_setMinFreq(void *const hDir, float newValue)
Sets the minimum analysis frequency, in Hz.
void dirass_create(void **const phDir)
Creates an instance of the dirass.
void dirass_init(void *const hDir, float samplerate)
Initialises an instance of dirass with default settings.
void dirass_analysis(void *const hDir, const float *const *inputs, int nInputs, int nSamples, int isPlaying)
Analyses the input spherical harmonic signals to generate an activity-map as in [1,...
void dirass_initCodec(void *const hDir)
Intialises the codec variables, based on current global/user parameters.
void dirass_destroy(void **const phDir)
Destroys an instance of the dirass.
void dirass_setDispWidth(void *const hDir, int newValue)
Sets the output display width in pixels.
DIRASS_REASS_MODES
Available processing modes.
@ REASS_NEAREST
Each sector beamformer energy is re-assigned to the nearest interpolation grid point,...
@ REASS_MODE_OFF
Re-assignment is disabled.
@ REASS_UPSCALE
Each sector beamformer is re-encoded into spherical harmonics of a higher order.
int dirass_getProcessingDelay(void)
Returns the processing delay in samples (may be used for delay compensation features)
void dirass_setMaxFreq(void *const hDir, float newValue)
Sets the maximum analysis frequency, in Hz.
void dirass_setDiRAssMode(void *const hDir, int newMode)
Sets the analysis directional re-assignment mode (see DIRASS_REASS_MODES enum)
void dirass_setAspectRatio(void *const hDir, int newOption)
Sets the visualisation display window aspect-ratio (see ASPECT_RATIO_OPTIONS enum)
float dirass_getMinFreq(void *const hDir)
Returns the current minimum analysis frequency, in Hz.
void dirass_setDisplayGridOption(void *const hDir, int newOption)
Sets a new display grid option (see DIRASS_GRID_OPTIONS enum)
int dirass_getNormType(void *const hDir)
Returns the Ambisonic normalisation convention currently being usedto decode with,...
int dirass_getDisplayGridOption(void *const hDir)
Returns the current display grid option (see DIRASS_GRID_OPTIONS enum)
int dirass_getDispWidth(void *const hDir)
Returns the current output display width in pixels.
void dirass_setDispFOV(void *const hDir, int newOption)
Sets the visualisation display window horizontal field-of-view (FOV) (see HFOV_OPTIONS enum)
int dirass_getDispFOV(void *const hDir)
Returns the current visualisation display window horizontal field-of-view (FOV) (see HFOV_OPTIONS enu...
int dirass_getPmap(void *const hDir, float **grid_dirs, float **pmap, int *nDirs, int *pmapWidth, int *hfov, float *aspectRatio)
Returns the latest computed activity-map if it is ready; otherwise it returns 0, and you'll just have...
float dirass_getMaxFreq(void *const hDir)
Returns the current maximum analysis frequency, in Hz.
int dirass_getSamplingRate(void *const hDir)
Returns the current sampling rate, in Hz.
CODEC_STATUS dirass_getCodecStatus(void *const hDir)
Returns current codec status (see CODEC_STATUS enum)
int dirass_getUpscaleOrder(void *const hDir)
Returns the current upscale order (see DIRASS_UPSCALE_ORDERS enum)
int dirass_getFrameSize(void)
Returns the processing framesize (i.e., number of samples processed with every _process() call )
void dirass_setNormType(void *const hDir, int newType)
Sets the Ambisonic normalisation convention to decode with, in order to match with the convention emp...
int dirass_getChOrder(void *const hDir)
Returns the Ambisonic channel ordering convention currently being used to decode with,...
void dirass_setBeamType(void *const hDir, int newType)
Sets the sector beamforming pattern to employ for the analysis (see STATIC_BEAM_TYPES enum).
void dirass_getProgressBarText(void *const hDir, char *text)
(Optional) Returns current intialisation/processing progress text
int dirass_getAspectRatio(void *const hDir)
Returns the current visualisation display window aspect-ratio (see ASPECT_RATIO_OPTIONS enum)
float dirass_getProgressBar0_1(void *const hDir)
(Optional) Returns current intialisation/processing progress, between 0..1
void dirass_setUpscaleOrder(void *const hDir, int newOrder)
Sets the upscale order, only if DIRASS_REASS_MODES is set to REASS_UPSCALE, (see DIRASS_UPSCALE_ORDER...
DIRASS_GRID_OPTIONS
Available scanning grid options.
@ GRID_GEOSPHERE_10
GRID_GEOSPHERE_10 - 1002 points.
@ T_DESIGN_9
T_DESIGN_9 - 48 points.
@ T_DESIGN_3
T_DESIGN_3 - 6 points.
@ T_DESIGN_13
T_DESIGN_13 - 94 points.
@ T_DESIGN_6
T_DESIGN_6 - 24 points.
@ GRID_GEOSPHERE_9
GRID_GEOSPHERE_9 - 812 points.
@ GRID_GEOSPHERE_8
GRID_GEOSPHERE_8 - 642 points.
@ GRID_GEOSPHERE_6
GRID_GEOSPHERE_6 - 362 points.
@ T_DESIGN_30
T_DESIGN_30 - 480 points.
@ T_DESIGN_18
T_DESIGN_18 - 180 points.
@ T_DESIGN_4
T_DESIGN_4 - 12 points.
@ GRID_GEOSPHERE_12
GRID_GEOSPHERE_12 - 1442 points.
void dirass_setMapAvgCoeff(void *const hDir, float newValue)
Sets the activity-map averaging coefficient, 0..1.
void dirass_refreshSettings(void *const hDir)
Sets all intialisation flags to 1; re-initialising all settings/variables as dirass is currently conf...
DIRASS_UPSCALE_ORDERS
Available upscaling orders.
@ UPSCALE_ORDER_EIGHTEENTH
Eighteenth-order upscaling.
@ UPSCALE_ORDER_TWENTIETH
Twentieth-order upscaling.
@ UPSCALE_ORDER_NINETEENTH
Ninteenth-order upscaling.
@ UPSCALE_ORDER_FIRST
First-order upscaling.
@ UPSCALE_ORDER_SIXTH
Sixth-order upscaling.
@ UPSCALE_ORDER_SEVENTH
Seventh-order upscaling.
@ UPSCALE_ORDER_SEVENTEENTH
Seventeenth-order upscaling.
@ UPSCALE_ORDER_TWELFTH
Twelfth-order upscaling.
@ UPSCALE_ORDER_EIGHTH
Eighth-order upscaling.
@ UPSCALE_ORDER_SECOND
Second-order upscaling.
@ UPSCALE_ORDER_FIFTEENTH
Fifteenth-order upscaling.
@ UPSCALE_ORDER_FOURTH
Fourth-order upscaling.
@ UPSCALE_ORDER_NINTH
Ninth-order upscaling.
@ UPSCALE_ORDER_THIRTEENTH
Thirteenth-order upscaling.
@ UPSCALE_ORDER_THIRD
Third-order upscaling.
@ UPSCALE_ORDER_FIFTH
Fifth-order upscaling.
@ UPSCALE_ORDER_SIXTHTEENTH
Sixthteenth-order upscaling.
@ UPSCALE_ORDER_ELEVENTH
Eleventh-order upscaling.
@ UPSCALE_ORDER_FOURTEENTH
Fourteenth-order upscaling.
@ UPSCALE_ORDER_TENTH
Tenth-order upscaling.
void dirass_setChOrder(void *const hDir, int newOrder)
Sets the Ambisonic channel ordering convention to decode with, in order to match the convention emplo...
float dirass_getMapAvgCoeff(void *const hDir)
Returns the current activity-map averaging coefficient, 0..1.
int dirass_getNSHrequired(void *const hDir)
Returns the number of spherical harmonic signals required by the current analysis order: (current_ord...
int dirass_getBeamType(void *const hDir)
Returns the sector beamforming pattern to employed for the analysis (see STATIC_BEAM_TYPES enum)