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

A frequency-dependent Ambisonic sound scene dynamic range compressor (DRC) More...

#include "ambi_drc.h"
#include "saf.h"
#include "saf_externals.h"

Go to the source code of this file.

Data Structures

struct  ambi_drc_data
 Main structure for ambi_drc. More...
 

Macros

#define AMBI_DRC_FRAME_SIZE   ( 128 )
 Framesize, in time-domain samples.
 
#define HOP_SIZE   ( 128 )
 STFT hop size.
 
#define HYBRID_BANDS   ( HOP_SIZE + 5 )
 Number of frequency bands.
 
#define TIME_SLOTS   ( AMBI_DRC_FRAME_SIZE / HOP_SIZE )
 Number of STFT timeslots.
 

Functions

float ambi_drc_gainComputer (float xG, float T, float R, float W)
 The DRC gain computer.
 
float ambi_drc_smoothPeakDetector (float xL, float yL_z1, float alpha_a, float alpha_r)
 The envelope detector.
 
void ambi_drc_initTFT (void *const hAmbi)
 Initialise the filterbank used by ambi_drc.
 
void ambi_drc_setInputOrder (SH_ORDERS inOrder, int *nSH)
 Sets the internal input order.
 

Detailed Description

A frequency-dependent Ambisonic sound scene dynamic range compressor (DRC)

The implementation can also keep track of the frequency-dependent gain factors for the omnidirectional component over time (for optional plotting). The design is based on the algorithm presented in [1].

The DRC gain factors per band are determined based on the omnidirectional component, which are then applied to all of the higher-order components; thus, the spatial information of the Ambisonic sound scene is retained (although, your perception of them may change due to the DRC).

See also
[1] McCormack, L., & Välimäki, V. (2017). "FFT-Based Dynamic Range Compression". in Proceedings of the 14th Sound and Music Computing Conference, July 5-8, Espoo, Finland.
Author
Leo McCormack
Date
07.01.2017
License
ISC

Definition in file ambi_drc_internal.h.

Macro Definition Documentation

◆ AMBI_DRC_FRAME_SIZE

#define AMBI_DRC_FRAME_SIZE   ( 128 )

Framesize, in time-domain samples.

Definition at line 59 of file ambi_drc_internal.h.

◆ HOP_SIZE

#define HOP_SIZE   ( 128 )

STFT hop size.

Definition at line 62 of file ambi_drc_internal.h.

◆ HYBRID_BANDS

#define HYBRID_BANDS   ( HOP_SIZE + 5 )

Number of frequency bands.

Definition at line 63 of file ambi_drc_internal.h.

◆ TIME_SLOTS

#define TIME_SLOTS   ( AMBI_DRC_FRAME_SIZE / HOP_SIZE )

Number of STFT timeslots.

Definition at line 64 of file ambi_drc_internal.h.

Function Documentation

◆ ambi_drc_gainComputer()

float ambi_drc_gainComputer ( float xG,
float T,
float R,
float W )

The DRC gain computer.

Definition at line 46 of file ambi_drc_internal.c.

◆ ambi_drc_initTFT()

void ambi_drc_initTFT ( void *const hAmbi)

Initialise the filterbank used by ambi_drc.

Definition at line 87 of file ambi_drc_internal.c.

◆ ambi_drc_setInputOrder()

void ambi_drc_setInputOrder ( SH_ORDERS inOrder,
int * nSH )

Sets the internal input order.

Definition at line 104 of file ambi_drc_internal.c.

◆ ambi_drc_smoothPeakDetector()

float ambi_drc_smoothPeakDetector ( float xL,
float yL_z1,
float alpha_a,
float alpha_r )

The envelope detector.

Definition at line 70 of file ambi_drc_internal.c.