Jamoma API  0.6.0.a19
MaxAudioGraph.h File Reference

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

#include "ext.h"
#include "ext_obex.h"
#include "ext_strings.h"
#include "commonsyms.h"
#include "z_dsp.h"
#include "jpatcher_api.h"
#include "TTAudioGraphAPI.h"
#include "maxGraph.h"
+ Include dependency graph for MaxAudioGraph.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MaxAudioGraphWrappedClass
 Type definition for an AudioGraph class wrapped as a Max external. More...
 
class  MaxAudioGraphWrappedClassOptions
 A class representing the options of a MaxAudioGraphWrappedClass. More...
 

Typedefs

typedef TTErr(* TTValidityCheckFunction) (const TTPtr data)
 A type that can be used to store a pointer to a validity checking function.
 
typedef MaxAudioGraphWrappedClassMaxAudioGraphWrappedClassPtr
 A pointer to a MaxAudioGraphWrappedClass.
 
typedef MaxAudioGraphWrappedClassOptionsMaxAudioGraphWrappedClassOptionsPtr
 A pointer to MaxAudioGraphWrappedClassOptions.
 

Functions

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, 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, 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 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. More...
 
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. More...
 
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. More...
 
TTErr MaxAudioGraphDrop (t_object *self, long inletNumber, t_object *sourceMaxObject, long sourceOutletNumber)
 Method called when a connection from an upstream node is dropped. More...
 
TTErr MaxAudioGraphObject (t_object *self, TTAudioGraphObjectBasePtr *returnedAudioGraphObject)
 Returns a pointer to the Jamoma Audio Graph object that is wrapped by this Max object. More...
 
TTErr MaxAudioGraphConnect (t_object *x, TTAudioGraphObjectBasePtr audioSourceObject, TTUInt16 sourceOutletNumber)
 Method called when an upstream node is connected to this node. More...
 
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 *self)
 Set up fresh connections from this object to nodes that are connected downstream. 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.h.

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.

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.

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.

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.

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.

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.

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  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,
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  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  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.