(8.D.2.5) ButterworthFilterFract32
Overview
Butterworth filter
Discussion
The module provides Butterworth low pass, high pass, or all pass filters, from 1st order to 8th order. The module operates on 32-bit floating-point data. The order of the filter is determined by the ORDER argument when instantiated, and the filterType parameter is used to select which type of filter is designed. Once ORDER is set, it cannot be changed. filterType, on the other hand, can be changed at run-time. filterType=0 designs a low pass filter. filterType=1 designs a high pass filter. filterType=2 designs an allpass filter.
Note that only odd order allpass filters are supported. If you try and build an even order allpass, you will get a warning message.
Type Definition
typedef struct _ModuleButterworthFilterFract32
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 filterType; // Specifies what type of filter is designed (lowpass=0, highpass=1, allpass=2)
INT32 order; // Order of the filter
FLOAT32 cutoff; // Cutoff frequency of the filter
awe_modBiquadCascadeFract32Instance *filt; // Cascade of second order Biquad filters
} ModuleButterworthFilterFract32Class;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
filterType | int | parameter | 0 | 0 | 0:2 | Â |
order | int | const | 0 | 2 | 1:8 | Â |
cutoff | float | parameter | 0 | 250 | 1:0.1:23000 | Hz |
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
MATLAB Usage
File Name: butter_filter_fract32_module.m
SYS=butter_filter_fract32_module(NAME, ORDER)
Creates a Butterworth high-pass or low-pass filter. Arguments:
NAME - name of the module.
ORDER - filter order.
Â