Jamoma API  0.6.0.a19
TrapezoidWindow Class Reference

This implements a Trapezoid window using the following algorthim: More...

#include <TTTrapezoidWindow.h>

+ Inheritance diagram for TrapezoidWindow:
+ Collaboration diagram for TrapezoidWindow:

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...
 

Protected Attributes

TTFloat64 mAlpha
 Set the alpha attribute of the Trapezoid window function. More...
 

Detailed Description

This implements a Trapezoid window using the following algorthim:

Where 0. <= x <= 1. and 0. <= mAlpha <= 1.: y = x * twoOverAlpha : for the attack = 1 : for the sustain = (1 - x) * twoOverAlpha : for the release

Definition at line 34 of file TTTrapezoidWindow.h.

Member Function Documentation

TTErr TrapezoidWindow::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 TTTrapezoidWindow.cpp.

References kTTErrNone, and mAlpha.

Referenced by processAudio().

TTErr TrapezoidWindow::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 74 of file TTTrapezoidWindow.cpp.

References calculateValue().

+ Here is the call graph for this function:

Member Data Documentation

TTFloat64 TrapezoidWindow::mAlpha
protected

Set the alpha attribute of the Trapezoid window function.

Parameters
newValueThe new value to apply.
Returns
TTErr error code if the method fails to execute, else #kTTErrNone.ratio of window fades to total window duration. 0 <= alpho <= 1., 0 = no fades, 1 = no sustain

Definition at line 43 of file TTTrapezoidWindow.h.

Referenced by calculateValue().


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