Jamoma API  0.6.0.a19
ExpodecWindow Class Reference

This implements an exponential decay window that applies principles described here:
http://en.wikipedia.org/wiki/Exponential_decay

This window is intended for microsound applications as described by Roads (2001 p 88-90). More...

#include <TTExpodecWindow.h>

+ Inheritance diagram for ExpodecWindow:
+ Collaboration diagram for ExpodecWindow:

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 mRatio
 ratio expresses where to place the loudest sample 0 <= ratio <= 1., 0 = no attack, 1 = no release
 

Detailed Description

This implements an exponential decay window that applies principles described here:
http://en.wikipedia.org/wiki/Exponential_decay

This window is intended for microsound applications as described by Roads (2001 p 88-90).

Ratio variable allows this single class to produce BOTH expodec and rexpodec windows with options between. Lambda variable is set so that the quietest point in the decay will be -60 dB.
Where 0. <= x <= 1. and 0. <= mRatio <= 1.:
y = e^ ( ( 1 - ( x / mRatio ) ) * lambda ) : for the attack (approaching peak)
= e^ ( ((x - mRatio) / (1 - mRatio)) * lambda ) : for the release (leaving peak)

Definition at line 43 of file TTExpodecWindow.h.

Member Function Documentation

TTErr ExpodecWindow::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 53 of file TTExpodecWindow.cpp.

References kTTErrNone, and mRatio.

Referenced by processAudio().

TTErr ExpodecWindow::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 TTExpodecWindow.cpp.

References calculateValue().

+ Here is the call graph for this function:


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