ThreeBandToneControl
Overview
Three band equalizer
Discussion
This module implements a three band tone control floating point module. Low shelf filter is used for low frequency band with normalised gain with respect to mid band gain. Similarly for high frequency band, high shelf filter is used with normalised gain with respect to mid gain. Finally scale smoothly the entire signal with mid band gain.
Module Pack
Standard
ClassID
classID = 9
Type Definition
typedef struct _ModuleThreeBandToneControl
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
FLOAT32 smoothingTime; // Time constant of the smoothing process.
FLOAT32 lowFreq; // Low band center frequency, in Hz.
FLOAT32 midFreq; // Mid band center frequency, in Hz.
FLOAT32 highFreq; // High band center frequency, in Hz.
FLOAT32 lowGain; // Low band gain, in dB.
FLOAT32 midGain; // Mid band gain, in dB.
FLOAT32 highGain; // High band gain, in dB.
INT32 filterUpdateActive; // Boolean that is set when updating coefficients.
FLOAT32 smoothingCoeff; // Smoothing coefficient for the filter coefficients.
FLOAT32 midTargetGain; // Target gain of the mid frequency gain.
FLOAT32 midCurrentGain; // Current gain of the mid frequency gain.
FLOAT32 midSmoothingCoeff; // Sample-by-sample smoothing coefficient of the mid frequency gain.
FLOAT32* lowerTargetCoeffs; // Target coefficients for the low frequency shelf.
FLOAT32* lowerCurrentCoeffs; // Current coefficients for the low frequency shelf.
FLOAT32* lowerState; // State variables for the low frequency shelf.
FLOAT32* upperTargetCoeffs; // Target coefficients for the high frequency shelf.
FLOAT32* upperCurrentCoeffs; // Current coefficients for the high frequency shelf.
FLOAT32* upperState; // State variables for the high frequency shelf.
} ModuleThreeBandToneControlClass;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| smoothingTime | float | parameter | 0 | 20 | 0:1000 | msec |
| lowFreq | float | parameter | 0 | 60 | 30:200 | Hz |
| midFreq | float | parameter | 0 | 600 | 200:4000 | Hz |
| highFreq | float | parameter | 0 | 6000 | 4000:20000 | Hz |
| lowGain | float | parameter | 0 | 0 | -12:12 | dB |
| midGain | float | parameter | 0 | 0 | -12:12 | dB |
| highGain | float | parameter | 0 | 0 | -12:12 | dB |
| filterUpdateActive | int | parameter | 1 | 1 | Unrestricted | |
| smoothingCoeff | float | parameter | 1 | 0.03278 | Unrestricted | |
| midTargetGain | float | parameter | 1 | 1 | Unrestricted | |
| midCurrentGain | float | parameter | 1 | 1 | Unrestricted | |
| midSmoothingCoeff | float | parameter | 1 | 0.001041 | Unrestricted | |
| lowerTargetCoeffs | float* | parameter | 1 | [5 x 1] | Unrestricted | |
| lowerCurrentCoeffs | float* | parameter | 1 | [5 x 1] | Unrestricted | |
| lowerState | float* | state | 1 | [2 x 1] | Unrestricted | |
| upperTargetCoeffs | float* | parameter | 1 | [5 x 1] | Unrestricted | |
| upperCurrentCoeffs | float* | parameter | 1 | [5 x 1] | Unrestricted | |
| upperState | float* | state | 1 | [2 x 1] | Unrestricted |
Pins
Input Pins
| Name | in |
| Description | audio input |
| Data type | float |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
Output Pins
| Name | out |
| Description | audio output |
| Data Type | float |
Matlab Usage
File Name: three_band_tone_control_module.m
M=three_band_tone_control_module(NAME)
Implements a three band tone control module. Arguments:
NAME - name of the module.
Copyright (c) 2026 DSP Concepts, Inc.