22 #define thisTTClass TTAudioGraphObjectBase
38 extern "C" void TTAudioGraphObjectBase::registerClass()
40 TTClassRegister(
TT(
"audio.object"),
"audio, graph, wrapper", TTAudioGraphObjectBase::instantiate );
44 TTAudioGraphObjectBase :: TTAudioGraphObjectBase (
const TTValue& arguments) :
53 TTSymbol wrappedObjectName = kTTSymEmpty;
60 TT_ASSERT(audiograph_correct_instantiation_arg_count, (arguments.
size() > 0));
62 wrappedObjectName = arguments[0];
63 if (arguments.
size() > 1)
64 numInlets = arguments[1];
65 if (arguments.
size() > 2)
66 numOutlets = arguments[2];
75 mKernel.send(
"setOwner", v, unusedReturnValue);
78 sSharedMutex =
new TTMutex(
false);
82 TTAudioGraphObjectBase::~TTAudioGraphObjectBase()
102 TTUInt16 outletCount = newNumOutlets;
117 prepareDescription();
120 inlet->prepareDescriptions();
132 desc.mObjectInstance =
mKernel;
133 desc.mNumInlets =
mInlets.size();
135 desc.mAudioDescriptionsForInlets.clear();
140 TTAudioGraphDescriptionVector vector;
142 inlet->getDescriptions(vector);
143 desc.mAudioDescriptionsForInlets.push_back(vector);
147 getDescription(desc.mControlDescription);
176 err =
mAudioInlets[toInletNumber].connect(anObject, fromOutletNumber);
204 inlet->preprocess(initData);
205 audioSignal = inlet->getBuffer();
212 audioSignal = outlet->getBuffer();
260 inlet->process(sampleStamp);
The TTGraphObjectBase wraps a TTDSP object such that it is possible to build a dynamic graph of audio...
std::uint16_t TTUInt16
16 bit unsigned integer
TTErr unlock()
Unlock the object when thread-safe processing is no longer required.
An inappropriate value was specified for an attribute or variable.
This node is currently processing audio.
TTErr connectAudio(TTAudioGraphObjectBasePtr anObject, TTUInt16 fromOutletNumber=0, TTUInt16 toInletNumber=0)
Add a source to the list of objects from which to request audio.
TTErr adaptMaxChannelCount(const TTUInt16 aNewChannelCount)
Allocate neccessary memory and make configuration adjustments so the object is able to process additi...
Audio processing has not yet started for this node.
TTUInt16 mVectorSize
The most recent vector size info passed from the terminal object during a preprocess.
std::uint64_t TTUInt64
64 bit unsigned integer
void getAudioDescription(TTAudioGraphDescription &desc)
Describe this object as part of the action of describing a complete audio graph.
TTAudioGraphOutletVector mAudioOutlets
The outlets that processed audio sampled will be passed to.
size_type size() const noexcept
Return the number of elements.
void reset()
Reset the graph by dropping all connections to all sources in preparation of a rebuilding of all of t...
This object provides a description of a TTAudioGraphObject and its sources.
void prepareAudioDescription()
Prepare for a request to descibe all of the graph.
Defines a single 'outlet' from an individual AudioGraph object.
Base class for all first-class Jamoma objects.
This object is an audio generator, and do not expect audio input.
TTGraphInletVector mInlets
The inlets through which we pull audio from sources.
TTErr dropAudio(TTAudioGraphObjectBasePtr anObject, TTUInt16 fromOutletNumber=0, TTUInt16 toInletNumber=0)
Drop a source from the list of objects from which to request audio.
Defines a single 'inlet' from an individual AudioGraph object.
TTErr setAttributeValue(const TTSymbol name, TTValue &value)
Set an attribute value for an object.
TTAudioGraphDescription mAudioDescription
Used to prevent feedback loops etc. when describing a graph.
TTBoolean valid
If the object isn't completely built, or is in the process of freeing, this will be false...
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
void * TTPtr
A generic pointer.
This node is an audio effect processor. It expects audio input that will be processed.
TTAudioArray mInputSignals
The buffered input for processing audio with our object.
The current processing status of the node is unknown.
TTSymbol name() const
Return the name of this class.
TTErr setNumAudioOutlets(const TTValue &newNumOutlets)
Set the number of audio outlets.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
TTUInt32 mNumAudioInlets
Attribute: The number of inputs for this object.
This object does not adapt its number of output channels to the number of input channels.
TTUInt16 vectorSize
The global/recommended/initial vectorSize (which can be overriden during process) ...
virtual TTErr preprocess(const TTAudioGraphPreprocessData &initData)
This method is called by an object about to process audio, prior to calling getAudioOutput().
The TTAudioSignal class represents N vectors of audio samples for M channels.
This node has completed processing audio for now.
TTAudioObject & getUnitGenerator()
...
Wraps an object from Jamoma DSP to function within AudioGraph.
TTUInt32 mNumAudioOutlets
Attribute: The number of outlets for this object.
std::int32_t TTInt32
32 bit signed integer
static TTInt32 sIndex
Used for creating mID.
TTErr setNumAudioInlets(const TTValue &newNumInlets)
Set the number of audio inlets.
TTUInt64 mSampleStamp
The current time in samples, as determined from the pulling of this object.
TTErr resetAudio()
Clear the list of source objects from which this object will try to pull audio.
TTAudioArray mOutputSignals
The results of processing audio with our object, buffered for objects requesting it.
virtual TTErr process(TTAudioSignalPtr &returnedSignal, TTUInt64 sampleStamp, TTUInt16 forOutletNumber=0)
This method is required to be implemented by all objects except for those existing solely as a destin...
Something went wrong, but what exactly is not known. Typically used for context-specific problems...
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
TTInt32 mID
An index number that uniquely identifies this instance.
The TTAudioGraphObjectBase wraps a TTDSP object such that it is possible to build a dynamic graph of ...
[doxygenAppendixC_bitmaskExample]
#define addAttributeWithSetter(name, type)
A convenience macro to be used by subclasses for registering attributes with a custom setter...
32-bit unsigned integer, range is 0 through 4,294,967,295.
TTAudioGraphInletVector mAudioInlets
The inlets through which we pull audio from sources.
TTObject mKernel
The actual TT object doing the processing.
TTGraphOutletVector mOutlets
The inlets through which we pull audio from sources.
TTErr drop(TTGraphObjectBasePtr anObject, TTUInt16 fromOutletNumber=0, TTUInt16 toInletNumber=0)
Drop a source from the list of objects from which to request audio.
TTErr lock()
Lock the object in order to ensure thread-safe processing.
TTErr setSampleRate(const TTUInt32 &newSampleRate)
Set the object's sample rate.
[doxygenAppendixC_copyExample]
TTAudioGraphProcessStatus mStatus
Used to enable correct processing of feedback loops, multiple destinations, etc.
static TTMutexPtr sSharedMutex
A critical region shared by all TTAudioGraphObjectBases to prevent changes to the graph while process...
TTUInt32 mAudioFlags
A bitmask of values defined in TTAudioGraphFlags.