Jamoma API  0.6.0.a19
TTBartlettWindow.cpp
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspWindowFunctionLib
4  *
5  * @brief Bartlett Window Function Unit for Jamoma DSP
6  *
7  * @details The Bartlett window is a triangular window with zero-valued end-points: @n
8  *
9  * @authors Trond Lossius, Tim Place, Nathan Wolek
10  *
11  * @copyright Copyright © 2010 by Trond Lossius @n
12  * This code is licensed under the terms of the "New BSD License" @n
13  * http://creativecommons.org/licenses/BSD/
14  */
15 
16 #include "TTBartlettWindow.h"
17 
18 #define thisTTClass BartlettWindow
19 #define thisTTClassName "bartlett"
20 #define thisTTClassTags "dspWindowFunctionLib, audio, processor, function, window"
21 
22 
23 TT_AUDIO_CONSTRUCTOR
24 {
25  setProcessMethod(processAudio);
26  setCalculateMethod(calculateValue);
27 }
28 
29 
30 BartlettWindow::~BartlettWindow()
31 {
32  ;
33 }
34 
35 
37 {
38  y = 1. - fabs(2.*x-1.);
39  return kTTErrNone;
40 }
41 
42 
44 {
45  TT_WRAP_CALCULATE_METHOD(calculateValue);
46 }
47 
#define setProcessMethod(methodName)
A convenience macro to be used by subclasses for setting the process method.
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
#define setCalculateMethod(methodName)
A convenience macro to be used by subclasses for setting the calculate method.
TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
A standard audio processing method as used by TTBlue objects.
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.
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
Bartlett Window Function Unit for Jamoma DSP.
No Error.
Definition: TTBase.h:343