Jamoma API
0.6.0.a19
|
4th order Butterworth lowpass filter; Butterworth filters have maximum flat frequency response in the pass band. More...
#include <TTLowpassButterworth4.h>
Protected Member Functions | |
TTErr | updateMaxNumChannels (const TTValue &oldMaxNumChannels, TTValue &) |
Receives notifications when there are changes to the inherited mMaxNumChannels attribute. More... | |
TTErr | clear () |
This algorithm uses an IIR filter, meaning that it relies on feedback. More... | |
TTErr | calculateValue (const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt channel) |
Standard single value calculate method as used by DSP objects. More... | |
TTErr | processAudio (TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs) |
Standard audio processing method as used by TTBlue objects. More... | |
TTErr | setFrequency (const TTValue &value) |
Setter for the frequency attribute. More... | |
virtual TTErr | test (TTValue &returnedTestInfo) |
Unit Tests. More... | |
Protected Attributes | |
TTFloat64 | mFrequency |
filter cutoff frequency | |
TTFloat64 | mRadians4 |
filter coefficients | |
TTFloat64 | mA2 |
filter coefficients for input samples | |
TTFloat64 | mB4 |
filter coefficients for output samples | |
TTSampleVector | mX1 |
Input sample n-1. | |
TTSampleVector | mX2 |
Input sample n-2. | |
TTSampleVector | mX3 |
Input sample n-3. | |
TTSampleVector | mX4 |
Input sample n-4. | |
TTSampleVector | mY1 |
Output sample n-1. | |
TTSampleVector | mY2 |
Output sample n-2. | |
TTSampleVector | mY3 |
Output sample n-3. | |
TTSampleVector | mY4 |
Output sample n-4. | |
4th order Butterworth lowpass filter; Butterworth filters have maximum flat frequency response in the pass band.
Filter equations from:
Second-order IIR Filters will support cascade implementations By Rusty Allred, Texas Instruments, Dallas July 01, 2003 http://www.planetanalog.com/article/printableArticle.jhtml?articleID=12802683
Definition at line 40 of file TTLowpassButterworth4.h.
|
inlineprotected |
Standard single value calculate method as used by DSP objects.
Definition at line 134 of file TTLowpassButterworth4.cpp.
References kTTErrNone, mA2, mB4, mX1, mX2, mX3, mX4, mY1, mY2, mY3, and mY4.
Referenced by processAudio().
|
protected |
This algorithm uses an IIR filter, meaning that it relies on feedback.
If the filter should not be producing any signal (such as turning audio off and then back on in a host) or if the feedback has become corrupted (such as might happen if a NaN is fed in) then it may be neccesary to clear the filter by calling this method.
Definition at line 81 of file TTLowpassButterworth4.cpp.
References kTTErrNone, TTAudioObjectBase::mMaxNumChannels, mX1, mX2, mX3, mX4, mY1, mY2, mY3, and mY4.
Referenced by updateMaxNumChannels().
|
protected |
Standard audio processing method as used by TTBlue objects.
Definition at line 154 of file TTLowpassButterworth4.cpp.
References calculateValue().
Setter for the frequency attribute.
Definition at line 95 of file TTLowpassButterworth4.cpp.
References kTTErrNone, kTTPi, kTTTwoPi, mFrequency, mRadians4, and TTAudioObjectBase::sr.
Unit Tests.
returnedTestInfo | Used to return test information |
Reimplemented from TTAudioObjectBase.
Definition at line 20 of file TTLowpassButterworth4.test.cpp.
|
protected |
Receives notifications when there are changes to the inherited mMaxNumChannels attribute.
This allocates memory for xm1, xm2, ym1, and ym2 so that each channel's previous values are remembered.
Definition at line 59 of file TTLowpassButterworth4.cpp.
References clear(), kTTErrNone, TTAudioObjectBase::mMaxNumChannels, mX1, mX2, mX3, mX4, mY1, mY2, mY3, and mY4.