Jamoma API  0.6.0.a19
TTAudioGraphSig.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup audioGraphUtilityLib
4  *
5  * @brief sig≈: generate multichannel signal based on one input value
6  *
7  * @details
8  *
9  * @authors Timothy Place
10  *
11  * @copyright Copyright © 2010 by 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_SIG_H__
18 #define __TT_SIG_H__
19 
20 #include "TTDSP.h"
21 
22 
23 /** The sig≈ object takes a single input message and converts it into a JAG signal */
26 
27 protected:
28 
29  TTFloat64 mValue;
30 
31  /** A value passed in as a dictionary will set the value attribute
32  If an array is passed in for the value in the dictionary, the first item in the array is used. */
33  TTErr dictionary(TTValue& input, TTValue&);
34 
35  TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
36  {
37  TTAudioSignal& out = outputs->getSignal(0);
38  TTSampleValuePtr outSample;
39  TTChannelCount numChannels = out.getNumChannelsAsInt();
40  TTUInt16 vs = out.getVectorSizeAsInt();
41  TTUInt16 n;
42 
43  for (TTChannelCount channel=0; channel < numChannels; channel++) {
44  outSample = out.mSampleVectors[channel];
45  n = vs;
46  while (n--)
47  *outSample++ = mValue;
48  }
49  return kTTErrNone;
50  }
51 
52 };
53 
54 
55 
56 #endif // __TT_SIG_H__
std::uint16_t TTUInt16
16 bit unsigned integer
Definition: TTBase.h:176
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
The sig≈ object takes a single input message and converts it into a JAG signal.
TTErr dictionary(TTValue &input, TTValue &)
A value passed in as a dictionary will set the value attribute If an array is passed in for the value...
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 TTAudioSignal class represents N vectors of audio samples for M channels.
Definition: TTAudioSignal.h:57
TTSampleValue ** mSampleVectors
An array of pointers to the first sample in each vector. Declared Public for fast access...
Definition: TTAudioSignal.h:74
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
No Error.
Definition: TTBase.h:343
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34