Jamoma API  0.6.0.a19
TTLogFunction.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspFunctionLib
4  *
5  * @brief #TTLogFunction 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 __TTLOGFUNCTION_H__
18 #define __TTLOGFUNCTION_H__
19 
20 #include "TTDSP.h"
21 
22 
23 /** A function unit providing logaritmic mapping with variable base
24  y = (log(x)/log(base)-1) / (base - 1)
25  */
28 
29 protected:
30 
31  TTFloat64 mBase; ///< Base for the exponential function
32  double k; ///< Internal coefficient
33  double l; ///< 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  /** A standard audio processing method as used by TTBlue objects.*/
44  TTErr processAudioBypass(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
45 
46  /** Unit Tests */
47  virtual TTErr test(TTValue& returnedTestInfo);
48 };
49 
50 
51 #endif // __LOGFUNCTION_H__
A function unit providing logaritmic mapping with variable base y = (log(x)/log(base)-1) / (base - 1)...
Definition: TTLogFunction.h:26
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
TTFloat64 mBase
Base for the exponential function.
Definition: TTLogFunction.h:31
TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
A standard audio processing method as used by TTBlue objects.
TTErr setBase(const TTValue &value)
Calculate coefficients when this attr is set.
Jamoma DSP Library.
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
TTErr calculateValue(const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt data)
y = f(x) for a single value
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
double l
Internal coefficient.
Definition: TTLogFunction.h:33
virtual TTErr test(TTValue &returnedTestInfo)
Unit Tests.
double k
Internal coefficient.
Definition: TTLogFunction.h:32
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
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34