Jamoma API  0.6.0.a19
TTPowerFunction.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspFunctionLib
4  *
5  * @brief #TTPowerFunction Unit for Jamoms DSP
6  *
7  * @details
8  *
9  * @authors Trond Lossius
10  *
11  * @copyright Copyright © 2007 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 
17 #ifndef __TTPOWERFUNCTION_H__
18 #define __TTPOWERFUNCTION_H__
19 
20 #include "TTDSP.h"
21 
22 
23 /** A function unit that provides exponential curves,
24  along with a number of options to control the behavior of the curve.
25  */
28 
29 protected:
30 
31  TTSymbol mSymmetry; ///< Mode: none, point or axis
32  double mPowerValue; ///< Parameter for function: y pow(x,pow(2,powerValue))
33  double mK; ///< k = pow(2,powerValue)
34 
35  /** Attribute setter. */
36  TTErr setSymmetry(const TTValue& newValue);
37 
38  /** Attribute setter. */
39  TTErr setPowerValue(const TTValue& newValue);
40 
41  /** y = f(x) for a single value */
42  inline TTErr calculatePoint(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt data);
43  inline TTErr calculateAxis(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt data);
44  inline TTErr calculateNoSymmetry(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt data);
45 
46  /** A standard audio processing method as used by TTBlue objects.*/
48 
49  /** Unit Tests */
50  virtual TTErr test(TTValue& returnedTestInfo);
51 
52 };
53 
54 
55 #endif // __POWERFUNCTION_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
TTErr setPowerValue(const TTValue &newValue)
Attribute setter.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
TTSymbol mSymmetry
Mode: none, point or axis.
double mPowerValue
Parameter for function: y pow(x,pow(2,powerValue))
A simple container for an array of TTAudioSignal pointers.
double mK
k = pow(2,powerValue)
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
TTErr setSymmetry(const TTValue &newValue)
Attribute setter.
virtual TTErr test(TTValue &returnedTestInfo)
Unit Tests.
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34
TTErr calculatePoint(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 function unit that provides exponential curves, along with a number of options to control the behav...