3
/*--------------- vnmax ---------------*/
4
/* maximum n values in a list of float
5
and their locations (indices)
11
static t_class *vnmax_class;
20
static void vnmax_perform(t_vnmax *x, t_symbol *s, int argc, t_atom *argv)
25
for (i = 0; i < argc; i++)
27
float f=atom_getfloat(&argv[i]);
34
outlet_float(x->x_obj.ob_outlet, max);
35
outlet_float(x->m_out_maxi, (float)(maxi+1));
38
static void *vnmax_new( t_float halfDecayTime)
40
t_vnmax *x=(t_vnmax *)pd_new(vnmax_class);
41
outlet_new(&x->x_obj, gensym("list"));
42
x->m_out_maxi=outlet_new(&x->x_obj, gensym("list"));
46
void vnmax_setup(void)
48
vnmax_class = class_new(gensym("vnmax"),
49
(t_newmethod)vnmax_new, 0,
53
class_addlist(vnmax_class, (t_method)vnmax_perform);