|
Jamoma API
0.6.0.a19
|
Generalized Window Function Wrapper. More...
#include <TTWindowFunction.h>
Inheritance diagram for WindowFunction:
Collaboration diagram for WindowFunction:Protected Member Functions | |
| TTErr | setFunction (const TTValue &function) |
| Choose the window function. More... | |
| TTErr | setNumPoints (const TTValue &numPoints) |
| Set the lookup table size. More... | |
| TTErr | doSetNumPoints (const TTUInt32 numPoints) |
| Set the lookup table size. More... | |
| TTErr | setMode (const TTValue &mode) |
| Set the process method. More... | |
| TTErr | setPadding (const TTValue &padding) |
| Zero-padding applied to lookup table. More... | |
| TTErr | fill () |
| Internal method for filling the lookup table. More... | |
| TTErr | getFunctions (const TTValue &, TTValue &listOfWindowTypesToReturn) |
| Return a list of all the available window functions. More... | |
| TTErr | setParameter (const TTValue &aParameterValueForTheFunction, TTValue &) |
| Set an attribute of the internal window object (e.g. More... | |
| TTErr | calculateValue (const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt data) |
| Calculate a single window function value y = f(x). More... | |
| TTErr | lookupValue (const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt data) |
| Lookup a single function value y = f(x) from the stored table of window function values. More... | |
| TTErr | processGenerate (TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs) |
| Generate a window function curve by means of calculations. More... | |
| TTErr | processLookup (TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs) |
| Apply window function to the inputs signal using window function values from the stored lookup table. More... | |
| TTErr | processApply (TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs) |
| Apply window function to the inputs signal using window function values that are calculated on the fly. More... | |
Protected Attributes | |
| TTSymbol | mFunction |
| Name of the window function to use. | |
| TTAudioObjectBasePtr | mFunctionObject |
| The actual window function object for mFunction. | |
| TTUInt32 | mNumPoints |
| Number of Points in the lookup table. | |
| TTSampleVector | mLookupTable |
| Cached table of size mNumPoints. | |
| TTSymbol | mMode |
| Options: 'generate', 'lookup', 'apply'. | |
| TTUInt32 | mPadding |
| for generating the lookup table - (e.g. padded welch window padded by 16 zeros on both sides) | |
Friends | |
| class | KaiserWindow |
Generalized Window Function Wrapper.
Definition at line 27 of file TTWindowFunction.h.
|
inlineprotected |
Calculate a single window function value y = f(x).
| x | The input value that we want to calculate a window function value for. |
| y | The returned window function y value. |
| data | Not currently used. |
Definition at line 148 of file TTWindowFunction.cpp.
References TTAudioObjectBase::calculate(), and mFunctionObject.
Referenced by setMode().
Here is the call graph for this function:Set the lookup table size.
The setNumPoints and doSetNumPoints methods perform the same action, and differs only in the type of the argument to the method.
| numPoints | The number of points to use. |
Definition at line 102 of file TTWindowFunction.cpp.
References fill(), mLookupTable, and mNumPoints.
Referenced by processApply(), and setNumPoints().
Here is the call graph for this function:
|
protected |
Internal method for filling the lookup table.
Definition at line 79 of file TTWindowFunction.cpp.
References TTAudioObjectBase::calculate(), kTTErrNone, mFunctionObject, mLookupTable, mNumPoints, and mPadding.
Referenced by doSetNumPoints(), setFunction(), setPadding(), and setParameter().
Here is the call graph for this function:
|
protected |
Return a list of all the available window functions.
| listOfWindowTypesToReturn | Pointer to an array that will be filled with a list of all available window functions. |
Definition at line 136 of file TTWindowFunction.cpp.
References TTObject::GetRegisteredClassNamesForTags(), and TT.
Here is the call graph for this function:
|
inlineprotected |
Lookup a single function value y = f(x) from the stored table of window function values.
| x | The input value that we want to calculate a window function value for. |
| y | The returned window function y value. |
| data | Not currently used. |
Definition at line 154 of file TTWindowFunction.cpp.
References kTTErrNone, mLookupTable, and mNumPoints.
Referenced by processLookup(), and setMode().
|
protected |
Apply window function to the inputs signal using window function values that are calculated on the fly.
| inputs | The input signal to apply a window function on. |
| outputs | The resaulting windowed signal. |
Definition at line 173 of file TTWindowFunction.cpp.
References doSetNumPoints(), TTAudioSignal::getMinChannelCount(), kTTErrNone, mLookupTable, mNumPoints, and TTAudioSignal::mSampleVectors.
Referenced by setMode().
Here is the call graph for this function:
|
protected |
Generate a window function curve by means of calculations.
| inputs | The input signal vector. |
| outputs | The resaulting window function. |
Definition at line 161 of file TTWindowFunction.cpp.
References mFunctionObject, and TTAudioObjectBase::process().
Referenced by setMode().
Here is the call graph for this function:
|
protected |
Apply window function to the inputs signal using window function values from the stored lookup table.
| inputs | The input signal to apply a window function on. |
| outputs | The resaulting windowed signal. |
Definition at line 167 of file TTWindowFunction.cpp.
References lookupValue().
Referenced by setMode().
Here is the call graph for this function:Choose the window function.
| function | The window function to use. |
Definition at line 47 of file TTWindowFunction.cpp.
References fill(), mFunction, mFunctionObject, TTAudioObjectBase::mMaxNumChannels, and TTObjectBaseInstantiate().
Here is the call graph for this function:Set the process method.
The options are 'generate', 'lookup', 'apply'.
| mode | The processing mode to use. The options are 'generate', 'lookup', 'apply'. |
Definition at line 117 of file TTWindowFunction.cpp.
References calculateValue(), kTTErrNone, lookupValue(), mMode, processApply(), processGenerate(), processLookup(), setCalculateMethod, setProcessMethod, and TT.
Here is the call graph for this function:Set the lookup table size.
The setNumPoints and doSetNumPoints methods perform the same action, and differs only in the type of the argument to the method.
| numPoints | The number of points to use. |
Definition at line 96 of file TTWindowFunction.cpp.
References doSetNumPoints().
Here is the call graph for this function:Zero-padding applied to lookup table.
| padding |
Definition at line 110 of file TTWindowFunction.cpp.
References fill(), and mPadding.
Here is the call graph for this function:
|
protected |
Set an attribute of the internal window object (e.g.
the 'beta' parameter to the Kaiser function).
| aParameterValueForTheFunction | Some functions have one or more parameters that can be set and that will alter the curve of the function. These parameters can be set using this method. |
Definition at line 59 of file TTWindowFunction.cpp.
References TTValue::copyFrom(), fill(), kTTErrWrongNumValues, mFunctionObject, TTObjectBase::setAttributeValue(), and TTValue::size().
Here is the call graph for this function: