(8.D.2.6) ButterworthFilterHP
Overview
Butterworth filter with high precision implementation
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 _ModuleButterworthFilterHP
{
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 in Hz
awe_modBiquadCascadeHPInstance *filt; // Cascade of second order Biquad filters with high precision implementation
} ModuleButterworthFilterHPClass;
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 | 10:0.1:20000 | Hz |
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: butter_filterHP_module.m
SYS=butter_filterHP_module(NAME, ORDER)
Creates a Butterworth high-pass or low-pass filter. This version uses a
high precision implementation.
Arguments:
NAME - name of the module.
ORDER - filter order.
Â