Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

Volume control with Fletcher-Munson loudness compensation using High Precision implementation

Discussion

Volume control subsystem with built in loudness compensation. The system has one multichannel input pin and one multichannel output pin. Input and output pins must have the same dimensions.

...

4.) Intead of using a seperate biquad and mixer, we dyanmically vary biquad coefficients so its transfer function implements the combined mixer biquad system described above. We need the original biquad numerator coefficients for calculation each time SYS.gain is varied, thus we keep them in the constants: SYS.b0_LPF, SYS.b1_LPF, SYS.b2_LPF.

Type Definition

Code Block
typedef struct _ModuleVolumeControlHP
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    FLOAT32 gain;                                 // Gain through the volume control, in dB.
    FLOAT32 centerFreq;                           // Center frequency of the low frequency resonance, in Hz.
    FLOAT32 c2;                                   // X^2 coefficient.
    FLOAT32 c1;                                   // X^1 coefficient.
    FLOAT32 c0;                                   // X^0 coefficient.
    FLOAT32 b0_LPF;                               // First numerator coefficient.
    FLOAT32 b1_LPF;                               // Second numerator coefficient.
    FLOAT32 b2_LPF;                               // Third numerator coefficient.
    FLOAT32 a1;                                   // First denominator coefficient.
    FLOAT32 a2;                                   // Second denominator coefficient.
    awe_modBiquadSmoothedHPInstance *mixerFilt; // 2nd order smoothly updating IIR filter with high precision implementation
} ModuleVolumeControlHPClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

gain

float

parameter

0

0

-90:0.1:0

dB

centerFreq

float

const

0

62.5

30:120

Hz

c2

float

const

0

0.001904

Unrestricted

c1

float

const

0

-0.09575

Unrestricted

c0

float

const

0

-0.2614

Unrestricted

b0_LPF

float

const

0

0.004074

Unrestricted

b1_LPF

float

const

0

-6.224e-12

Unrestricted

b2_LPF

float

const

0

-0.004074

Unrestricted

a1

float

const

0

-1.992

Unrestricted

a2

float

const

0

0.9919

Unrestricted

Pins

Input Pins

Name: in

Description: Audio Input

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: Audio output

Data type: float

MATLAB Usage

File Name: volume_controlHP_module.m

...