Jamoma API  0.6.0.a19
GaussWindow Class Reference

This implements the Gauss window function described here:
http://en.wikipedia.org/wiki/File:Window_function_(gauss).png
Be aware that when higher values are used for mSigma, minimum sample value will approach -17 dB

Where 0. More...

#include <TTGaussWindow.h>

+ Inheritance diagram for GaussWindow:
+ Collaboration diagram for GaussWindow:

Protected Member Functions

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...
 
TTErr test (TTValue &returnedTestInfo)
 Unit test for the window function unit. More...
 

Protected Attributes

TTFloat64 mSigma
 sigma effects the width of the Gaussion window. 0. <= sigma <= 0.5
 

Detailed Description

This implements the Gauss window function described here:
http://en.wikipedia.org/wiki/File:Window_function_(gauss).png
Be aware that when higher values are used for mSigma, minimum sample value will approach -17 dB

Where 0.

<= x <= 1. and 0. <= mSigma <= 0.5:
superscript = -0.5 * ( ( (2 * x) - 1 ) / mSigma )^2
y = e^ superscript

Definition at line 37 of file TTGaussWindow.h.

Member Function Documentation

TTErr GaussWindow::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 49 of file TTGaussWindow.cpp.

References kTTErrNone, and mSigma.

Referenced by processAudio().

TTErr GaussWindow::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 60 of file TTGaussWindow.cpp.

References calculateValue().

+ Here is the call graph for this function:

TTErr GaussWindow::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 62 of file TTGaussWindow.test.cpp.

References TTAudioSignal::allocWithVectorSize(), TTAudioSignal::mSampleVectors, TTAudioObjectBase::process(), TTObjectBase::setAttributeValue(), TT, TTObjectBaseInstantiate(), and TTObjectBaseRelease().

+ Here is the call graph for this function:


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