Jamoma API  0.6.0.a19
TTBlackmanWindow.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspWindowFunctionLib
4  *
5  * @brief Blackman Window Function Unit for Jamoma DSP
6  *
7  * @details Implemented according to: @n
8  * http://en.wikipedia.org/wiki/File:Window_function_(blackman).png @n
9  * w = 0.42 - 0.5*cos(2*pi*k/(N-1)) + 0.08*cos(4*pi*k/(N-1));
10  *
11  * @authors Tim Place, Nathan Wolek, Trond Lossius
12  *
13  * @copyright Copyright © 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 #ifndef __BLACKMANWINDOW_H__
19 #define __BLACKMANWINDOW_H__
20 
21 #include "TTDSP.h"
22 
23 
24 class BlackmanWindow : TTAudioObjectBase {
25  TTCLASS_SETUP(BlackmanWindow)
26 
27 protected:
28 
29  /** Calculate y = f(x) for a single value.
30  @param x The input value to the window function.
31  @param y The resulting value for the window function.
32  @param data Not used.
33  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
34  */
35  inline TTErr calculateValue(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt data);
36 
37 
38  /** A standard audio processing method as used by TTBlue objects.
39  @param inputs The input vector that is to be processed.
40  @param outputs The resulting windowed vector.
41  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
42  */
43  TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
44 
45 };
46 
47 
48 #endif // __BLACKMANWINDOW_H__
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
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