Jamoma API  0.6.0.a19
TTHanningWindow.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspWindowFunctionLib
4  *
5  * @brief Hanning Window Function Unit for Jamoma DSP
6  *
7  * @details This implements a window function as described at @n
8  http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/windows/ @n
9  hanning(x) = 0.5 + 0.5*cos(2*PI*(x-0.5)) @n
10  *
11  * @authors Nils Peters, Trond Lossius, Tim Place, Nathan Wolek
12  *
13  * @copyright Copyright © 2010 by Trond Lossius @n
14  * This code is licensed under the terms of the "New BSD License" @n
15  * http://creativecommons.org/licenses/BSD/
16  */
17 
18 #ifndef __HANNINGWINDOW_H__
19 #define __HANNINGWINDOW_H__
20 
21 #include "TTDSP.h"
22 
23 
24 /** This implements a window function as described @
25  http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/windows/
26  hanning(x) = 0.5 + 0.5*cos(2*PI*(x-0.5))
27  */
30 
31 protected:
32 
33  /** Calculate y = f(x) for a single value.
34  @param x The input value to the window function.
35  @param y The resulting value for the window function.
36  @param data Not used.
37  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
38  */
39  inline TTErr calculateValue(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt data);
40 
41 
42  /** A standard audio processing method as used by TTBlue objects.
43  @param inputs The input vector that is to be processed.
44  @param outputs The resulting windowed vector.
45  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
46  */
48 
49 };
50 
51 
52 #endif // __HANNINGWINDOW_H__
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
A standard audio processing method as used by TTBlue objects.
Jamoma DSP Library.
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
This implements a window function as described @ http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/...
A simple container for an array of TTAudioSignal pointers.
long TTPtrSizedInt
An integer that is the same size as a pointer.
Definition: TTBase.h:240
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
TTErr calculateValue(const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt data)
Calculate y = f(x) for a single value.