Jamoma API  0.6.0.a19
TTWelchWindow.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspWindowFunctionLib
4  *
5  * @brief Welch Window Function Unit for Jamoma DSP
6  *
7  * @details This implements a window function as described @n
8  * http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/windows/ @n
9  * welch(i) = 1.0 - ((i-n/2)/(n/2)) * ((i-n/2)/(n/2))
10  *
11  * @authors Tim Place, Nathan Wolek, Trond Lossius
12  *
13  * @copyrightCopyright © 2010 by Timothy Place @n
14  * This code is licensed under the terms of the "New BSD License" @n
15  * http://creativecommons.org/licenses/BSD/
16  */
17 
18 
19 #ifndef __WELCHWINDOW_H__
20 #define __WELCHWINDOW_H__
21 
22 #include "TTDSP.h"
23 
24 
25 /** This implements a window function as described @
26  http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/windows/
27  welch(i) = 1.0 - ((i-n/2)/(n/2)) * ((i-n/2)/(n/2))
28  */
31 
32 protected:
33 
34  /** Calculate y = f(x) for a single value.
35  @param x The input value to the window function.
36  @param y The resulting value for the window function.
37  @param data Not used.
38  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
39  */
40  inline TTErr calculateValue(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt data);
41 
42 
43  /** A standard audio processing method as used by TTBlue objects.
44  @param inputs The input vector that is to be processed.
45  @param outputs The resulting windowed vector.
46  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
47  */
49 
50 };
51 
52 
53 #endif // __WELCHWINDOW_H__
TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
A standard audio processing method as used by TTBlue objects.
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
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
TTErr calculateValue(const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt data)
Calculate y = f(x) for a single value.
A simple container for an array of TTAudioSignal pointers.
This implements a window function as described @ http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/...
Definition: TTWelchWindow.h:29
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