aboutsummaryrefslogtreecommitdiff
path: root/source/vmtof.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/vmtof.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/vmtof.c')
-rw-r--r--source/vmtof.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/source/vmtof.c b/source/vmtof.c
deleted file mode 100644
index 828dcb6..0000000
--- a/source/vmtof.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#include "defines.h"
-
-/*--------------- vmtof ----------------*/
-
-static t_class *vmtof_class;
-
-typedef struct _vmtof
-{
- t_object x_obj;
-} t_vmtof;
-
-float mtof(float f)
-{
- if (f <= -1500) return(0);
- else if (f > 1499) return(mtof(1499));
- else return (float)(8.17579891564 * exp(.0577622650 * f));
-}
-
-static void vmtof_perform(t_vmtof *x, t_symbol *s, int argc, t_atom *argv)
-{
- int i;
- t_atom *ap,*app;
- ap = (t_atom *)getbytes(sizeof(t_atom)*argc);
- app=ap;
-
- for (i = 0; i < argc; i++)
- {
- SETFLOAT(app, mtof(atom_getfloat(argv++)));
- app++;
- }
- outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap);
- freebytes(ap,argc);
-}
-
-static void *vmtof_new()
-{
- t_vmtof *x=(t_vmtof *)pd_new(vmtof_class);
- outlet_new(&x->x_obj, gensym("list"));
- return (void *)x;
-}
-
-void vmtof_setup(void)
-{
- vmtof_class = class_new(gensym("vmtof"),
- (t_newmethod)vmtof_new, 0,
- sizeof(t_vmtof),
- CLASS_DEFAULT,
- 0);
- class_addlist(vmtof_class, (t_method)vmtof_perform);
-}
-