Jamoma API  0.6.0.a19
TTWaveshaper.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspEffectsLib
4  *
5  * @brief #TTWaveshaper distorts the signal by applying a waveshaper distortion
6  *
7  * @authors Nils Peters, Trond Lossius
8  *
9  * @copyright Copyright © 2011, Nils Peters @n
10  * This code is licensed under the terms of the "New BSD License" @n
11  * http://creativecommons.org/licenses/BSD/
12  */
13 
14 
15 #ifndef __TTWAVESHAPER_H__
16 #define __TTWAVESHAPER_H__
17 
18 #include "TTDSP.h"
19 
20 
21 /** TTGain is an exceptionally simple audio processor scales an input audio signal */
24 
25 protected:
26 
27  TTFloat64 mStrength, mInvStrength, mSigmoidGainCorrection, mPoly1GainCorrection;
28  TTSymbol mShape;
29  /** Setter for the shape attribute. */
30  TTErr setShape(const TTValue& newValue);
31  /** Setter for the strength attribute. */
32  TTErr setStrength(const TTValue& newValue);
33  /** A standard audio processing method as used by TTBlue objects. */
35  TTErr processAudioAtan(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
36  TTErr processAudioPoly1(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
37  TTErr processAudioSigmoid(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
38  /** Standard single value calculate method as used by DSP objects. */
39  inline TTErr calculateValueSin(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt channel);
40  inline TTErr calculateValueAtan(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt channel);
41  inline TTErr calculateValuePoly1(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt channel);
42  inline TTErr calculateValueSigmoid(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt channel);
43  /** Unit testing. */
44  //TTErr test(TTValue& returnedTestInfo);
45 };
46 
47 
48 #endif // __TTWAVESHAPER_H_
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
TTErr setStrength(const TTValue &newValue)
Setter for the strength attribute.
TTErr setShape(const TTValue &newValue)
Setter for the shape attribute.
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
TTGain is an exceptionally simple audio processor scales an input audio signal.
Definition: TTWaveshaper.h:22
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
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
TTErr processAudioSin(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
A standard audio processing method as used by TTBlue objects.
TTErr calculateValueSin(const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt channel)
Standard single value calculate method as used by DSP objects.