Jamoma API  0.6.0.a19
TTSmoothPolynomialFunction.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspFunctionLib
4  *
5  * @brief #TTSmoothPolynomialFunction Unit for Jamoms DSP
6  *
7  * @details This function has the following properties: @n
8  * - It ramps from 0 to 1 @n
9  * - The 1st and 2nd derivate equals 0 at x=0 and x=1, giving a smooth start and end to the ramp @n
10  * - The start and end of the ramp should be more smooth than for cosine in #TTCosineFunction, as the 2nd order derivative of cosine do not equal 0 @n
11  * - The function is symmetrical around the point x=0.5, y=0.5
12  *
13  * @authors Trond Lossius
14  *
15  * @copyright Copyright © 2011 by Trond Lossius @n
16  * This code is licensed under the terms of the "New BSD License" @n
17  * http://creativecommons.org/licenses/BSD/
18  */
19 
20 
21 #ifndef __TTSMOOTHPOLYNOMIALFUNCTION_H__
22 #define __TTSMOOTHPOLYNOMIALFUNCTION_H__
23 
24 #include "TTDSP.h"
25 
26 
27 /** This implements a function which basically does nothing:
28  y = f(x)
29  */
32 
33 protected:
34 
35  /** y = f(x) for a single value */
36  inline TTErr calculateValue(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt data);
37 
38  /** A standard audio processing method as used by TTBlue objects.*/
40 
41  /** Unit Tests */
42  virtual TTErr test(TTValue& returnedTestInfo);
43 };
44 
45 
46 #endif // __SMOOTHPOLYNOMIALFUNCTION_H__
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)
y = f(x) for a single value
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
virtual TTErr test(TTValue &returnedTestInfo)
Unit Tests.
This implements a function which basically does nothing: y = f(x)
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34