Document toolboxDocument toolbox

(8.D.1.2) STGraphicEq

Overview

ST graphic EQ

Discussion

The Graphical equalizer (GrEq) module is in charge of fine tuning the sound spectrum according to user personal preferences. This is done by modifying gain factors at fixed frequencies represented by sliders. The number of bands is determined at the initialization phase and can be 5, 8 or 10. The gain factors are adjustable from -12 dB to +12 dB in standard mode. Implementation uses 32 bits resolution for all computations, and can be used with 32 bits input/output format at a sampling frequency of 48 kHz. GrEq module supports stereo interleaved 32 bits I/O data, with a minimum input frame size of 96 and a maximum input frame size of 480 stereo samples. This limitation corresponds to 10ms scheduling at 48 kHz sampling frequency.

GrEq library is configured with 6 gain presets. When the user selects one preset, the gains in the user_gain_per_band_dB[] table are discarded .

  • 0 : no preset, use the gains in the user_gain_per_band_dB[]

  • 1 : Pop

  • 2 : Jazz

  • 3 : Rock

  • 4 : Vocal

  • 5 : Classical

  • 6 : HipHop

Type Definition

typedef struct _ModuleSTGraphicEq { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 text; // Text explaining that sliders are for user mode only INT32 nAPIResult; // Return status for last call into the ST API INT32 nBands; // Number bands INT32 preset; // preset index (0 - none, 1 - Pop, 2 - Jazz, 3 - Rock, 4 - Vocal, 5 - Classical, 6 - HipHop INT32 enable; // Block enable INT32* userGain; // Up to 10 bands of gain (-12 dB - +12 dB in 1 dB steps) INT32* actualGain; // Up to 10 bands of gain (-12 dB - +12 dB in 1 dB steps) void * pGlobals; // Points to the global variables structure } ModuleSTGraphicEqClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

text

int

const

0

0

Unrestricted

 

nAPIResult

int

state

0

0

Unrestricted

 

nBands

int

const

0

5

5, 8, 10

 

preset

int

parameter

0

0

0:1:6

 

enable

int

parameter

0

1

0:1:1

 

userGain

int*

parameter

0

[1 x 5]

-12:1:12

dB

actualGain

int*

state

0

[1 x 5]

Unrestricted

 

pGlobals

void *

const

0

 

Unrestricted

 

Pins

Input Pins

Name: in

Description: audio input

Data type: fract32

Channel range: 2

Block size range: 96:480

Sample rate range: 48000

Complex support: Real

Output Pins

Name: out

Description: audio output

Data type: fract32

MATLAB Usage

File Name: st_graphic_eq_module.m

M = st_graphic_eq_module(NAME, NO_BANDS) Audio Weaver wrapper for the ST Gain Manager module. Arguments: NAME - name of the module. NO_BANDS - 5, 8, or 10 bands No Bands Center Frequencies 5 bands - 125, 400, 1278, 4088, 13074 8 bands - 100, 203, 412, 837, 1698, 3447, 6998, 14206 10 bands - 62, 115, 214, 399, 742, 1380, 2567, 4775, 8882, 16520 Copyright (c) 2017 DSP Concepts, Inc. All Rights Reserved. Author: Chris Perry

Â