Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section contains the following pages:

Child pages (Children Display)
alltrue
Info

Links to individual module pages can also be found in the table at the end of this page.

General Information

The Audio Weaver Filters folder lists over 60 filters. They have been broken down according to user needs, with the folder labels Adaptive, Calculated Coeffs, Controllable, High Precision, Raw Coeffs, and list the most commonly used filters. The Adaptive folder contains the LMS module, an adaptive filter with tracking capabilities. For those users less experienced with designing filters, the Calculated Coeffs filters take in frequency information, Q, Gain, and type, similar to tuning a filter in a DAW. Users with more DSP background can use the Raw Coeffs filters to tune filters with mathematical information. The most frequently used filters are the ButterworthFilter (highpass, lowpass, allpass), SecondOrderFilterSmoothed, with 20 different filter types, and the SecondOrderFilterSmoothedCascade: multiple 2nd order filters in series.

...

A very common use of the SOFControl module is within a perceptual volume control. As the volume of the system is reduced, overall spectral balance should be maintained. Due to the sensitivity of the human auditory system, low frequencies and high frequencies appear to drop off more quickly than mid frequencies. Thus, to maintain the overall spectral balance, boost low and high frequencies as the volume level decreases. The VolumeControl module accomplishes this with a fixed boost table. For finer control over the boost, use a TableInterp module together with a SOFControl filter as shown below. The control signal “Volume” specifies the listening level and ranges from 0 (loud) to -80 (soft). The lookup tables convert the Volume setting into low frequency and high frequency boosts which are applied using the SOFControl module. The low frequency SOFControl module implements a peaking filter at 40 Hz and the gain is taken from the control pin. The high frequency SOFControl module implements a high shelf in which the gain is taken from the control pin.

...

Filters with Raw Coefficients

Audio Weaver contains several filter types which operate on raw coefficients. These filters are for expert users who understand DSP and know how to calculate the filter coefficients[1]. .

Note: MATLAB is often used by expert Audio Weaver users to compute coefficients and then update them in the block diagram.

There are two types of filters – Finite Impulse Response (FIR) and Infinite Impulse Response (IIR). Although Audio Weaver supports both types of filters, the majority of the filters used in audio applications are IIR due to their computational efficiency.

...

There are 5 coefficients that the user must set: b0, b1, b2, a1, and a2 (a0 is always assumed to be 1). Audio Weaver does not check for stability and care must be used when computing the filter coefficients. There are several variants of Biquad filters. The simples – Biquad – has a single stage and implements the different equation shown above. BiquadCascade implements N stages of filtering with each channel using the same coefficients. BiquadNCascade implements N stages with each channel have its own set of coefficients. Finally, BiquadSmoothed implements a single Biquad stage with coefficient smoothing on a block-by-block basis.

 

Image RemovedImage Added

FIR

 

Time domain FIR filter

Specify filter length in module properties

Image RemovedImage Added

Biquad

 

Second order IIR filter.

5 filter coefficients are specified.

No smoothing.

Image RemovedImage Added

BiquadCascade

 

Multiple Biquad filters in series.

The number of filters is specified in module properties.

The same coefficients are used per channel.

Image RemovedImage Added

BiquadSmoothed

 

Second order IIR filter.

5 filter coefficients are specified.

Smoothed on a block-by-block basis

Image RemovedImage Added

BiquadNCascade

 

Multiple Biquad filters in series.

The number of filters is specified in module properties.

Different coefficients are used per channel.

Image RemovedImage Added

FIR Sparse

 

Sparse FIR filter in which most values are zero.

Less convolution cycles than normal FIR

Image RemovedImage Added

FIR Sparse Reader

 

Sparse FIR that connects to a delay state writer.

Convolution is based on a pointer rather than a separate FIR buffer.

 

Image RemovedImage Added

FIR Sparse Reader Fract16

 

Like FIR Sparse Reader except half the memory.

Data is converted to fract16 for computations and has a conversion for the output if necessary.

...

The High Precision modules are designed to be drop in replacements for the non-high precision filters. That way, numerical problems can be resolved by replacing the offending filter with its high precision version.

Image RemovedImage Added

BiqudSmoothedHP

Smoothly varying Biquad

Image RemovedImage Added

ButterworthFilterHP

Butterworth lowpass, highpass, and allpass filters

Image RemovedImage Added

BiquadCascadeHP

Cascade of N Biquad stages

Image RemovedImage Added

GraphicEQBandHP

Single band of a graphic equalizer

Image RemovedImage Added

SOFControlHP

Controllable second order filter with design equations

Image RemovedImage Added

SOFCascadeHP

Cascade of second order filters each with design equations

Image RemovedImage Added

SecondOrderFilterHP

Single second order filter with design equations

Image RemovedImage Added

VolumeControlHP

Fletcher Munson volume control with loudness compensation

...

The crossover filter module (XoverNway) is actually a subsystem consisting of multiple individual modules. The module properties give the option to construct the crossover using standard Biquads or high precision Biquads:

...

The graphic equalizer gives the option of using standard precision or high precision filters.

Here is an example of the benefits of the high precision filter. The system in the example has a peaking filter at 20 Hz with a gain of 6 dB and a Q of 2 and operates at a 48 kHz sample rate. The total harmonic distortion and noise (THD+N) for different input frequencies is plotted below. First for standard Biquad filters

...

And now with a high precision filter, notice that the noise floor is reduced significantly – by up to 90 dB at low frequencies.

...

For the interested reader, this measurement is performed by passing sine waves of different frequencies through the filter. Apply a notch filter at the output which removes the sine wave and then measure the RMS energy in the residual. This residual energy equals the THD+N. The measurement is repeated for many different frequencies and the plot reflects the measured THD+N at each input frequency.

 

Common Filter Modules

The following filters are found as modules with no folder in the Filters directory. This is because they are the most common types of filters, which cover most general cases of filtering needs.

ButterworthFilter

This module implements lowpass, highpass, or allpass filters using a Butterworth design. The filters have a gain of 0 dB in the passband and are then monotonically decreasing in the stopband. The filter order is specified under module properties and ranges from 1st order (6dB/octave) to 10th order (60dB/octave). The filter order can only be changed in Design mode. Specify the filter type on the inspector (lowpass, highpass, or allpass) as well as the cutoff frequency, in Hz. Since these parameters are on the inspector, the filter type and cutoff frequency can be changed at run-time. Unfortunately, the ButterworthFilter does not have coefficient smoothing and there may be discontinuities when coefficients are updated.

Figure 3 - Butterworth lowpass filter frequency response as a function of filter order. The filter order goes from 1st order (least steep line) to 10th order (steepest line). The cutoff frequency is 100 Hz and the sample rate is 48 kHz

Figure 4 - Butterworth high filter frequency response as a function of filter order. The filter order goes from 1st order (least steep line) to 10th order (steepest line). The cutoff frequency is 100 Hz and the sample rate is 48 kHz

SecondOrderFilterSmoothed

This module is the most frequently used filter among all of the Audio Weaver modules. It implements a 2nd order Biquad filter and includes design equations for 20 different filter types. The filter type and high-level design parameters (frequency, gain, and Q) can be changed at run-time using the inspector:

 

Depending on the filter type, some parameters are not used. See the table below for the filter types available and which control parameters are applicable.

Pass Through

filterType = 0

 

Applicable parameters: none.

 

...

...

SecondOrderFilterSmoothed

This module is the most frequently used filter among all of the Audio Weaver modules. It implements a 2nd order Biquad filter and includes design equations for 20 different filter types. The filter type and high-level design parameters (frequency, gain, and Q) can be changed at run-time using the inspector:

 

...

Depending on the filter type, some parameters are not used. See the table below for the filter types available and which control parameters are applicable.

Pass Through

filterType = 0

 

Applicable parameters: none.

 

Biquad coefficients are set to b0=1, b1=0, b2=0, a1=0, and a2=0. The filter runs and consumes processing but the output equals the input.

 

Image Added

 

Gain

filterType = 1

 

Applicable parameters: gain

 

A simple gain with coefficients set to b0=undb20(gain), b1=0, b2=0, a1=0, and a2=0. The filter runs and consumes processing but the output equals the input.

 

 

Gain

filterType = 1

Image Added

1st order Butterworth lowpass filter

filterType = 2

 

Applicable parameters: freq

Image Added

2nd order Butterworth lowpass

filterType = 3

 

Applicable parameters: gainfreq

 

A simple gain with coefficients set to b0=undb20(gain), b1=0, b2=0, a1=0, and a2=0

Image Added

1st order Butterworth lowpass filterhighpass

filterType = 24

 

Applicable parameters: freq

2nd order Butterworth lowpass

filterType = 3

 

Applicable parameters: freq

1st order Butterworth highpass

filterType = 4

 

Applicable parameters: freq

Image Added

2nd order Butterworth highpass

filterType = 5

 

Applicable parameters: freq

Image Added

1st order allpass

filterType = 6

 

Applicable parameters: freq

Image Added

2nd order allpass

filterType = 7

 

Applicable parameters: freq and Q

Image Added

2nd order low shelf

filterType = 8

 

Applicable parameters: freq and gain

 

 Use as a low frequency tone control

Image Added

2nd order low shelf with Q

filterType = 9

 

Applicable parameters: freq, gain, and Q

Image Added

2nd order high shelf

filterType = 10

 

Applicable parameters: freq and gain

 

Use as a high frequency tone control

 

Image Added

2nd order high shelf with Q

filterType = 11

 

Applicable parameters: freq, gain, and Q

Image Added

2nd order peaking / parametric

filterType = 12

 

Applicable parameters: freq, gain, and Q

 

Commonly used for generic equalization since it has controllable frequency, gain, and Q settings. 

Image Added

2nd order notch

filterType = 13

 

Applicable parameters: freq and Q

Image Added

2nd order bandpass filter

filterType = 14

 

Applicable parameters: freq and Q

Image Added

1st order Bessel lowpass filter

filterType = 15

 

Applicable parameters: freq

Image Added

1st order Bessel highpass filter

filterType = 16

 

Applicable parameters: freq

Image Added

1st order asymmetrical low shelf

filterType = 17

 

Applicable parameters: freq and gain

Image Added

1st order asymmetrical high shelf

filterType = 18

 

Applicable parameters: freq and gain

Image Added

1st order symmetrical low shelf

filterType = 19

 

Applicable parameters: freq and gain

Image Added

1st order symmetrical high shelf

filterType = 20

 

Applicable parameters: freq and gain

Image Added

...

Note: The Butterworth filter from SecondOrderFilterSmoothed is the same as the ButterworthFilter module of equal filter order. However, SecondOrderFilterSmoothed only implements

...

1st and

...

2nd order Butterworth filters. Higher

...

Low/high shelf filter and low/high shelf filter Q are identical if Q is set to 0.707 (  ).

 

Second Order Filter Smoothed Cascade

This module contains several SecondOrderFilterSmoothed modules in series. This can be used to implement a more complicated EQ with only a single module. Under module properties, specify the number of stages of filtering. If the number of stages is set to 1, then this module is equivalent to the SecondOrderFilterSmoothed module. When there are multiple stages, the inspector expands as shown right:

 

 

 

...

order Butterworth filters can only be implemented by the ButterworthFilter module.

The SecondOrderFilterSmoothed implementation of the first order Butterworth filter is more computationally efficient than the ButterworthFiltermodule.

Low/high shelf filter and low/high shelf filter Q are identical if Q is set to 0.707 (√0.5).

Second Order Filter Smoothed Cascade

This module contains several SecondOrderFilterSmoothed modules in series. This can be used to implement a more complicated EQ with only a single module. Under module properties, specify the number of stages of filtering. If the number of stages is set to 1, then this module is equivalent to the SecondOrderFilterSmoothed module. When there are multiple stages, the inspector expands as shown right:

 

...

Table of Filter Modules

Category

Filter Type

Order

Usage Tip

Adaptive

LMS

(FIR length)

signal to be learned' goes into reference pin.

Calculated Coeffs

Allpass Pair

Variable

set Rs for better band separation

Calculated Coeffs

Audio Weighting

Cascaded 2nd

change weighting with the dropdown variable.

Calculated Coeffs

Crossover Filter

Variable up to 10th

frequency will split into upper and lower bands

Calculated Coeffs

Emphasis Filter

1st

used typically by weighting formulas

Calculated Coeffs

Graphic EQ

Variable up to 12th

automatic frequency setting with module variables

Calculated Coeffs

Graphic EQ Band

Variable up to 12th

up to 12th order, useful.

Calculated Coeffs

Hilbert

12th

+-90 degrees added to phase

Calculated Coeffs

Pink Filter

8th

turns white noise pink. Turns pink noise red.

Calculated Coeffs

Three Band Tone Control

2nd

Cheap solution for handling "full spectrum"

Calculated Coeffs

Tilt Filter

Variable 2nd

Makes noise more 'blue' or 'pink' based on slope.

Controllable

First Order Filter Control

1st

immediate control

Controllable

FOF Control

1st

immediate control

Controllable

Second Order Filter Control

1st/2nd

delayed control

High Precision

Biquad Cascade (Precise)

Cascaded 2nd

High Precision, use for handling low freq, high SR, or sensitive ears.

High Precision

Biquad Smoothed (Precise)

2nd

(same)

High Precision

Butterworth Filter (Precise)

Variable up to 10th

(same)

High Precision

Graphic EQ Band (Precise)

Variable up to 12th

(same)

High Precision

Second Order Filter (Precise)

1st/2nd

(same)

High Precision

SOFCascade (Precise)

Cascaded 1st/2nd

(same)

High Precision

SOFControl (Precise)

1st/2nd

(same)

Raw Coeffs

Biquad

2nd

clicks/pops with changes, this is for constant filter.

Raw Coeffs

Biquad Cascade

Cascaded 2nd

same as above, higher order.

Raw Coeffs

Biquad N Cascade

2nd

cascade with different filter responses.

Raw Coeffs

Biquad Smoothed

2nd

smoothly varying, use for end-user control.

Raw Coeffs

FIR

(FIR length)

convolution FIR

Raw Coeffs

FIR Sparse

(FIR length)

FIR with mostly zeros, computationally efficient.

Raw Coeffs

FIR Sparse Reader

(FIR length)

Hook to delay state writer, unique iterator feeds input for convolution

Raw Coeffs

FIR Sparse Reader Fract16

(FIR length)

twice the memory efficiency as above.

Floating Modules

Butterworth Filter

Variable up to 10th

Only odd allpasses are supported. Use SOF for even allpasses.

Floating Modules

Second Order Filter Smoothed

1st/2nd

20 different filter types, varying orders.

Floating Modules

Second Order Filter Smoothed Cascade

Cascaded 1st/2nd

same as above, but cascaded.