Jamoma API  0.6.0.a19
TTPanorama.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspEffectsLib
4  *
5  * @brief #TTPanorama performes stereo panning.
6  *
7  * @authors Tim Place, Nils Peters, Trond Lossius
8  *
9  * @copyright Copyright © 2008-2011, Tim Place, 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 __TTPANORAMA_H__
16 #define __TTPANORAMA_H__
17 
18 #include "TTDSP.h"
19 
20 class TTPanorama : public TTAudioObjectBase {
21  TTCLASS_SETUP(TTPanorama)
22 
23 protected:
24 
25  TTFloat64 mPosition; ///< Use a range of -1.0 to 1.0 to specify the panning position
26  TTFloat64 mScaledPosition;///< rescaled value of mPosition between 0 and 1.
27  TTSymbol mShape; ///< The shape attribute is set with a TTSymbol that is either "equalPower" (the default) or "linear"
28  TTSymbol mMode; ///< The mode attribute is set with a TTSymbol that is either "lookup" (the default) or "calculate"
29 
30  /** Utility used by the setters for setting up the process routine. */
31  TTErr setProcessPointers();
32 
33  /** The process method used when the shape attribute is set to "linear"
34  * This method will return an error if the input and output channels are not matched properly. */
35  TTErr processLinear(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
36 
37  /** The process method used when the shape attribute is set to "equalPower" and the mode is set to "lookup"
38  * This method will return an error if the input and output channels are not matched properly. */
39  TTErr processEqualPowerLookup(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
40  TTErr processEqualPowerCalc(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs); // calculate
41 
42  /** The process method used when the shape attribute is set to "squareRoot""
43  * This method will return an error if the input and output channels are not matched properly. */
44  TTErr processSquareRootCalc(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
45  TTErr processSquareRootLookup(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
46 
47  /** Setter for the shape attribute. */
48  TTErr setShape(const TTValue& value);
49 
50  /** Setter for the mode attribute. */
51  TTErr setMode(const TTValue& value);
52 
53  /** Setter for the mode attribute. */
54  TTErr setPosition(const TTValue& value);
55 
56 };
57 
58 
59 
60 #endif // __TTPANORAMA_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
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.
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