22 void WrapTTNodeInfoClass(WrappedClassPtr c);
23 void WrappedNodeInfoClass_new(
TTPtr self,
long argc, t_atom* argv);
24 void WrappedNodeInfoClass_free(
TTPtr self);
44 extern "C" void JAMOMA_EXPORT_MAXOBJ setup_j0x2enode(
void)
46 ModularSpec *spec =
new ModularSpec;
47 spec->_wrap = &WrapTTNodeInfoClass;
48 spec->_new = &WrappedNodeInfoClass_new;
56 void WrapTTNodeInfoClass(WrappedClassPtr c)
58 eclass_addmethod(c->pdClass, (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 pd_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 pd_error((t_object*)x,
"%s address is reserved by j.model", relativeAddress->s_name);
98 attr_args_process(x, argc, argv);
118 pd_error((t_object*)x,
"error when registering %s", relativeAddress->s_name);
121 pd_error((t_object*)x,
"can't register because %s is not a relative address", relativeAddress->s_name);
128 strcpy(dst,
"input");
132 strcpy(dst,
"dumpout");
TTObject subscriberObject
The instance of a TTSubscriber object used to register the wrapped object in the tree structure...
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_subscribe(TTPtr self, t_symbol *relativeAddress, long argc, t_atom *argv)
Subscribe the j.node into the directory.
void * TTPtr
A generic pointer.
void node_assist(TTPtr self, TTPtr b, long msg, long arg, char *dst)
Provide assistance on input and output while patching.
TTObject wrappedObject
The instance of the Jamoma object we are wrapping.
Wraps Jamoma Core classes as objects for PureData.
Data Structure for this object.
TTAddressType getType()
Get the type.
WrappedModularInstance * WrappedModularInstancePtr
Pointer to a wrapped instance of our object.
TTErr wrapTTModularClassAsPdClass(TTSymbol &ttblueClassName, const char *pdClassName, WrappedClassPtr *c, ModularSpec *specificities)
Wrap a Jamoma class as a Pd class.