Jamoma API  0.6.0.a19
TTBackEaseOutFunction.cpp
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspFunctionLib
4  *
5  * @brief #TTBackEaseOutFunction Unit for Jamoms DSP
6  *
7  * @details Modeled after overshooting cubic y = 1-((1-x)^3-(1-x)*sin((1-x)*pi)) @n
8  * @n
9  * Derived from Sam Hocevar's public domain C/C++ implementation of
10  * Robert Penner easing functions
11  *
12  * @authors Trond Lossius
13  *
14  * @copyright Copyright © 2014 by Trond Lossius @n
15  * This code is licensed under the terms of the "New BSD License" @n
16  * http://creativecommons.org/licenses/BSD/
17  */
18 
19 
20 #include "TTBackEaseOutFunction.h"
21 
22 #define thisTTClass TTBackEaseOutFunction
23 #define thisTTClassName "easeOutBack"
24 #define thisTTClassTags "dspFunctionLib, audio, processor, function"
25 
26 
27 TT_AUDIO_CONSTRUCTOR
28 {
29  setProcessMethod(processAudio);
30  setCalculateMethod(calculateValue);
31 }
32 
33 
34 TTBackEaseOutFunction::~TTBackEaseOutFunction()
35 {
36  ;
37 }
38 
39 
41 {
42  TTFloat64 f = (1 - x);
43  y = 1 - (f * f * f - f * sin(f * kTTPi));
44  return kTTErrNone;
45 }
46 
47 
49 {
50  TT_WRAP_CALCULATE_METHOD(calculateValue);
51 }
52 
#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 calculateValue(const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt data)
y = f(x) for a single value
TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
A standard audio processing method as used by TTBlue objects.
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
TTBackEaseOutFunction Unit for Jamoms DSP
No Error.
Definition: TTBase.h:343
TTFOUNDATION_EXPORT const TTFloat64 kTTPi
[doxygenAppendixC_constExample]
Definition: TTBase.cpp:23