23 typedef struct extra {
28 #define EXTRA ((t_extra*)x->extra)
70 void out_perform64(
TTPtr self, t_object *dsp64,
double **ins,
long numins,
double **outs,
long numouts,
long sampleframes,
long flags,
void *userparam);
73 void out_dsp64(
TTPtr self, t_object *dsp64,
short *count,
double samplerate,
long maxvectorsize,
long flags);
82 void out_reset(
TTPtr self);
87 void out_setup(
TTPtr self);
127 void out_list(
TTPtr self, t_symbol* msg,
long argc, t_atom* argv);
154 ModularSpec *spec =
new ModularSpec;
179 class_addmethod(c->maxClass, (method)
out_assist,
"assist", A_CANT, 0L);
182 class_addmethod(c->maxClass, (method)out_dsp64,
"dsp64", A_CANT, 0);
186 class_addmethod(c->maxClass, (method)out_reset,
"audio.reset", A_CANT, 0);
187 class_addmethod(c->maxClass, (method)out_setup,
"audio.setup", A_CANT, 0);
188 class_addmethod(c->maxClass, (method)out_connect,
"audio.connect", A_OBJ, A_LONG, 0);
193 class_addmethod(c->maxClass, (method)
out_return_signal,
"return_signal", A_CANT, 0);
195 class_addmethod(c->maxClass, (method)
out_bang,
"bang", 0L);
196 class_addmethod(c->maxClass, (method)
out_int,
"int", A_LONG, 0L);
197 class_addmethod(c->maxClass, (method)
out_float,
"float", A_FLOAT, 0L);
198 class_addmethod(c->maxClass, (method)
out_list,
"list", A_GIMME, 0L);
207 #pragma mark Object life
212 long attrstart = attr_args_offset(argc, argv);
220 if (attrstart && argv) {
226 EXTRA->instance =
TTSymbol(sInstance.data());
229 EXTRA->instance = kTTSymEmpty;
237 dsp_setup((t_pxobject *)x, 1);
238 x->
obj.z_misc = Z_NO_INPLACE | Z_PUT_FIRST;
240 outlet_new((t_pxobject *)x,
"signal");
247 x->
outlets[0] = outlet_new(x, 0L);
254 x->
outlets[0] = outlet_new(x, 0L);
259 attr_args_process(x, argc, argv);
264 defer_low((t_object*)x, (method)
out_subscribe, NULL, 0, NULL);
272 dsp_free((t_pxobject *)x);
279 #pragma mark NodeLib association
290 TTAddress returnedAddress, parentAddress;
291 TTString formatDescription, sInstance;
292 t_object *modelOrView = NULL;
330 object_method_typed(modelOrView, gensym(
"output_created"), 0, NULL, NULL);
335 #pragma mark Methods bound to input/inlets
341 strcpy(dst,
"(signal) connect to the algorithm");
344 strcpy(dst,
"(signal) output of the model");
346 strcpy(dst,
"dumpout");
352 #pragma mark Methods relating to audio processing
356 void out_perform64(
TTPtr self, t_object *dsp64,
double **ins,
long numins,
double **outs,
long numouts,
long sampleframes,
long flags,
void *userparam)
362 anOutput->process(ins[0], outs[0], sampleframes);
367 void out_dsp64(
TTPtr self, t_object *dsp64,
short *count,
double samplerate,
long maxvectorsize,
long flags)
373 anOutput->setupAudioSignals(maxvectorsize, samplerate);
374 object_method(dsp64, gensym(
"dsp_add64"), x, out_perform64, 0, NULL);
381 #pragma mark Methods relating to audiograph processing
383 void out_reset(
TTPtr self)
398 void out_setup(
TTPtr self)
409 atom_setobj(a+0, (t_object*)anOutput->mSignalOut.instance());
410 atom_setlong(a+1, 0);
411 outlet_anything(x->
outlets[signal_out], gensym(
"audio.connect"), 2, a);
433 #pragma mark Methods relating to any data processing
444 atom_setlong(&a, value);
452 atom_setfloat(&a, value);
475 if (msg == _sym_nothing)
476 outlet_atoms(x->
outlets[signal_out], argc, argv);
478 outlet_anything(x->
outlets[signal_out], msg, argc, argv);
void WrappedOutputClass_anything(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
anything else handler for j.out
TTAddress appendAddress(const TTAddress &toAppend)
Return a new TTAddress with the appended part.
int C74_EXPORT main(void)
Set up this class as a Max external the first time an object of this kind is instantiated.
TTObject subscriberObject
The instance of a TTSubscriber object used to register the wrapped object in the tree structure...
TTSymbol & getInstance()
Get the instance part.
TTHandle outlets
an array of outlet
TTErr wrapTTModularClassAsMaxClass(TTSymbol &ttblueClassName, const char *maxClassName, WrappedClassPtr *c, ModularSpec *specificities)
Wrap a Jamoma class as a Max class.
void out_int(TTPtr self, long value)
int handler for j.out
TTString toString(TTBoolean quotes=YES) const
Return the content as a single string with spaces between elements.
void out_subscribe(TTPtr self)
Associate j.out(~) with NodeLib.
We build a directory of TTNodes, and you can request a pointer for any TTNode, or add an observer to ...
void WrappedOutputClass_free(TTPtr self)
Wrapper for the j.out deconstructor class, called when an instance is destroyed.
The TTAddress class is used to represent a string and efficiently pass and compare that string...
void * extra
used to keep very specific things
TTAddress appendInstance(const TTSymbol anInstance)
Return a new TTAddress with a instance part.
t_object * patcherPtr
the patcher in which the external is (ignoring subpatcher)
void out_assist(TTPtr self, TTPtr b, long msg, long arg, char *dst)
Assistance Method.
void * TTPtr
A generic pointer.
void WrappedOutputClass_new(TTPtr self, long argc, t_atom *argv)
Wrapper for the j.out constructor class, called when an instance is created.
t_object obj
Max control object header.
TTErr set(const TTSymbol aName, T aValue)
Set an attribute value for an object.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
void WrapTTOutputClass(WrappedClassPtr c)
Wrap the j.out class as a Max object.
TTObject wrappedObject
The instance of the Jamoma object we are wrapping.
void out_list(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
list handler for j.out
void out_bang(TTPtr self)
bang handler for j.out
TTErr getAddress(TTAddress &returnedAddress, TTAddress from=kTTAdrsEmpty)
Get the address of the node.
Data Structure for this object.
The TTAudioGraphObjectBase wraps a TTDSP object such that it is possible to build a dynamic graph of ...
Wraps Jamoma Core classes as objects for Max/MSP.
TTObjectBase * instance() const
Return a direct pointer to the internal instance.
The TTString class is used to represent a string.
An audio output component for Jamoma models.
WrappedModularInstance * WrappedModularInstancePtr
Pointer to a wrapped instance of our object.
[doxygenAppendixC_copyExample]
TTNodePtr getParent()
Get a pointer to the parent node of the node.
void out_return_signal(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
Method used to pass message to the module outlet.
void out_float(TTPtr self, double value)
float handler for j.out