aboutsummaryrefslogtreecommitdiff
path: root/source/vnmax.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-02-10 00:34:05 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-02-10 00:34:05 +0000
commit086e6b358ad45bda0e6a948cfb7ea2d33ab7da5a (patch)
treeb87b0adfbfd8f9b9439d8bf528b63b64f23dce03 /source/vnmax.c
parent98e3e1214cf71a62b2de938c9c7e07f6bdd0090c (diff)
re-arranged into libdir and setup with the template Makefile+debian stuff. renabled vv+ and vv- as vvplus and vvminus
svn path=/trunk/externals/smlib/; revision=13158
Diffstat (limited to 'source/vnmax.c')
-rw-r--r--source/vnmax.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/source/vnmax.c b/source/vnmax.c
deleted file mode 100644
index 7003f6d..0000000
--- a/source/vnmax.c
+++ /dev/null
@@ -1,55 +0,0 @@
-#include "defines.h"
-
-/*--------------- vnmax ---------------*/
-/* maximum n values in a list of float
- and their locations (indices)
-*/
-
-//// UNCOMPLETE
-
-
-static t_class *vnmax_class;
-
-typedef struct _vnmax
-{
- t_object x_obj;
- t_outlet *m_out_maxi;
-} t_vnmax;
-
-
-static void vnmax_perform(t_vnmax *x, t_symbol *s, int argc, t_atom *argv)
-{
- int i;
- int maxi;
- float max=-MAXFLOAT;
- for (i = 0; i < argc; i++)
- {
- float f=atom_getfloat(&argv[i]);
- if (f>max)
- {
- max=f;
- maxi=i;
- }
- }
- outlet_float(x->x_obj.ob_outlet, max);
- outlet_float(x->m_out_maxi, (float)(maxi+1));
-}
-
-static void *vnmax_new( t_float halfDecayTime)
-{
- t_vnmax *x=(t_vnmax *)pd_new(vnmax_class);
- outlet_new(&x->x_obj, gensym("list"));
- x->m_out_maxi=outlet_new(&x->x_obj, gensym("list"));
- return (void *)x;
-}
-
-void vnmax_setup(void)
-{
- vnmax_class = class_new(gensym("vnmax"),
- (t_newmethod)vnmax_new, 0,
- sizeof(t_vnmax),
- CLASS_DEFAULT,
- 0);
- class_addlist(vnmax_class, (t_method)vnmax_perform);
-}
-