24 TTPtr outletSmartSignal;
26 TTPtr outletSampleRate;
27 TTPtr outletVectorSize;
28 TTPtr outletNumChannels;
29 long audioSourceOutlet;
35 typedef Info* InfoPtr;
39 InfoPtr InfoNew(t_symbol* msg,
long argc, t_atom* argv);
40 void InfoFree(InfoPtr
self);
41 void InfoAssist(InfoPtr
self,
void* b,
long msg,
long arg,
char* dst);
42 void InfoBang(InfoPtr
self);
43 void InfoQfn(InfoPtr
self);
48 static t_class* sInfoClass;
59 common_symbols_init();
61 c = class_new(
"j.info=", (method)InfoNew, (method)InfoFree,
sizeof(Info), (method)0L, A_GIMME, 0);
63 class_addmethod(c, (method)InfoBang,
"bang", 0);
65 class_addmethod(c, (method)InfoConnect,
"audio.connect", A_OBJ, A_LONG, 0);
69 class_addmethod(c, (method)InfoAssist,
"assist", A_CANT, 0);
70 class_addmethod(c, (method)object_obex_dumpout,
"dumpout", A_CANT, 0);
72 class_register(_sym_box, c);
81 InfoPtr InfoNew(t_symbol* msg,
long argc, t_atom* argv)
87 self = InfoPtr(object_alloc(sInfoClass));
89 object_obex_store((
TTPtr)
self, _sym_dumpout, (t_object*)outlet_new(
self, NULL));
90 self->outletNumChannels = outlet_new((t_pxobject*)
self, 0);
91 self->outletVectorSize = outlet_new((t_pxobject*)
self, 0);
92 self->outletSampleRate = outlet_new((t_pxobject*)
self, 0);
93 self->outletSmartSignal = outlet_new((t_pxobject*)
self,
"audio.connect");
95 self->qelem = qelem_new(
self, (method)InfoQfn);
101 if (!self->audioGraphObject->getUnitGenerator().valid()) {
102 object_error(SELF,
"cannot load Jamoma DSP object");
106 attr_args_process(
self, argc, argv);
112 void InfoFree(InfoPtr
self)
115 qelem_free(self->qelem);
123 void InfoAssist(InfoPtr
self,
void* b,
long msg,
long arg,
char* dst)
126 strcpy(dst,
"multichannel audio connection and control messages");
129 strcpy(dst,
"multichannel audio connection, passing the input thru to the output");
131 strcpy(dst,
"sample rate of the input signal");
133 strcpy(dst,
"vector size of the input signal");
135 strcpy(dst,
"number of channels in the input signal");
137 strcpy(dst,
"dumpout");
142 void InfoBang(InfoPtr
self)
144 qelem_set(self->qelem);
148 void InfoQfn(InfoPtr
self)
150 outlet_int(self->outletNumChannels, self->audioGraphObject->getOutputNumChannels(self->audioSourceOutlet));
151 outlet_int(self->outletVectorSize, self->audioGraphObject->getOutputVectorSize(self->audioSourceOutlet));
152 outlet_int(self->outletSampleRate, self->audioGraphObject->getOutputSampleRate(self->audioSourceOutlet));
160 self->audioSourceOutlet = sourceOutletNumber;
TTErr TTObjectBaseRelease(TTObjectBasePtr *anObject)
DEPRECATED.
int C74_EXPORT main(void)
Set up this class as a Max external the first time an object of this kind is instantiated.
TTErr MaxAudioGraphSetup(t_object *x)
Set up fresh connections from this object to nodes that are connected downstream. ...
TTErr MaxAudioGraphReset(t_object *x, long vectorSize)
Clear the list of source objects from which this object will try to pull audio.
Base class for all first-class Jamoma objects.
TTErr MaxAudioGraphConnect(t_object *x, TTAudioGraphObjectBasePtr audioSourceObject, TTUInt16 sourceOutletNumber)
Method called when an upstream node is connected to this node.
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
void * TTPtr
A generic pointer.
TTErr TTObjectBaseInstantiate(const TTSymbol className, TTObjectBasePtr *returnedObjectPtr, const TTValue arguments)
DEPRECATED.
A thin wrapper of Jamoma AudioGraph for use in the Cycling '74 Max/MSP environment.
TTErr MaxAudioGraphObject(t_object *x, TTAudioGraphObjectBasePtr *returnedAudioGraphObject)
Returns a pointer to the Jamoma Audio Graph object that is wrapped by this Max object.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
The TTAudioGraphObjectBase wraps a TTDSP object such that it is possible to build a dynamic graph of ...
TTErr MaxAudioGraphDrop(t_object *x, long inletNumber, t_object *sourceMaxObject, long sourceOutletNumber)
Method called when a connection from an upstream node is dropped.
void resize(size_type n)
Change the number of elements.
[doxygenAppendixC_copyExample]