Skip to content

SVF Multimode

Overview

State Variable Filter (Multimode) with coefficients derived from input pins

Discussion

This module is a State Variable Filter (short "SVF") module using the standard Chamberlin algorithm. The digital state variable filter was described in Hal Chamberlin "Musical Applications of Microprocessors". Derived by straight-forward replacement of components from the analog state variable filter with digital counterparts, the digital state variable is a popular synthesizer filter, as was its analog counterpart. The state variable filter has several advantages over biquads as a synthesizer filter. Lowpass, highpass and bandpass (also band-reject in theory) are available simultaneously. Also, frequency and Q control are independent and their values calculated easily.

Adjust the filter parameters by setting the fields freq and Q. The variable "freq" controls the center frequency of the filter and "Q" determines how sharp the filter is. Low Q values lead to broad filters and high Q values lead to narrow filters. When the parameters frequency or quality are controlled through the input pin, then the default behaviour of the module is to calculate coefficients in the Set function. User can change the behaviour through the parameter setBehavior to calculate coefficients in the Process function itself.

Note: this module has custom frequency response plotting and won’t work when plotted together with other modules in a chain. Only the SVF frequency response will be plotted in this case, and other modules in the chain will error out.

Module Pack

awe-mod-dspc-snd

ClassID

classID = 41805

Type Definition

typedef struct _ModuleSVFMultimode
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
INT32 setBehavior;                            // Controls the Set function calling behavior of the module. 0 = OnChangeDeferredSet, 1 = OnChangeInstantSet
FLOAT32 frequency;                            // Cutoff frequency of the filter, in Hz.
FLOAT32 quality;                              // Specifies the Q of the filter, if applicable.
FLOAT32 g;                                    // g coefficient
FLOAT32 g1;                                   // g1 coefficient
FLOAT32 h;                                    // h coefficient
INT32 updateActive;                           // Specifies whether the filter coefficients are updating (=1) or fixed (=0).
FLOAT32 current_g;                            // Instantaneous g coefficient.
FLOAT32 current_g1;                           // Instantaneous g1 coefficient.
FLOAT32 current_h;                            // Instantaneous h coefficient.
UINT32 pinID;                                 // Specifies which control pins are available.
FLOAT32* state;                               // State variables. 2*numChannels per section.
} ModuleSVFMultimodeClass;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
setBehavior int parameter 0 0 0:1
frequency float state 0 250 10:23990 Hz
quality float state 0 0.7071 0.05:20
g float derived 0 0.01636 Unrestricted
g1 float derived 0 1.431 Unrestricted
h float derived 0 0.9771 Unrestricted
updateActive int parameter 1 0 0:1
current_g float state 1 0 Unrestricted
current_g1 float state 1 0 Unrestricted
current_h float state 1 0 Unrestricted
pinID uint const 1 3 Unrestricted
state float* state 1 [2 x 1] Unrestricted

Pins

Input Pins

Name freqPin
Description Cutoff frequency of the filter
Data type float
Channel range 1
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real
Name qPin
Description Q of the filter
Data type float
Channel range 1
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real
Name in
Description Input signal
Data type float
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real

Output Pins

Name LP
Description Output signal
Data Type float
Name BP
Description Output signal
Data Type float
Name HP
Description Output signal
Data Type float

Matlab Usage

File Name: svf_multimode_module.m 

Copyright (c) 2026 DSP Concepts, Inc.