Max API  8.0.2
Atom Module

Functions

t_jit_err jit_atom_setlong (t_atom *a, t_atom_long b)
 Sets atom value to long integer. More...
 
t_jit_err jit_atom_setfloat (t_atom *a, double b)
 Sets atom value to floating point number. More...
 
t_jit_err jit_atom_setsym (t_atom *a, t_symbol *b)
 Sets atom value to symbol. More...
 
t_jit_err jit_atom_setobj (t_atom *a, void *b)
 Sets atom value to object pointer. More...
 
t_atom_long jit_atom_getlong (t_atom *a)
 Retrieves atom value as long integer. More...
 
double jit_atom_getfloat (t_atom *a)
 Retrieves atom value as floating point number. More...
 
t_symboljit_atom_getsym (t_atom *a)
 Retrieves atom value as symbol pointer. More...
 
void * jit_atom_getobj (t_atom *a)
 Retrieves atom value as object pointer. More...
 
long jit_atom_getcharfix (t_atom *a)
 Retrieves atom value as an 8 bit fixed point number. More...
 
long jit_atom_arg_getlong (t_atom_long *c, long idx, long ac, t_atom *av)
 Retrieves atom argument at index as long integer if present. More...
 
long jit_atom_arg_getfloat (float *c, long idx, long ac, t_atom *av)
 Retrieves atom argument at index as floating point number if present. More...
 
long jit_atom_arg_getdouble (double *c, long idx, long ac, t_atom *av)
 Retrieves atom argument at index as double precision floating point number if present. More...
 
long jit_atom_arg_getsym (t_symbol **c, long idx, long ac, t_atom *av)
 Retrieves atom argument at index as symbol pointer if present. More...
 

Detailed Description

Function Documentation

◆ jit_atom_arg_getdouble()

long jit_atom_arg_getdouble ( double *  c,
long  idx,
long  ac,
t_atom av 
)

Retrieves atom argument at index as double precision floating point number if present.

This function is useful for setting the values only if there is an argument at the specified index, otherwise, the input value is untouched.

Parameters
cpointer to double (should contain desired default)
idxatom argument index
acatom argument count
avatom argument vector
Returns
t_jit_err error code. JIT_ERR_NONE if successful.

References atom_arg_getdouble().

◆ jit_atom_arg_getfloat()

long jit_atom_arg_getfloat ( float *  c,
long  idx,
long  ac,
t_atom av 
)

Retrieves atom argument at index as floating point number if present.

This function is useful for setting the values only if there is an argument at the specified index, otherwise, the input value is untouched.

Parameters
cpointer to float (should contain desired default)
idxatom argument index
acatom argument count
avatom argument vector
Returns
t_jit_err error code. JIT_ERR_NONE if successful.

References atom_arg_getfloat().

◆ jit_atom_arg_getlong()

long jit_atom_arg_getlong ( t_atom_long c,
long  idx,
long  ac,
t_atom av 
)

Retrieves atom argument at index as long integer if present.

This function is useful for setting the values only if there is an argument at the specified index, otherwise, the input value is untouched.

Parameters
cpointer to long (should contain desired default)
idxatom argument index
acatom argument count
avatom argument vector
Returns
t_jit_err error code. JIT_ERR_NONE if successful.

References atom_arg_getlong().

Referenced by max_jit_mop_matrix_args().

◆ jit_atom_arg_getsym()

long jit_atom_arg_getsym ( t_symbol **  c,
long  idx,
long  ac,
t_atom av 
)

Retrieves atom argument at index as symbol pointer if present.

This function is useful for setting the values only if there is an argument at the specified index, otherwise, the input value is untouched.

Parameters
cpointer to symbol pointer (should contain desired default)
idxatom argument index
acatom argument count
avatom argument vector
Returns
t_jit_err error code. JIT_ERR_NONE if successful.

References atom_arg_getsym().

Referenced by max_jit_mop_matrix_args().

◆ jit_atom_getcharfix()

long jit_atom_getcharfix ( t_atom a)

Retrieves atom value as an 8 bit fixed point number.

Parameters
aatom pointer
Returns
8 bit fixed point value in the range 0-255. 0 if atom has no numeric value.

References atom_getcharfix().

Referenced by jit_matrix_fillplane(), jit_matrix_setall(), and jit_matrix_setcell().

◆ jit_atom_getfloat()

double jit_atom_getfloat ( t_atom a)

Retrieves atom value as floating point number.

Parameters
aatom pointer
Returns
floating point value. 0 if atom has no numeric value.

References atom_getfloat().

Referenced by jit_matrix_fillplane(), jit_matrix_setall(), and jit_matrix_setcell().

◆ jit_atom_getlong()

long jit_atom_getlong ( t_atom a)

Retrieves atom value as long integer.

Parameters
aatom pointer
Returns
long integer value. 0 if atom has no numeric value.

Referenced by jit_matrix_exprfill(), jit_matrix_fillplane(), jit_matrix_getcell(), jit_matrix_setall(), jit_matrix_setcell(), jit_matrix_setcell1d(), jit_matrix_setcell2d(), jit_matrix_setcell3d(), jit_matrix_setplane1d(), jit_matrix_setplane2d(), and jit_matrix_setplane3d().

◆ jit_atom_getobj()

void* jit_atom_getobj ( t_atom a)

Retrieves atom value as object pointer.

Parameters
aatom pointer
Returns
object pointer. NULL if atom has no object value.

References atom_getobj().

Referenced by jit_matrix_setcell().

◆ jit_atom_getsym()

t_symbol * jit_atom_getsym ( t_atom a)

Retrieves atom value as symbol pointer.

Parameters
aatom pointer
Returns
symbol pointer. _jit_sym_nothing if atom has no symbolic value.

Referenced by jit_matrix_exprfill(), jit_matrix_jit_gl_texture(), jit_matrix_op(), jit_matrix_setcell(), and max_jit_mop_jit_matrix().

◆ jit_atom_setfloat()

t_jit_err jit_atom_setfloat ( t_atom a,
double  b 
)

Sets atom value to floating point number.

Parameters
aatom pointer
bfloating point value
Returns
t_jit_err error code.

References atom_setfloat().

Referenced by jit_matrix_getcell().

◆ jit_atom_setlong()

t_jit_err jit_atom_setlong ( t_atom a,
t_atom_long  b 
)

Sets atom value to long integer.

Parameters
aatom pointer
binteger value
Returns
t_jit_err error code.

Referenced by jit_matrix_getcell(), jit_matrix_setcell1d(), jit_matrix_setcell2d(), jit_matrix_setcell3d(), jit_matrix_setplane1d(), jit_matrix_setplane2d(), and jit_matrix_setplane3d().

◆ jit_atom_setobj()

t_jit_err jit_atom_setobj ( t_atom a,
void *  b 
)

Sets atom value to object pointer.

Parameters
aatom pointer
bobject pointer
Returns
t_jit_err error code.

References atom_setobj().

Referenced by jit_matrix_getcell(), and jit_matrix_jit_gl_texture().

◆ jit_atom_setsym()

t_jit_err jit_atom_setsym ( t_atom a,
t_symbol b 
)