Jamoma API  0.6.0.a19
KaiserWindow Class Reference

This implements a window function as described @ https://ccrma.stanford.edu/~jos/sasp/Kaiser_Window.html
http://en.wikipedia.org/wiki/Window_function#Kaiser_windows. More...

#include <TTKaiserWindow.h>

+ Inheritance diagram for KaiserWindow:
+ Collaboration diagram for KaiserWindow:

Protected Member Functions

TTFloat64 BesselFunctionI0 (TTFloat64 x)
 internal use: calculate zeroth-order bessel function of the first kind
 
TTErr setAlpha (const TTValue &newValue)
 Set the alpha attribute of the Kaiser window function. More...
 
TTErr setBeta (const TTValue &newValue)
 Set the beta attribute of the Kaiser window function. More...
 
TTErr calculateValue (const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt data)
 Calculate y = f(x) for a single value. More...
 
TTErr processAudio (TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
 A standard audio processing method as used by TTBlue objects. More...
 
virtual TTErr test (TTValue &returnedTestInfo)
 Unit test for the window function unit. More...
 

Protected Attributes

TTFloat64 mAlpha
 alpha and beta atributes are linked to allow congruence with both references above. More...
 
TTFloat64 mBeta
 attribute: beta parameter for the Kaiser function
 
TTFloat64 mBesselIOofBeta
 calculated from the beta attribute
 

Detailed Description

Member Function Documentation

TTErr KaiserWindow::calculateValue ( const TTFloat64 x,
TTFloat64 y,
TTPtrSizedInt  data 
)
inlineprotected

Calculate y = f(x) for a single value.

Parameters
xThe input value to the window function.
yThe resulting value for the window function.
dataNot used.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 87 of file TTKaiserWindow.cpp.

References BesselFunctionI0(), kTTErrNone, mBesselIOofBeta, and mBeta.

Referenced by processAudio().

+ Here is the call graph for this function:

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

A standard audio processing method as used by TTBlue objects.

Parameters
inputsThe input vector that is to be processed.
outputsThe resulting windowed vector.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 102 of file TTKaiserWindow.cpp.

References calculateValue().

+ Here is the call graph for this function:

TTErr KaiserWindow::setAlpha ( const TTValue newValue)
protected

Set the alpha attribute of the Kaiser window function.

Parameters
newValueThe new value to apply.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 63 of file TTKaiserWindow.cpp.

References BesselFunctionI0(), kTTErrNone, kTTPi, mAlpha, mBesselIOofBeta, and mBeta.

+ Here is the call graph for this function:

TTErr KaiserWindow::setBeta ( const TTValue newValue)
protected

Set the beta attribute of the Kaiser window function.

Parameters
newValueThe new value to apply.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 75 of file TTKaiserWindow.cpp.

References BesselFunctionI0(), kTTErrNone, kTTPi, mAlpha, mBesselIOofBeta, and mBeta.

+ Here is the call graph for this function:

TTErr KaiserWindow::test ( TTValue returnedTestInfo)
protectedvirtual

Unit test for the window function unit.

Parameters
returnedTestInfoThe outcome from the performed unit test.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Reimplemented from TTAudioObjectBase.

Definition at line 52 of file TTKaiserWindow.test.cpp.

References TTAudioSignal::allocWithVectorSize(), kTTPi, mBesselIOofBeta, TTAudioSignal::mSampleVectors, TTAudioObjectBase::process(), TTValue::resize(), TTObjectBase::sendMessage(), TTObjectBase::setAttributeValue(), TT, TTObjectBaseInstantiate(), and TTObjectBaseRelease().

+ Here is the call graph for this function:

Member Data Documentation

TTFloat64 KaiserWindow::mAlpha
protected

alpha and beta atributes are linked to allow congruence with both references above.

setting one updates the other so that the following relationship is always true: beta = alpha * piattribute: alpha parameter for the Kaiser function

Definition at line 39 of file TTKaiserWindow.h.

Referenced by setAlpha(), and setBeta().


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