Jamoma API  0.6.0.a19
TTHalfbandLinear33 Class Reference

A 33-pole halfband lowpass/highpass filter built-up from allpass building blocks. More...

#include <TTHalfbandLinear33.h>

+ Inheritance diagram for TTHalfbandLinear33:
+ Collaboration diagram for TTHalfbandLinear33:

Protected Member Functions

virtual TTErr test (TTValue &returnedTestInfo)
 Unit Tests. More...
 

Protected Attributes

TTAudioObject mP0Delay
 path0, pure delay, 16 samples
 
TTAudioObject mP1Delay
 path1
 
TTAudioObject mF0
 path1
 
TTAudioObject mF1
 path1
 
TTAudioObject mF2
 path1
 
TTAudioObject mF3
 path1
 
TTAudioObject mF4
 path1
 
TTSymbol mMode
 Attribute: lowpass or highpass.
 

Detailed Description

A 33-pole halfband lowpass/highpass filter built-up from allpass building blocks.

Based on Multirate Signal Processing for Communication Systems, Chapter 10, Page 20.

Same magnitude response with respect to frequency as TTHalfband9, but with nearly linear phase response.

The coefficients can be calculated using the "lineardesign_2.m" Matlab script. To generate the particular set of coefficients currently hard-coded into this filter, choose the following settings (yields a roughly -60dB stopband attenuation): iterations: 100 (iterations bring the filter toward equiripple in the stopband) wc = 0.2895 (this is the normalized frequency of the start of the stopband) number of paths = 2 number of coefficients = 8

The result is: Roots =

-0.832302165608369 -0.338171398434493 + 0.342959068350197i -0.338171398434493 - 0.342959068350197i -0.001794835916660 + 0.437771696086791i -0.001794835916660 - 0.437771696086791i 0.421285425003053 0.298484480776670 + 0.301855022798834i 0.298484480776670 - 0.301855022798834i

branch 1 - type1 coefficient 0.8323021656083688 -0.4212854250030528 branch 1 - type2 1st coefficient 0.6763427968689864 0.003589671833320152 -0.59696896155334 branch 1 - type2 2nd coefficient 0.2319808172827758 0.1916472793306732 0.1802094400534031

The ordering of the coefficients may not be at first obvious. The first line of coefficients are the two alpha coefficients for the first two (first-order) allpass filters, F0 and F1.

The second and third lines together provide the coefficient pairs for the remaining (second-order) filters. Thus, 0.6763427968689864 and 0.2319808172827758 are the coefficient pair for the first filter 0.003589671833320152 and 0.1916472793306732 are the coefficient pair for the second filter, and so on.

Definition at line 91 of file TTHalfbandLinear33.h.

Member Function Documentation

TTErr TTHalfbandLinear33::test ( TTValue returnedTestInfo)
protectedvirtual

Unit Tests.

Parameters
returnedTestInfoUsed to return test information
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

The following values are not necsessarily to be trusted. They were calculated from this filter unit itself at a time when the filter was assumed to work. As such, if this test fails in the future, it should be considered an indication that something has changed in the code or compiler that causes the calculated impulse response to differ from earlier results, but this test is not able to say anything meaningful about whether the old or new behaviour is to be trusted (or eventually none of them).

Reimplemented from TTAudioObjectBase.

Definition at line 20 of file TTHalfbandLinear33.test.cpp.

References TTAudioSignal::allocWithVectorSize(), TTAudioSignal::clear(), TTAudioSignal::mSampleVectors, TTAudioObjectBase::process(), TTObjectBaseInstantiate(), and TTObjectBaseRelease().

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: