Jamoma API  0.6.0.a19
TTExpFunction.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspFunctionLib
4  *
5  * @brief #TTExpFunction Unit for Jamoms DSP
6  *
7  * @details Can be used for exponential curves.
8  *
9  * @authors Trond Lossius
10  *
11  * @copyright Copyright © 2009 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 __TTEXPFUNCTION_H__
18 #define __TTEXPFUNCTION_H__
19 
20 #include "TTDSP.h"
21 
22 
23 /** A function unit providing a curve based on
24  y = exp(log(base)*x)
25  but with a variety of additions to the basic trig function.
26  */
29 
30 protected:
31 
32  TTFloat64 mBase; ///< Base for the exponential function
33  double k; ///< Internal coefficient
34 
35 
36  /** Calculate coefficients when this attr is set */
37  TTErr setBase(const TTValue& value);
38 
39  /** y = f(x) for a single value */
40  inline TTErr calculateValue(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt data);
41  inline TTErr calculateValueBypass(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt data);
42 
43 
44  /** A standard audio processing method as used by TTBlue objects.*/
46  TTErr processAudioBypass(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
47 
48  /** Unit Tests */
49  virtual TTErr test(TTValue& returnedTestInfo);
50 
51 };
52 
53 
54 #endif // __EXPFUNCTION_H__
virtual TTErr test(TTValue &returnedTestInfo)
Unit Tests.
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
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
Jamoma DSP Library.
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
A function unit providing a curve based on y = exp(log(base)*x) but with a variety of additions to th...
Definition: TTExpFunction.h:27
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
TTErr setBase(const TTValue &value)
Calculate coefficients when this attr is set.
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
TTFloat64 mBase
Base for the exponential function.
Definition: TTExpFunction.h:32
double k
Internal coefficient.
Definition: TTExpFunction.h:33
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34