Max API  8.0.2
Max Wrapper Module

Functions

void max_jit_attr_set (void *x, t_symbol *s, short ac, t_atom *av)
 Sets attribute value. More...
 
t_jit_err max_jit_attr_get (void *x, t_symbol *s, long *ac, t_atom **av)
 Retrieves attribute value. More...
 
void max_jit_attr_getdump (void *x, t_symbol *s, short argc, t_atom *argv)
 Retrieves attribute value and sends out dump outlet. More...
 
long max_jit_attr_args_offset (short ac, t_atom *av)
 Determines argument offset to first attribute argument. More...
 
void max_jit_attr_args (void *x, short ac, t_atom *av)
 Processes attribute arguments. More...
 
void max_jit_classex_standard_wrap (void *mclass, void *jclass, long flags)
 Adds standard Jitter methods, as well as public methods and attributes of the specified Jitter class. More...
 
void max_addmethod_defer (method m, char *s)
 Adds method to Max class that calls defer rather than the method directly. More...
 
void max_addmethod_defer_low (method m, char *s)
 Adds method to Max class that calls defer_low rather than the method directly. More...
 
void max_addmethod_usurp (method m, char *s)
 Adds method to Max class that uses the usurp mechanism to execute method at low priority without backlog. More...
 
void max_addmethod_usurp_low (method m, char *s)
 Adds method to Max class that uses the usurp mechanism to execute method at low priority without backlog. More...
 
void * max_jit_classex_setup (long oboffset)
 Allocates and initializes special t_max_jit_classex data, used by the Max wrapper class. More...
 
t_jit_err max_jit_classex_addattr (void *x, void *attr)
 Adds an attribute to the Max wrapper class. More...
 
void * max_jit_obex_new (void *mc, t_symbol *classname)
 Allocates an initializes a new Max wrapper object instance. More...
 
void max_jit_obex_free (void *x)
 Frees additional resources for the Max wrapper object instance. More...
 
t_jit_err max_jit_obex_attr_set (void *x, t_symbol *s, long ac, t_atom *av)
 Sets an attribute of the Max wrapper or the wrapped Jitter object. More...
 
t_jit_err max_jit_obex_attr_get (void *x, t_symbol *s, long *ac, t_atom **av)
 Retrienves an attribute of the Max wrapper or the wrapped Jitter object. More...
 
void * max_jit_obex_jitob_get (void *x)
 Retrieves the wrapped Jitter object from a Max wrapper object. More...
 
void max_jit_obex_jitob_set (void *x, void *jitob)
 Sets the wrapped Jitter object for a Max wrapper object. More...
 
long max_jit_obex_inletnumber_get (void *x)
 Retrieves the current inlet number used by inlet proxies. More...
 
void max_jit_obex_inletnumber_set (void *x, long inletnumber)
 Sets the current inlet number used by inlet proxies. More...
 
t_jit_err max_jit_obex_proxy_new (void *x, long c)
 Creates a new proxy inlet. More...
 
void max_jit_obex_dumpout_set (void *x, void *outlet)
 Sets the Max wrapper object's dump outlet's outlet pointer. More...
 
void * max_jit_obex_dumpout_get (void *x)
 Retrieves the Max wrapper object's dump outlet's outlet pointer. More...
 
void max_jit_obex_dumpout (void *x, t_symbol *s, short argc, t_atom *argv)
 Sends a message and arguments out the dump outlet. More...
 
void * max_jit_obex_adornment_get (void *x, t_symbol *classname)
 Retrieves Max wrapper object adornment specified by class name. More...
 
void max_jit_obex_gimmeback (void *x, t_symbol *s, long ac, t_atom *av)
 Calls gimmeback methods and frees any return value. More...
 
void max_jit_obex_gimmeback_dumpout (void *x, t_symbol *s, long ac, t_atom *av)
 Calls gimmeback methods and outputs any return value through the Max wrapper class' dump outlet. More...
 

Detailed Description

Function Documentation

◆ max_addmethod_defer()

void max_addmethod_defer ( method  m,
char *  s 
)

Adds method to Max class that calls defer rather than the method directly.

To prevent sequencing problems which arize through the use of defer, rather than defer_low, you should instead use the max_addmethod_defer_low function.

Parameters
mmethod (function pointer)
smethod name

References A_CANT, A_GIMME, and addmess().

Referenced by max_jit_classex_addattr().

◆ max_addmethod_defer_low()

void max_addmethod_defer_low ( method  m,
char *  s 
)

Adds method to Max class that calls defer_low rather than the method directly.

Parameters
mmethod (function pointer)
smethod name

References A_CANT, A_GIMME, and addmess().

Referenced by max_jit_classex_addattr(), max_jit_classex_mop_wrap(), and max_jit_classex_standard_wrap().

◆ max_addmethod_usurp()

void max_addmethod_usurp ( method  m,
char *  s 
)

Adds method to Max class that uses the usurp mechanism to execute method at low priority without backlog.

Equivalent to max_addmethod_usurp_low function.

Parameters
mmethod (function pointer)
smethod name

References A_CANT, A_GIMME, and addmess().

Referenced by max_jit_classex_addattr().

◆ max_addmethod_usurp_low()

void max_addmethod_usurp_low ( method  m,
char *  s 
)

Adds method to Max class that uses the usurp mechanism to execute method at low priority without backlog.

Parameters
mmethod (function pointer)
smethod name

References A_CANT, A_GIMME, and addmess().

Referenced by max_jit_classex_addattr(), and max_jit_classex_mop_wrap().

◆ max_jit_attr_args()

void max_jit_attr_args ( void *  x,
short  ac,
t_atom av 
)

Processes attribute arguments.

Parameters
xMax wrapper object pointer
acargument count
avargument vector

References _jit_sym_nothing, A_SYM, gensym(), jit_object_attr_usercanset(), jit_object_method_argsafe_get(), max_jit_obex_jitob_get(), object_method_typed(), and t_symbol::s_name.

◆ max_jit_attr_args_offset()

long max_jit_attr_args_offset ( short  ac,
t_atom av 
)

Determines argument offset to first attribute argument.

Parameters
acargument count
avargument vector
Returns
argument offset

References attr_args_offset().

Referenced by max_jit_mop_matrix_args().

◆ max_jit_attr_get()

t_jit_err max_jit_attr_get ( void *  x,
t_symbol s,
long *  ac,
t_atom **  av 
)

Retrieves attribute value.

Parameters
xMax wrapper object pointer
sattribute name
acpointer atom count
avpointer atom vector
Returns
t_jit_err error code

References gensym(), and max_jit_obex_jitob_get().

Referenced by max_jit_attr_getdump().

◆ max_jit_attr_getdump()

void max_jit_attr_getdump ( void *  x,
t_symbol s,
short  argc,
t_atom argv 
)

Retrieves attribute value and sends out dump outlet.

Parameters
xMax wrapper object pointer
sattribute name
argcargument count (ignored)
argvargument vector (ignored)

References freebytes(), gensym(), jit_error_code(), max_jit_attr_get(), and zgetfn().

◆ max_jit_attr_set()

void max_jit_attr_set ( void *  x,
t_symbol s,
short  ac,
t_atom av 
)

Sets attribute value.

Parameters
xMax wrapper object pointer
sattribute name
acatom count
avatom vector

References max_jit_obex_jitob_get(), object_attr_get(), and object_notify().

◆ max_jit_classex_addattr()

long max_jit_classex_addattr ( void *  x,
void *  attr 
)

Adds an attribute to the Max wrapper class.

Parameters
xpointer to t_max_jit_classex data (opaque)
attrattribute object pointer
Returns
t_jit_err error code

Referenced by max_jit_classex_mop_wrap().

◆ max_jit_classex_setup()

void * max_jit_classex_setup ( long  oboffset)

Allocates and initializes special t_max_jit_classex data, used by the Max wrapper class.

Parameters
oboffsetobject struct byte offset to obex pointer
Returns
pointer to t_max_jit_classex data (opaque)

◆ max_jit_classex_standard_wrap()

void max_jit_classex_standard_wrap ( void *  mclass,
void *  jclass,
long  flags 
)

Adds standard Jitter methods, as well as public methods and attributes of the specified Jitter class.

This includes the following public methods: getattributes, getstate, summary, importattrs, exportattrs; and the following private methods: dumpout, quickref, attr_getnames, attr_get, attr_gettarget, and attrindex.

Parameters
mclassMax wrapper class pointer
jclassjitter class pointer
flagsreserved for future use (currently ignored)

◆ max_jit_obex_adornment_get()

void* max_jit_obex_adornment_get ( void *  x,
t_symbol classname 
)

Retrieves Max wrapper object adornment specified by class name.

Typcially used for accessing the jit_mop adornment for MOP Max wrapper objects.

Parameters
xMax wrapper object pointer
classnameadornment classname
Returns
adornment pointer

References _jit_sym_findfirst, and jit_object_classname_compare().

Referenced by max_jit_mop_adapt_matrix_all(), max_jit_mop_assist(), max_jit_mop_clear(), max_jit_mop_free(), max_jit_mop_get_io_by_name(), max_jit_mop_getinput(), max_jit_mop_getoutput(), max_jit_mop_getoutputmode(), max_jit_mop_inputs(), max_jit_mop_jit_matrix(), max_jit_mop_matrix_args(), max_jit_mop_matrixout_new(), max_jit_mop_notify(), max_jit_mop_outputmatrix(), max_jit_mop_outputs(), max_jit_mop_variable_addinputs(), and max_jit_mop_variable_addoutputs().

◆ max_jit_obex_attr_get()

t_jit_err max_jit_obex_attr_get ( void *  x,
t_symbol s,
long *  ac,
t_atom **  av 
)

Retrienves an attribute of the Max wrapper or the wrapped Jitter object.

Parameters
xMax wrapper object pointer
sattribute name
acpointer to atom count
avpointer to atom vector
Returns
t_jit_error error code

References _jit_sym_get, _jit_sym_getmethod, jit_attr_symcompare(), and jit_linklist_findfirst().

◆ max_jit_obex_attr_set()

t_jit_err max_jit_obex_attr_set ( void *  x,
t_symbol s,
long  ac,
t_atom av 
)

Sets an attribute of the Max wrapper or the wrapped Jitter object.

Parameters
xMax wrapper object pointer
sattribute name
acatom count
avatom vector
Returns
t_jit_error error code

References _jit_sym_getmethod, _jit_sym_set, jit_attr_symcompare(), jit_linklist_findfirst(), and object_notify().

Referenced by max_jit_classex_addattr().

◆ max_jit_obex_dumpout()

void max_jit_obex_dumpout ( void *  x,
t_symbol s,
short  argc,
t_atom argv 
)

Sends a message and arguments out the dump outlet.

This message is equivalent to calling outlet_anything with the outlet returned by max_jit_obex_dumpout_get.

Parameters
xMax wrapper object pointer
smessage symbol
argcargument count
argvargument vector

References outlet_anything().

Referenced by max_jit_classex_standard_wrap(), and max_jit_obex_gimmeback_dumpout().

◆ max_jit_obex_dumpout_get()

void* max_jit_obex_dumpout_get ( void *  x)

Retrieves the Max wrapper object's dump outlet's outlet pointer.

Parameters
xMax wrapper object pointer
Returns
dump outlet pointer

◆ max_jit_obex_dumpout_set()

void max_jit_obex_dumpout_set ( void *  x,
void *  outlet 
)

Sets the Max wrapper object's dump outlet's outlet pointer.

Parameters
xMax wrapper object pointer
outletdump outlet pointer

Referenced by max_jit_mop_setup_simple(), and max_jit_obex_new().

◆ max_jit_obex_free()

void max_jit_obex_free ( void *  x)

Frees additional resources for the Max wrapper object instance.

Parameters
xMax wrapper object pointer

◆ max_jit_obex_gimmeback()

void max_jit_obex_gimmeback ( void *  x,
t_symbol s,
long  ac,
t_atom av 
)

Calls gimmeback methods and frees any return value.

Parameters
xMax wrapper object pointer
smethod name
acargument count
avargument vector

References A_NOTHING, A_OBJ, freebytes(), freeobject(), max_jit_obex_jitob_get(), object_method_typed(), and word::w_obj.

◆ max_jit_obex_gimmeback_dumpout()

void max_jit_obex_gimmeback_dumpout ( void *  x,
t_symbol s,
long  ac,
t_atom av 
)

Calls gimmeback methods and outputs any return value through the Max wrapper class' dump outlet.

Parameters
xMax wrapper object pointer
smethod name
acargument count
avargument vector

References A_NOTHING, A_OBJ, freebytes(), freeobject(), gensym(), max_jit_obex_dumpout(), max_jit_obex_jitob_get(), object_getvalueof(), object_method_typed(), and word::w_obj.

◆ max_jit_obex_inletnumber_get()

long max_jit_obex_inletnumber_get ( void *  x)

Retrieves the current inlet number used by inlet proxies.

Parameters
xMax wrapper object pointer
Returns
current inlet index

References proxy_getinlet().

Referenced by max_jit_mop_jit_matrix().

◆ max_jit_obex_inletnumber_set()

void max_jit_obex_inletnumber_set ( void *  x,
long  inletnumber 
)

Sets the current inlet number used by inlet proxies.

Warning
Typically not used outside jitlib.
Parameters
xMax wrapper object pointer
inletnumberinlet index

Referenced by max_jit_obex_new().

◆ max_jit_obex_jitob_get()

void* max_jit_obex_jitob_get ( void *  x)

Retrieves the wrapped Jitter object from a Max wrapper object.

Parameters
xMax wrapper object pointer
Returns
Jitter object pointer

Referenced by max_jit_attr_args(), max_jit_attr_get(), max_jit_attr_set(), max_jit_mop_jit_matrix(), max_jit_mop_setup(), max_jit_obex_gimmeback(), and max_jit_obex_gimmeback_dumpout().

◆ max_jit_obex_jitob_set()

void max_jit_obex_jitob_set ( void *  x,
void *  jitob 
)

Sets the wrapped Jitter object for a Max wrapper object.

Parameters
xMax wrapper object pointer
jitobJitter object pointer

References gensym(), and OBJ_FLAG_REF.

Referenced by max_jit_mop_setup_simple(), and max_jit_obex_new().

◆ max_jit_obex_new()

void * max_jit_obex_new ( void *  mc,
t_symbol classname 
)

Allocates an initializes a new Max wrapper object instance.

This is used in place of the newobject function.

Parameters
mcMax class pointer
classnameJitter class name to wrap
Returns
pointer to new Max wrapper object instance

◆ max_jit_obex_proxy_new()

t_jit_err max_jit_obex_proxy_new ( void *  x,
long  c 
)

Creates a new proxy inlet.

Parameters
xMax wrapper object pointer
cinlet index
Returns
t_jit_err error code

References jit_linklist_append(), jit_linklist_new(), and proxy_new().

Referenced by max_jit_mop_inputs().