3
/*--------------- vmax ---------------*/
4
/* maximum value in a list of float
5
and its location (index)
8
static t_class *vmax_class;
17
static void vmax_perform(t_vmax *x, t_symbol *s, int argc, t_atom *argv)
22
for (i = 0; i < argc; i++)
24
float f=atom_getfloat(&argv[i]);
31
outlet_float(x->x_obj.ob_outlet, max);
32
outlet_float(x->m_out_maxi, (float)(maxi+1));
35
static void *vmax_new( t_float halfDecayTime)
37
t_vmax *x=(t_vmax *)pd_new(vmax_class);
38
outlet_new(&x->x_obj, gensym("float"));
39
x->m_out_maxi=outlet_new(&x->x_obj, gensym("float"));
45
vmax_class = class_new(gensym("vmax"),
46
(t_newmethod)vmax_new, 0,
50
class_addlist(vmax_class, (t_method)vmax_perform);