32#ifndef __POWERMAP_INTERNAL_H_INCLUDED__
33#define __POWERMAP_INTERNAL_H_INCLUDED__
47#if !defined(POWERMAP_FRAME_SIZE)
48# if defined(FRAME_SIZE)
49# define POWERMAP_FRAME_SIZE ( FRAME_SIZE )
51# define POWERMAP_FRAME_SIZE ( 1024 )
54#define HOP_SIZE ( 128 )
55#define HYBRID_BANDS ( HOP_SIZE + 5 )
56#define TIME_SLOTS ( POWERMAP_FRAME_SIZE / HOP_SIZE )
57#define NUM_DISP_SLOTS ( 2 )
58#define MAX_COV_AVG_COEFF ( 0.45f )
61#if (POWERMAP_FRAME_SIZE % HOP_SIZE != 0)
62# error "POWERMAP_FRAME_SIZE must be an integer multiple of HOP_SIZE"
70typedef struct _powermap_codecPars
87typedef struct _powermap
#define MAX_SH_ORDER
Maximum supported Ambisonic order.
PROC_STATUS
Current status of the processing loop.
HFOV_OPTIONS
Available horizontal field-of-view (FOV) options.
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.
CODEC_STATUS
Current status of the codec.
ASPECT_RATIO_OPTIONS
Available aspect ratios.
#define HYBRID_BANDS
Number of frequency bands.
#define NUM_DISP_SLOTS
Number of display slots.
A sound-field visualiser, which utilises spherical harmonic signals as input; note this code is a rem...
POWERMAP_MODES
Available power-map/activity-map options.
void powermap_setCodecStatus(void *const hPm, CODEC_STATUS newStatus)
Sets codec status (see CODEC_STATUS enum)
void powermap_initTFT(void *const hPm)
Initialise the filterbank used by powermap.
#define POWERMAP_FRAME_SIZE
Framesize, in time-domain samples.
void powermap_initAna(void *const hPm)
Intialises the codec variables, based on current global/user parameters.
Main include header for the Spatial_Audio_Framework (SAF)
Include header for SAF externals.
Contains variables for scanning grids, and beamforming.
float * interp_dirs_deg
2D rectangular window interpolation directions, in degrees; FLAT: interp_nDirs x 2
float * interp_table
Spherical->2D interpolation table; FLAT: interp_nDirs x grid_nDirs.
int grid_nDirs
Number of scanning directions.
float * grid_dirs_deg
Spherical scanning grid directions, in degrees; FLAT: grid_nDirs x 2.
int interp_nTri
Number of triangles in the spherical triangulared grid.
int interp_nDirs
Number of interpolation directions.
Main structure for powermap.
float pmapAvgCoeff
Powermap averaging coefficient, [0..1].
powermap_codecPars * pars
codec parameters
float fs
Host sample rate, in Hz.
CH_ORDER chOrdering
Ambisonic channel order convention (see CH_ORDER)
int dispWidth
Number of pixels on the horizontal in the 2D interpolated powermap image.
float_complex *** SHframeTF
time-frequency domain SH input frame; HYBRID_BANDS x MAX_NUM_SH_SIGNALS x TIME_SLOTS
POWERMAP_MODES pmap_mode
see POWERMAP_MODES
PROC_STATUS procStatus
see PROC_STATUS
int pmapReady
0: powermap not started yet, 1: powermap is ready for plotting
float progressBar0_1
Current (re)initialisation progress, between [0..1].
float covAvgCoeff
Covariance matrix averaging coefficient, [0..1].
float * prev_pmap
grid_nDirs x 1
int new_masterOrder
New maximum/master SH analysis order (current value will be replaced by this after next re-init)
float pmap_grid_minVal
Current minimum value in pmap (used to normalise [0..1])
int recalcPmap
set this to 1 to generate a new powermap
HFOV_OPTIONS HFOVoption
see HFOV_OPTIONS
CODEC_STATUS codecStatus
see CODEC_STATUS
int FIFO_idx
FIFO buffer index.
int masterOrder
Current maximum/master SH analysis order.
float * pmap
grid_nDirs x 1
float ** SHframeTD
time-domain SH input frame; MAX_NUM_SH_SIGNALS x POWERMAP_FRAME_SIZE
ASPECT_RATIO_OPTIONS aspectRatioOption
see ASPECT_RATIO_OPTIONS
int dispSlotIdx
Current display slot.
NORM_TYPES norm
Ambisonic normalisation convention (see NORM_TYPES)
float pmap_grid_maxVal
Current maximum value in pmap (used to normalise [0..1])
int nSources
Current number of sources (used for MUSIC)
char * progressBarText
Current (re)initialisation step, string.
void * hSTFT
afSTFT handle