Skip to main content
Skip table of contents

AudioWeightingFract32

Overview

Standard audio weighting filters

Discussion

Implements standard weighting filters used in audio. The module operates on multiple channels and internally uses a BiquadCascade modoule. The .weightingType variable specifies what type of filter is implemented. Allowable values are:

0 = Flat

1 = A weighting

2 = B weighting

3 = C weighting

4 = D weighting

5 = ITU468

6 = LeqM

7 = ITU1770

When changing filter types, the audio output is muted, the filter's state variables are set to zero and then the coefficients are updated. Once the coefficients are changed, the audio is unmuted.

Type Definition

CODE
typedef struct _ModuleAudioWeightingFract32
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 weightingType;                          // Selects weighting type
    INT32 numStages;                              // Number of stages in the IIR filter
    FLOAT32* coeffs;                              // Array of precomputed filter coefficients for the specified sampling rate
    awe_modBiquadCascadeFract32Instance *filt; // Cascade of second order Biquad filters
    awe_modMuteUnmuteFract32Instance *mute; // Multichannel smooth mute
} ModuleAudioWeightingFract32Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

weightingType

int

parameter

0

0

0:7

numStages

int

parameter

1

4

Unrestricted

coeffs

float*

parameter

1

[160 x 1]

Unrestricted

Pins

Input Pins

Name: in

Description: Audio Input

Data type: fract32

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: audio output

Data type: fract32

Scratch Pins

Channel count: 1

Block size: 32

Sample rate: 48000

Channel count: 1

Block size: 32

Sample rate: 48000

MATLAB Usage

File Name: weighting_fract32_module.m

CODE
 SYS = weighting_fract32_module(NAME)
 Creates a module which implements standard audio frequency weightings:
 A, B, C, D, ITU 468, and Leq M.  Arguments:
    NAME - name of the module.
 The module stores all of the various filter coefficients in an internal
 array and you can switch between filter types at run-time.  Internally,
 the module uses a Biquad cascade together with a mute/unmute module to 
 hide switching transients.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.