Jamoma API  0.6.0.a19
MaxAudioGraph.cpp File Reference

A thin wrapper of Jamoma AudioGraph for use in the Cycling '74 Max/MSP environment. More...

#include "maxAudioGraph.h"
#include "ext_hashtab.h"
+ Include dependency graph for MaxAudioGraph.cpp:

Go to the source code of this file.

Typedefs

typedef WrappedInstance * WrappedInstancePtr
 Pointer to a wrapped instance of our object.
 

Functions

TTErr MaxAudioGraphReset (t_object *x, long vectorSize)
 Clear the list of source objects from which this object will try to pull audio. More...
 
TTErr MaxAudioGraphSetup (t_object *x)
 Set up fresh connections from this object to nodes that are connected downstream. More...
 
TTErr MaxAudioGraphConnect (t_object *x, TTAudioGraphObjectBasePtr audioSourceObject, TTUInt16 sourceOutletNumber)
 Method called when an upstream node is connected to this node. More...
 
TTErr MaxAudioGraphDrop (t_object *x, long inletNumber, t_object *sourceMaxObject, long sourceOutletNumber)
 Method called when a connection from an upstream node is dropped. More...
 
TTErr MaxAudioGraphObject (t_object *x, TTAudioGraphObjectBasePtr *returnedAudioGraphObject)
 Returns a pointer to the Jamoma Audio Graph object that is wrapped by this Max object. More...
 
TTErr wrapAsMaxAudioGraph (TTSymbol ttClassName, char *maxClassName, MaxAudioGraphWrappedClassPtr *c)
 Wrap an AudioGraph class as a Max class. More...
 
TTErr wrapAsMaxAudioGraph (TTSymbol ttClassName, char *maxClassName, MaxAudioGraphWrappedClassPtr *c, MaxAudioGraphWrappedClassOptionsPtr options)
 This version can be passed a method that is called to make sure it is okay to instantiate the class. More...
 
TTErr wrapAsMaxAudioGraph (TTSymbol ttClassName, char *maxClassName, MaxAudioGraphWrappedClassPtr *c, TTValidityCheckFunction validityCheck)
 This version can be passed a method that is called to make sure it is okay to instantiate the class. More...
 
TTErr wrapAsMaxAudioGraph (TTSymbol ttClassName, char *maxClassName, MaxAudioGraphWrappedClassPtr *c, TTValidityCheckFunction validityCheck, MaxAudioGraphWrappedClassOptionsPtr options)
 This version can be passed a method that is called to make sure it is okay to instantiate the class. More...
 
TTErr wrapAsMaxAudioGraph (TTSymbol ttClassName, char *maxClassName, MaxAudioGraphWrappedClassPtr *c, TTValidityCheckFunction validityCheck, TTPtr validityCheckArgument)
 This version can be passed a method that is called to make sure it is okay to instantiate the class. More...
 
TTErr wrapAsMaxAudioGraph (TTSymbol ttClassName, char *maxClassName, MaxAudioGraphWrappedClassPtr *c, TTValidityCheckFunction validityCheck, TTPtr validityCheckArgument, MaxAudioGraphWrappedClassOptionsPtr options)
 This version can be passed a method that is called to make sure it is okay to instantiate the class. More...
 

Detailed Description

A thin wrapper of Jamoma AudioGraph for use in the Cycling '74 Max/MSP environment.

Includes an automated class wrapper to make Jamoma DSP object's available as objects for Max/MSP.

Authors
Timothy Place, Trond Lossius

Definition in file MaxAudioGraph.cpp.

Function Documentation

TTErr MaxAudioGraphConnect ( t_object *  x,
TTAudioGraphObjectBasePtr  audioSourceObject,
TTUInt16  sourceOutletNumber 
)

Method called when an upstream node is connected to this node.

Parameters
xThis Max object.
audioSourceObjectThe upstream object/node that is now connecting.
sourceOutletNumberWhat outlet of the upstream object that is now connecting to this object.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 160 of file MaxAudioGraph.cpp.

Referenced by wrapAsMaxAudioGraph().

TTErr MaxAudioGraphDrop ( t_object *  self,
long  inletNumber,
t_object *  sourceMaxObject,
long  sourceOutletNumber 
)

Method called when a connection from an upstream node is dropped.

Parameters
selfThis Max object.
inletNumberThe inlet of this object who is now loosing a connection.
sourceMaxObjectThe upstream (source) object who is now disconnecting.
sourceOutletNumberThe outlet of the source object that is now being disconnected.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 170 of file MaxAudioGraph.cpp.

Referenced by main(), and wrapAsMaxAudioGraph().

TTErr MaxAudioGraphObject ( t_object *  self,
TTAudioGraphObjectBasePtr returnedAudioGraphObject 
)

Returns a pointer to the Jamoma Audio Graph object that is wrapped by this Max object.

Parameters
selfThis Max object.
returnedAudioGraphObjectPointer to the wrapped Jamoma Audio Graph object.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 183 of file MaxAudioGraph.cpp.

Referenced by main(), and wrapAsMaxAudioGraph().

TTErr MaxAudioGraphReset ( t_object *  x,
long  vectorSize 
)

Clear the list of source objects from which this object will try to pull audio.

Parameters
xThis Max object.
vectorSizeInitial vector size, might be overruled by subsequent process calls.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 136 of file MaxAudioGraph.cpp.

Referenced by main(), and wrapAsMaxAudioGraph().

TTErr MaxAudioGraphSetup ( t_object *  self)

Set up fresh connections from this object to nodes that are connected downstream.

Parameters
selfThis Max object.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 143 of file MaxAudioGraph.cpp.

Referenced by main(), and wrapAsMaxAudioGraph().

TTErr wrapAsMaxAudioGraph ( TTSymbol  ttClassName,
char *  maxClassName,
MaxAudioGraphWrappedClassPtr c 
)

Wrap an AudioGraph class as a Max class.

Parameters
ttClassNameName of the Jamoma Audio Graph class that will be wrapped.
maxClassNameName of the resulting Max external
cAddress to a variable to hold the wrapped Max class upon return.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 351 of file MaxAudioGraph.cpp.

Referenced by main(), and wrapAsMaxAudioGraph().

TTErr wrapAsMaxAudioGraph ( TTSymbol  ttblueClassName,
char *  maxClassName,
MaxAudioGraphWrappedClassPtr c,
MaxAudioGraphWrappedClassOptionsPtr  options 
)

This version can be passed a method that is called to make sure it is okay to instantiate the class.

This is useful, for example, if you need to have copy-protection for your external.

Parameters
ttClassNameName of the Jamoma Audio Graph class that will be wrapped.
maxClassNameName of the resulting Max external.
cAddress to a variable to hold the wrapped Max class upon return.
optionsPointer to additional options that will be forwarded to the wrapped object when instantiated.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 356 of file MaxAudioGraph.cpp.

TTErr wrapAsMaxAudioGraph ( TTSymbol  ttClassName,
char *  maxClassName,
MaxAudioGraphWrappedClassPtr c,
TTValidityCheckFunction  validityCheck 
)

This version can be passed a method that is called to make sure it is okay to instantiate the class.

This is useful, for example, if you need to have copy-protection for your external.

Parameters
ttClassNameName of the Jamoma Audio Graph class that will be wrapped.
maxClassNameName of the resulting Max external.
cAddress to a variable to hold the wrapped Max class upon return.
validityCheckPointer to a function that will return a true or false regarding whether or not it is okay to instantiate the object.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 479 of file MaxAudioGraph.cpp.

TTErr wrapAsMaxAudioGraph ( TTSymbol  ttblueClassName,
char *  maxClassName,
MaxAudioGraphWrappedClassPtr c,
TTValidityCheckFunction  validityCheck,
MaxAudioGraphWrappedClassOptionsPtr  options 
)

This version can be passed a method that is called to make sure it is okay to instantiate the class.

This is useful, for example, if you need to have copy-protection for your external.

Parameters
ttClassNameName of the Jamoma Audio Graph class that will be wrapped.
maxClassNameName of the resulting Max external.
cAddress to a variable to hold the wrapped Max class upon return.
validityCheckPointer to a function that will return a true or false regarding whether or not it is okay to instantiate the object.
optionsPointer to additional options that will be forwarded to the wrapped object when instantiated.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 490 of file MaxAudioGraph.cpp.

TTErr wrapAsMaxAudioGraph ( TTSymbol  ttClassName,
char *  maxClassName,
MaxAudioGraphWrappedClassPtr c,
TTValidityCheckFunction  validityCheck,
TTPtr  validityCheckArgument 
)

This version can be passed a method that is called to make sure it is okay to instantiate the class.

This is useful, for example, if you need to have copy-protection for your external.

Parameters
ttClassNameName of the Jamoma Audio Graph class that will be wrapped.
maxClassNameName of the resulting Max external.
cAddress to a variable to hold the wrapped Max class upon return.
validityCheckPointer to a function that will return a true or false regarding whether or not it is okay to instantiate the object.
validityCheckArgumentAn argument that will be passed to the validity check function, or NULL if you don't wish to pass an argument.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 502 of file MaxAudioGraph.cpp.

TTErr wrapAsMaxAudioGraph ( TTSymbol  ttblueClassName,
char *  maxClassName,
MaxAudioGraphWrappedClassPtr c,
TTValidityCheckFunction  validityCheck,
TTPtr  validityCheckArgument,
MaxAudioGraphWrappedClassOptionsPtr  options 
)

This version can be passed a method that is called to make sure it is okay to instantiate the class.

This is useful, for example, if you need to have copy-protection for your external.

Parameters
ttClassNameName of the Jamoma Audio Graph class that will be wrapped.
maxClassNameName of the resulting Max external.
cAddress to a variable to hold the wrapped Max class upon return.
validityCheckPointer to a function that will return a true or false regarding whether or not it is okay to instantiate the object.
validityCheckArgumentAn argument that will be passed to the validity check function, or NULL if you don't wish to pass an argument.
optionsPointer to additional options that will be forwarded to the wrapped object when instantiated.

Definition at line 513 of file MaxAudioGraph.cpp.