22 void WrapTTNodeInfoClass(WrappedClassPtr c);
23 void WrappedNodeInfoClass_new(
TTPtr self,
long argc, t_atom* argv);
24 void WrappedNodeInfoClass_free(
TTPtr self);
46 ModularSpec *spec =
new ModularSpec;
47 spec->_wrap = &WrapTTNodeInfoClass;
48 spec->_new = &WrappedNodeInfoClass_new;
56 void WrapTTNodeInfoClass(WrappedClassPtr c)
58 class_addmethod(c->maxClass, (method)
node_assist,
"assist", A_CANT, 0L);
62 void WrappedNodeInfoClass_new(
TTPtr self,
long argc, t_atom* argv)
65 t_symbol *relativeAddress;
66 long attrstart = attr_args_offset(argc, argv);
69 relativeAddress = _sym_nothing;
70 if (attrstart && argv)
71 if (atom_gettype(argv) == A_SYM)
72 relativeAddress = atom_getsym(argv);
74 if (relativeAddress == _sym_nothing) {
75 object_error((t_object*)x,
"needs a name as first argument");
80 if (relativeAddress == gensym(
"data/mute") ||
81 relativeAddress == gensym(
"data/bypass") ||
82 relativeAddress == gensym(
"data/freeze") ||
83 relativeAddress == gensym(
"data/preview") ||
84 relativeAddress == gensym(
"audio/mute") ||
85 relativeAddress == gensym(
"audio/bypass") ||
86 relativeAddress == gensym(
"audio/mix") ||
87 relativeAddress == gensym(
"audio/gain") ||
88 relativeAddress == gensym(
"model") ||
89 relativeAddress == gensym(
"preset") ) {
91 object_error((t_object*)x,
"%s address is reserved by j.model", relativeAddress->s_name);
98 attr_args_process(x, argc, argv);
103 defer_low((t_object*)x, (method)
node_subscribe, relativeAddress, argc, argv);
119 object_error((t_object*)x,
"can't register because %s is not a relative address", relativeAddress->s_name);
126 strcpy(dst,
"input");
130 strcpy(dst,
"dumpout");
TTObject subscriberObject
The instance of a TTSubscriber object used to register the wrapped object in the tree structure...
TTErr wrapTTModularClassAsMaxClass(TTSymbol &ttblueClassName, const char *maxClassName, WrappedClassPtr *c, ModularSpec *specificities)
Wrap a Jamoma class as a Max class.
We build a directory of TTNodes, and you can request a pointer for any TTNode, or add an observer to ...
The TTAddress class is used to represent a string and efficiently pass and compare that string...
this flag means that an address have no leading slash
void node_assist(TTPtr self, TTPtr b, long msg, long arg, char *dst)
Provide assistance on input and output while patching.
void * TTPtr
A generic pointer.
TTObject wrappedObject
The instance of the Jamoma object we are wrapping.
Data Structure for this object.
TTAddressType getType()
Get the type.
Wraps Jamoma Core classes as objects for Max/MSP.
void node_subscribe(TTPtr self, t_symbol *relativeAddress, long argc, t_atom *argv)
Subscribe the j.node into the directory.
int C74_EXPORT main(void)
Set up this class as a Max external the first time an object of this kind is instantiated.
WrappedModularInstance * WrappedModularInstancePtr
Pointer to a wrapped instance of our object.