aboutsummaryrefslogtreecommitdiff
path: root/src/wrapper.c
diff options
context:
space:
mode:
authorThomas O Fredericks <mrtof@users.sourceforge.net>2009-09-29 21:38:55 +0000
committerThomas O Fredericks <mrtof@users.sourceforge.net>2009-09-29 21:38:55 +0000
commitb95a41d4163666368971d39c2a8d9af64501d36c (patch)
treecc2b949c5ad8db8e6ffdd960d50b2b66ce86a9e9 /src/wrapper.c
parentc6750d375d8fcf3705b8992c8c9f5006a2bb0716 (diff)
Make paramRoute require a /
svn path=/trunk/externals/tof/; revision=12493
Diffstat (limited to 'src/wrapper.c')
-rw-r--r--src/wrapper.c81
1 files changed, 0 insertions, 81 deletions
diff --git a/src/wrapper.c b/src/wrapper.c
deleted file mode 100644
index 8d0ec5e..0000000
--- a/src/wrapper.c
+++ /dev/null
@@ -1,81 +0,0 @@
-#include "m_pd.h"
-#include <math.h>
-
-static t_class *wrapper_class;
-
-typedef struct _wrapper {
- t_object x_obj;
-
- t_float min;
- t_float max;
- //t_int iterating;
- t_outlet* outlet1;
- //t_outlet* outlet2;
-} t_wrapper;
-
-/*
-void wrapper_bang(t_wrapper *x)
-{
- //x->i_count = x->i_down;
- x->iterating = 0;
-
-}
-*/
-
-void wrapper_float(t_wrapper *x, t_float f)
-{
-
- t_float value = fmod(f - x->min ,x->max - x->min);
- if ( value < 0 ) value = value + x->max;
- else value = value + x->min;
-
- outlet_float(x->outlet1, value);
-
-
-}
-
-
-
-static void wrapper_free(t_wrapper *x)
-{
-
-
-}
-
-void *wrapper_new(t_symbol *s, int argc, t_atom *argv)
-{
- t_wrapper *x = (t_wrapper *)pd_new(wrapper_class);
-
-
- if ( argc >= 2) {
- x->min = atom_getfloat(argv);
- x->max = atom_getfloat(argv+1);
- } else if ( argc == 1) {
- x->min = 0;
- x->max = atom_getfloat(argv);
- } else {
- x->min = 0;
- x->max = 1;
- }
-
- floatinlet_new(&x->x_obj, &x->min);
- floatinlet_new(&x->x_obj, &x->max);
- x->outlet1 = outlet_new(&x->x_obj, &s_float);
-
-
-
- return (void *)x;
-}
-
-void wrapper_setup(void) {
- wrapper_class = class_new(gensym("wrapper"),
- (t_newmethod)wrapper_new,
- (t_method)wrapper_free, sizeof(t_wrapper),
- CLASS_DEFAULT,
- A_GIMME, 0);
-
- //class_addbang (wrapper_class, wrapper_bang);
- class_addfloat (wrapper_class, wrapper_float);
- //class_addlist (wrapper_class, wrapper_list);
-
-}