Jamoma API  0.6.0.a19
TTLowpassLinkwitzRiley4 Class Reference

4th order Linkwitz Riley Lowpass Filter More...

#include <TTLowpassLinkwitzRiley4.h>

+ Inheritance diagram for TTLowpassLinkwitzRiley4:
+ Collaboration diagram for TTLowpassLinkwitzRiley4:

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 mRadians
 filter coefficients
 
TTFloat64 mA4
 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.
 

Detailed Description

4th order Linkwitz Riley Lowpass Filter

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

4th order Linkwitz-Riley filters are typically used as crossover filters, with the following properties:

  1. Absolutely flat amplitude response throughout the passband with a steep 24 dB/octave rolloff rate after the crossover point.
  2. The acoustic sum of the two driver responses is unity at crossover. (Amplitude response of each is -6 dB at crossover, i.e., there is no peaking in the summed acoustic output.)
  3. Zero phase difference between drivers at crossover. (Lobing error equals zero, i.e., no tilt to the polar radiation pattern.) In addition, the phase difference of zero degrees through crossover places the lobe of the summed acoustic output on axis at all frequencies.
  4. The low pass and high pass outputs are everywhere in phase. (This guarantees symmetry of the polar response about the crossover point.)
  5. All drivers are always wired the same (in phase).

Definition at line 55 of file TTLowpassLinkwitzRiley4.h.

Member Function Documentation

TTErr TTLowpassLinkwitzRiley4::calculateValue ( const TTFloat64 x,
TTFloat64 y,
TTPtrSizedInt  channel 
)
inlineprotected

Standard single value calculate method as used by DSP objects.

Definition at line 130 of file TTLowpassLinkwitzRiley4.cpp.

References kTTErrNone, mB4, mX1, mX2, mX3, mX4, mY1, mY2, mY3, and mY4.

Referenced by processAudio().

TTErr TTLowpassLinkwitzRiley4::clear ( )
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.

Returns
Returns a TTErr error code.

Definition at line 88 of file TTLowpassLinkwitzRiley4.cpp.

References kTTErrNone, TTAudioObjectBase::mMaxNumChannels, mX1, mX2, mX3, mX4, mY1, mY2, mY3, and mY4.

Referenced by updateMaxNumChannels().

TTErr TTLowpassLinkwitzRiley4::processAudio ( TTAudioSignalArrayPtr  inputs,
TTAudioSignalArrayPtr  outputs 
)
protected

Standard audio processing method as used by TTBlue objects.

Definition at line 148 of file TTLowpassLinkwitzRiley4.cpp.

References calculateValue().

+ Here is the call graph for this function:

TTErr TTLowpassLinkwitzRiley4::setFrequency ( const TTValue value)
protected

Setter for the frequency attribute.

Definition at line 102 of file TTLowpassLinkwitzRiley4.cpp.

References kTTErrNone, kTTPi, kTTTwoPi, mFrequency, mRadians, and TTAudioObjectBase::sr.

TTErr TTLowpassLinkwitzRiley4::test ( TTValue returnedTestInfo)
protectedvirtual

Unit Tests.

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

Reimplemented from TTAudioObjectBase.

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

TTErr TTLowpassLinkwitzRiley4::updateMaxNumChannels ( const TTValue oldMaxNumChannels,
TTValue  
)
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 66 of file TTLowpassLinkwitzRiley4.cpp.

References clear(), kTTErrNone, TTAudioObjectBase::mMaxNumChannels, mX1, mX2, mX3, mX4, mY1, mY2, mY3, and mY4.

+ Here is the call graph for this function:


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