Jamoma API  0.6.0.a19
TTSpat.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspSpatLib
4  *
5  * @brief Host a SpatLib object
6  *
7  * @details
8  *
9  * @authors Trond Lossius, Nils Peters, Timothy Place
10  *
11  * @copyright Copyright © 2011 by Trond Lossius, Nils Peters, and Timothy Place @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 __TT_SPAT_H__
18 #define __TT_SPAT_H__
19 
20 #include "TTDSP.h"
21 
22 /** Generalized SpatLib rendering unit wrapper.
23  */
26 
27 protected:
28 
29  TTAudioObjectBasePtr mSpatFunctionObject;
30  TTSymbol mSpatFunction;
31  TTChannelCount mSourceCount; ///< The number of sources
32  TTChannelCount mSinkCount; ///< The number of destinations
33 
34  /** Set what spatialisation function to use.
35  @param aSpatFunction The SpatLib renderer to use.
36  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
37  */
38  TTErr setSpatFunction(const TTValue& aSpatFunction);
39 
40 
41  /** Set the number of sources.
42  @param mode The number of sources to spatialise.
43  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
44  */
45  TTErr setSourceCount(const TTValue& aSource);
46 
47 
48  /** Set number of destinations
49  @param mode The number of destinations that sound will be rendered to.
50  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
51  */
52  TTErr setSinkCount(const TTValue& aSink);
53 
54 
55 
56  TTErr getSourcePosition(const TTValue& anIndex, TTValue& returnedPosition);
57  TTErr setSourcePosition(const TTValue& aPosition, TTValue& unused);
58  TTErr getSinkPosition(const TTValue& anIndex, TTValue& returnedPosition);
59  TTErr setSinkPosition(const TTValue& aPosition, TTValue& unused);
60 
61 
62  /** Return a list of all the available spatialisation methods.
63  @param
64  @param listOfSpatFunctionsToReturn An array of available spatialisation rendering units.
65  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
66  */
67  TTErr getSpatFunctions(const TTValue&, TTValue& listOfSpatFunctionsToReturn);
68 
69 
70  /** Return a list of all the available parameters that are specific to the current spatialisation method.
71  @param
72  @param listOfParameterNamesToReturn An array of available spatialisation rendering units.
73  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
74  */
75 // TTErr getFunctionParameters(const TTValue&, TTValue& listOfParameterNamesToReturn);
76 
77 
78  /** Get the current value of a parameter (attribute) used by the current spatialisation method.
79  @param aParameterNameIn The name of the parameter that we want to query the value of.
80  @param
81  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
82  */
83 // TTErr getFunctionParameter(const TTValue& aParameterNameIn, TTValue& aValueOut);
84 
85 
86  /** Set the value of a parameter (attribute) used by the current spatialisation method.
87  @param aParameterNameIn The name of the parameter that we want to set and the value thatvwe want to set it to.
88  @param
89  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
90  */
91 // TTErr setFunctionParameter(const TTValue& aParameterNameAndValue, TTValue&);
92 
93 
94  /** @brief A standard audio processing method as used by Jamoma DSP objects.
95  @details This mthod performs the actual spatialisation rendering.
96  @param inputs A multichannel vector of audio signals for all sources that are to be spatially rendered.
97  @param outputs A multichannel vector of audio signals for each of the destinations that we are rendering to.
98  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
99  */
101 
102 };
103 
104 
105 #endif // __TT_SPAT_H__
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
TTErr setSpatFunction(const TTValue &aSpatFunction)
Set what spatialisation function to use.
Definition: TTSpat.cpp:57
Generalized SpatLib rendering unit wrapper.
Definition: TTSpat.h:24
TTChannelCount mSourceCount
The number of sources.
Definition: TTSpat.h:31
Jamoma DSP Library.
TTErr getSpatFunctions(const TTValue &, TTValue &listOfSpatFunctionsToReturn)
Return a list of all the available spatialisation methods.
Definition: TTSpat.cpp:98
#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
TTErr process(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
Return a list of all the available parameters that are specific to the current spatialisation method...
Definition: TTSpat.cpp:187
TTBoolean unused
Old var that is not used anymore, but we want to keep the struct size the same.
TTUInt16 TTChannelCount
Data type used when counting the number of channels in multi-channel audio signals and processes...
Definition: TTAudioSignal.h:31
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
TTChannelCount mSinkCount
The number of destinations.
Definition: TTSpat.h:32
TTErr setSinkCount(const TTValue &aSink)
Set number of destinations.
Definition: TTSpat.cpp:146
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34
TTErr setSourceCount(const TTValue &aSource)
Set the number of sources.
Definition: TTSpat.cpp:139