aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cup/cup.c42
-rw-r--r--cup/help-cup.pd21
-rw-r--r--cup/makefile105
-rw-r--r--doubledelta/doubledelta.c48
-rw-r--r--doubledelta/makefile105
-rw-r--r--steady/help-steady.pd110
-rw-r--r--steady/makefile105
-rw-r--r--steady/steady.c80
8 files changed, 616 insertions, 0 deletions
diff --git a/cup/cup.c b/cup/cup.c
new file mode 100644
index 0000000..6aca214
--- /dev/null
+++ b/cup/cup.c
@@ -0,0 +1,42 @@
+#include "m_pd.h"
+
+t_class *cup_class;
+
+typedef struct _cup
+{
+ t_object x_obj;
+ t_int f_count, fa;
+ t_outlet *count;
+} t_cup;
+
+void cup_float(t_cup *y, t_floatarg f)
+{
+ y->f_count = f;
+}
+
+void cup_bang(t_cup *y)
+{
+ outlet_float(y->count, y->f_count);
+ y->f_count += 1;
+}
+
+void *cup_new(t_floatarg f)
+{
+ t_cup *y = (t_cup *)pd_new(cup_class);
+ y->fa = f;
+ y->f_count = 0;
+ y->count = outlet_new(&y->x_obj, gensym("float"));
+ return(void *)y;
+}
+
+void cup_setup(void)
+{
+ cup_class = class_new(gensym("cup"),
+ (t_newmethod)cup_new,
+ 0, sizeof(t_cup),
+ 0, A_DEFFLOAT, 0);
+ post("cup counts up ^_^");
+ class_sethelpsymbol(cup_class, gensym("help-cup"));
+ class_addbang(cup_class, cup_bang);
+ class_addfloat(cup_class, cup_float);
+}
diff --git a/cup/help-cup.pd b/cup/help-cup.pd
new file mode 100644
index 0000000..eae2603
--- /dev/null
+++ b/cup/help-cup.pd
@@ -0,0 +1,21 @@
+#N canvas 0 22 433 272 10;
+#X obj 71 134 cup;
+#X msg 133 118 0;
+#X msg 177 118 25;
+#X msg 220 118 -67;
+#X text 153 89 set to float;
+#X text 130 100 (but do not output);
+#X obj 71 81 metro 500;
+#X obj 71 62 loadbang;
+#X floatatom 71 156 5 0 0 0 - - -;
+#X text 196 24 cup counts up ^_^;
+#X text 165 46 it's the simplest counter there is;
+#X text 184 70 why waste cpu power on counting?;
+#X text 106 236 Ed;
+#X text 71 198 someday I may write a haiku poem about it;
+#X connect 0 0 8 0;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 6 0 0 0;
+#X connect 7 0 6 0;
diff --git a/cup/makefile b/cup/makefile
new file mode 100644
index 0000000..dda30bf
--- /dev/null
+++ b/cup/makefile
@@ -0,0 +1,105 @@
+current:
+ echo make pd_linux, pd_nt, pd_irix5, pd_irix6 or pd_darwin, then make install
+
+clean: ; rm -f *.pd_* *.o
+
+# ----------------------- NT -----------------------
+
+pd_nt: cup.dll
+
+INSTALL_PREFIX="C:\pd\extra"
+EXT=dll
+.SUFFIXES: .obj .dll
+
+PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
+VC="D:\Program Files\Microsoft Visual Studio\Vc98"
+
+PDNTINCLUDE = /I. /I\tcl\include /I..\..\src /I$(VC)\include
+
+PDNTLDIR = $(VC)\lib
+PDNTLIB = $(PDNTLDIR)\libc.lib \
+ $(PDNTLDIR)\oldnames.lib \
+ $(PDNTLDIR)\kernel32.lib \
+ ..\..\bin\pd.lib
+
+.c.dll:
+ cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
+ link /dll /export:$*_setup $*.obj $(PDNTLIB)
+
+# ----------------------- IRIX 5.x -----------------------
+
+pd_irix5: cup.pd_irix5
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_irix5
+.SUFFIXES: .pd_irix5
+
+SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
+
+SGIINCLUDE = -I/usr/local/include
+
+.c.pd_irix5:
+ cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
+ ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o
+ rm $*.o
+
+# ----------------------- IRIX 5.x -----------------------
+
+pd_irix6: cup.pd_irix6
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_irix6
+.SUFFIXES: .pd_irix6
+
+SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
+
+SGIINCLUDE = -I/usr/local/include
+
+.c.pd_irix6:
+ cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
+ ld -elf -shared -rdata_shared -o $*.pd_irix6 $*.o
+ rm $*.o
+
+# ----------------------- LINUX i386 -----------------------
+
+pd_linux: cup.pd_linux
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_linux
+.SUFFIXES: .pd_linux
+
+LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
+ -Wall -W -Wshadow -Wstrict-prototypes -Werror \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+LINUXINCLUDE = -I/usr/local/include
+
+.c.pd_linux:
+ cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+ ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
+ strip --strip-unneeded $*.pd_linux
+ rm $*.o
+
+# ----------------------- Mac OSX -----------------------
+
+pd_darwin: cup.pd_darwin
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_darwin
+.SUFFIXES: .pd_darwin
+
+DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+.c.pd_darwin:
+ cc $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+ cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o
+ rm -f $*.o
+
+# ----------------------------------------------
+
+install::
+ install -d $(INSTALL_PREFIX)/lib/pd/extra
+# install -m 644 *.$(EXT) $(INSTALL_PREFIX)/lib/pd/externs
+ -install -m 644 cup.$(EXT) $(INSTALL_PREFIX)/lib/pd/extra
+ install -m 644 *.pd $(INSTALL_PREFIX)/lib/pd/doc/5.reference
diff --git a/doubledelta/doubledelta.c b/doubledelta/doubledelta.c
new file mode 100644
index 0000000..57323a8
--- /dev/null
+++ b/doubledelta/doubledelta.c
@@ -0,0 +1,48 @@
+#include "m_pd.h"
+
+t_class *doubledelta_class;
+
+typedef struct _doubledelta
+{
+ t_object x_obj;
+ t_float f_now, f_prev, f_delta, f_delta_prev, f_doubledelta, fa;
+ t_outlet *delta, *doubledelta;
+} t_doubledelta;
+
+void doubledelta_float(t_doubledelta *y, t_floatarg f)
+{
+ y->f_delta_prev = y->f_delta;
+ y->f_prev = y->f_now;
+ y->f_now = f;
+ y->f_delta = y->f_now - y->f_prev;
+ y->f_doubledelta = y->f_delta - y->f_delta_prev;
+ outlet_float(y->doubledelta, y->f_doubledelta);
+ outlet_float(y->delta, y->f_delta);
+}
+
+void doubledelta_bang(t_doubledelta *y)
+{
+ outlet_float(y->doubledelta, y->f_doubledelta);
+ outlet_float(y->delta, y->f_delta);
+}
+
+void *doubledelta_new(t_floatarg f)
+{
+ t_doubledelta *y = (t_doubledelta *)pd_new(doubledelta_class);
+ y->fa = f;
+ y->delta = outlet_new(&y->x_obj, gensym("float"));
+ y->doubledelta = outlet_new(&y->x_obj, gensym("float"));
+ return(void *)y;
+}
+
+void doubledelta_setup(void)
+{
+ doubledelta_class = class_new(gensym("doubledelta"),
+ (t_newmethod)doubledelta_new,
+ 0, sizeof(t_doubledelta),
+ 0, A_DEFFLOAT, 0);
+ post("delta & delta-delta values, <morph_2016@yahoo.co.uk>");
+ class_sethelpsymbol(doubledelta_class, gensym("help-ddelta"));
+ class_addbang(doubledelta_class, doubledelta_bang);
+ class_addfloat(doubledelta_class, doubledelta_float);
+}
diff --git a/doubledelta/makefile b/doubledelta/makefile
new file mode 100644
index 0000000..1185340
--- /dev/null
+++ b/doubledelta/makefile
@@ -0,0 +1,105 @@
+current:
+ echo make pd_linux, pd_nt, pd_irix5, pd_irix6 or pd_darwin, then make install
+
+clean: ; rm -f *.pd_* *.o
+
+# ----------------------- NT -----------------------
+
+pd_nt: doubledelta.dll
+
+INSTALL_PREFIX="C:\pd\extra"
+EXT=dll
+.SUFFIXES: .obj .dll
+
+PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
+VC="D:\Program Files\Microsoft Visual Studio\Vc98"
+
+PDNTINCLUDE = /I. /I\tcl\include /I..\..\src /I$(VC)\include
+
+PDNTLDIR = $(VC)\lib
+PDNTLIB = $(PDNTLDIR)\libc.lib \
+ $(PDNTLDIR)\oldnames.lib \
+ $(PDNTLDIR)\kernel32.lib \
+ ..\..\bin\pd.lib
+
+.c.dll:
+ cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
+ link /dll /export:$*_setup $*.obj $(PDNTLIB)
+
+# ----------------------- IRIX 5.x -----------------------
+
+pd_irix5: doubledelta.pd_irix5
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_irix5
+.SUFFIXES: .pd_irix5
+
+SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
+
+SGIINCLUDE = -I/usr/local/include
+
+.c.pd_irix5:
+ cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
+ ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o
+ rm $*.o
+
+# ----------------------- IRIX 5.x -----------------------
+
+pd_irix6: doubledelta.pd_irix6
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_irix6
+.SUFFIXES: .pd_irix6
+
+SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
+
+SGIINCLUDE = -I/usr/local/include
+
+.c.pd_irix6:
+ cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
+ ld -elf -shared -rdata_shared -o $*.pd_irix6 $*.o
+ rm $*.o
+
+# ----------------------- LINUX i386 -----------------------
+
+pd_linux: doubledelta.pd_linux
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_linux
+.SUFFIXES: .pd_linux
+
+LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
+ -Wall -W -Wshadow -Wstrict-prototypes -Werror \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+LINUXINCLUDE = -I/usr/local/include
+
+.c.pd_linux:
+ cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+ ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
+ strip --strip-unneeded $*.pd_linux
+ rm $*.o
+
+# ----------------------- Mac OSX -----------------------
+
+pd_darwin: doubledelta.pd_darwin
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_darwin
+.SUFFIXES: .pd_darwin
+
+DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+.c.pd_darwin:
+ cc $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+ cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o
+ rm -f $*.o
+
+# ----------------------------------------------
+
+install::
+ install -d $(INSTALL_PREFIX)/lib/pd/extra
+# install -m 644 *.$(EXT) $(INSTALL_PREFIX)/lib/pd/externs
+ -install -m 644 doubledelta.$(EXT) $(INSTALL_PREFIX)/lib/pd/extra
+ install -m 644 *.pd $(INSTALL_PREFIX)/lib/pd/doc/5.reference
diff --git a/steady/help-steady.pd b/steady/help-steady.pd
new file mode 100644
index 0000000..260409f
--- /dev/null
+++ b/steady/help-steady.pd
@@ -0,0 +1,110 @@
+#N canvas 455 323 616 303 10;
+#N canvas 0 22 696 311 fiddle-example 0;
+#X obj 139 187 steady;
+#X floatatom 98 223 5 0 0 3 max - -;
+#X floatatom 148 223 5 0 0 3 min - -;
+#X floatatom 199 224 5 0 0 3 through - -;
+#X floatatom 197 159 5 0 0 0 - - -;
+#X msg 197 127 5;
+#X obj 197 103 loadbang;
+#X text 202 172 maximum;
+#X text 209 183 jump;
+#N canvas 0 22 359 329 bad-fm 0;
+#X obj 43 170 osc~ 380;
+#X obj 43 243 osc~ 550;
+#X obj 43 223 +~ 550;
+#X obj 43 198 *~ 440;
+#X obj 43 144 +~ 280;
+#X obj 43 120 line~;
+#X obj 43 97 pack f 1000;
+#X obj 43 31 metro 1000;
+#X obj 43 50 t b b;
+#X msg 72 69 0;
+#X obj 43 264 outlet~;
+#X obj 122 7 inlet;
+#X msg 43 71 850;
+#X connect 0 0 3 0;
+#X connect 1 0 10 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 4 0 0 0;
+#X connect 5 0 4 0;
+#X connect 6 0 5 0;
+#X connect 7 0 8 0;
+#X connect 8 0 12 0;
+#X connect 8 1 9 0;
+#X connect 9 0 5 0;
+#X connect 11 0 7 0;
+#X connect 12 0 6 0;
+#X restore 87 102 pd bad-fm;
+#X obj 87 124 fiddle~;
+#X obj 117 145 unpack;
+#X floatatom 123 168 5 0 0 0 - - -;
+#X obj 109 79 switch~;
+#X obj 87 50 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X text 271 84 steady can be useful for eliminating errors from the
+raw pitch output of fiddle~;
+#X obj 36 244 dac~;
+#X obj 70 167 bng 15 250 50 0 empty empty reset 0 -6 0 8 -262144 -1
+-1;
+#X text 272 115 or for just keeping the values within range of a specific
+pitch from changing too quickly - so that a sort of 'closest pitch'
+output is given from the rightmost outlet;
+#X obj 32 216 *~ 0.4;
+#X connect 0 0 1 0;
+#X connect 0 1 2 0;
+#X connect 0 2 3 0;
+#X connect 4 0 0 1;
+#X connect 5 0 4 0;
+#X connect 6 0 5 0;
+#X connect 9 0 10 0;
+#X connect 9 0 19 0;
+#X connect 10 2 11 0;
+#X connect 11 0 12 0;
+#X connect 12 0 0 0;
+#X connect 14 0 9 0;
+#X connect 14 0 13 0;
+#X connect 17 0 0 0;
+#X connect 19 0 16 0;
+#X connect 19 0 16 1;
+#X restore 42 52 pd fiddle-example;
+#X obj 45 187 steady;
+#X obj 44 107 random 100;
+#X obj 44 88 metro 100;
+#X floatatom 45 132 5 0 0 0 - - -;
+#X msg 102 147 8;
+#X obj 102 129 loadbang;
+#X floatatom 102 165 5 0 0 0 - - -;
+#X text 106 178 maximum;
+#X text 114 190 jump;
+#X floatatom 27 217 5 0 0 3 max - -;
+#X floatatom 77 217 5 0 0 3 min - -;
+#X floatatom 128 218 5 0 0 3 through - -;
+#X obj 53 162 bng 15 250 50 0 empty empty set-value 0 -6 0 8 -262144
+-1 -1;
+#X text 40 269 (c) 2005 Edward Kelly <morph_2016@yahoo.co.uk>;
+#X text 194 28 steady takes a stream of numbers as its input.;
+#X text 193 49 its output is the maximum and minimum and a through
+outlet;
+#X text 194 95 the right inlet sets the maximum jump between consecutive
+numbers in the right inlet \, and any value that is different from
+the previous value by +/- more than this number will be filtered out.
+;
+#X text 194 144 banging the left inlet causes steady to re-initialise
+\, so that the first number after the bang is let through \, and filtering
+occurs from then onwards.;
+#X text 194 188 ...sometimes useful to filter out erroneous results
+from fiddle~ and other externs...;
+#X text 194 73 but...;
+#X connect 1 0 10 0;
+#X connect 1 1 11 0;
+#X connect 1 2 12 0;
+#X connect 2 0 4 0;
+#X connect 3 0 2 0;
+#X connect 4 0 1 0;
+#X connect 5 0 7 0;
+#X connect 6 0 5 0;
+#X connect 6 0 3 0;
+#X connect 7 0 1 1;
+#X connect 13 0 1 0;
diff --git a/steady/makefile b/steady/makefile
new file mode 100644
index 0000000..7e19e93
--- /dev/null
+++ b/steady/makefile
@@ -0,0 +1,105 @@
+current:
+ echo make pd_linux, pd_nt, pd_irix5, pd_irix6 or pd_darwin
+
+clean: ; rm -f *.pd_* *.o
+
+# ----------------------- NT -----------------------
+
+pd_nt: steady.dll
+
+.SUFFIXES: .obj .dll
+
+PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
+VC="D:\Program Files\Microsoft Visual Studio\Vc98"
+
+PDNTINCLUDE = /I. /I\tcl\include /I..\..\src /I$(VC)\include
+
+PDNTLDIR = $(VC)\lib
+PDNTLIB = $(PDNTLDIR)\libc.lib \
+ $(PDNTLDIR)\oldnames.lib \
+ $(PDNTLDIR)\kernel32.lib \
+ ..\..\bin\pd.lib
+
+.c.dll:
+ cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
+ link /dll /export:$*_setup $*.obj $(PDNTLIB)
+
+# ----------------------- IRIX 5.x -----------------------
+
+pd_irix5: steady.pd_irix5
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_irix5
+.SUFFIXES: .pd_irix5
+
+SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
+
+
+SGIINCLUDE = -I/usr/local/include
+
+.c.pd_irix5:
+ cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
+ ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o
+ rm $*.o
+
+# ----------------------- IRIX 6.x -----------------------
+
+pd_irix6: steady.pd_irix6
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_irix6
+.SUFFIXES: .pd_irix6
+
+SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
+
+
+SGIINCLUDE = -I/usr/local/include
+
+.c.pd_irix6:
+ cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
+ ld -elf -shared -rdata_shared -o $*.pd_irix6 $*.o
+ rm $*.o
+
+# ----------------------- LINUX i386 -----------------------
+
+pd_linux: steady.pd_linux
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_linux
+.SUFFIXES: .pd_linux
+
+LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
+ -Wall -W -Wshadow -Wstrict-prototypes -Werror \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+LINUXINCLUDE = -I/usr/local/include
+
+.c.pd_linux:
+ cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+ ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
+ strip --strip-unneeded $*.pd_linux
+ rm $*.o
+
+# ----------------------- Mac OSX -----------------------
+
+pd_darwin: steady.pd_darwin
+
+INSTALL_PREFIX=/usr/local
+EXT=pd_darwin
+.SUFFIXES: .pd_darwin
+
+DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+.c.pd_darwin:
+ cc $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+ cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o
+ rm -f $*.o
+
+# ----------------------------------------------
+
+install::
+ install -d $(INSTALL_PREFIX)/lib/pd/extra
+# install -m 644 *.$(EXT) $(INSTALL_PREFIX)/lib/pd/externs
+ -install -m 644 steady.$(EXT) $(INSTALL_PREFIX)/lib/pd/extra
+ install -m 644 *.pd $(INSTALL_PREFIX)/lib/pd/doc/5.reference
diff --git a/steady/steady.c b/steady/steady.c
new file mode 100644
index 0000000..c79ac4e
--- /dev/null
+++ b/steady/steady.c
@@ -0,0 +1,80 @@
+#include "m_pd.h"
+#include <math.h>
+
+typedef struct _steady
+{
+ t_object x_obj;
+ t_float f_min;
+ t_float f_max;
+ t_float f_prev;
+ t_int resetflag;
+ t_float f_in, f_maxjump;
+ t_outlet *max, *min, *smooth;
+} t_steady;
+
+t_class *steady_class;
+
+void steady_float (t_steady *x, t_floatarg fin)
+{
+ if (x->resetflag == 0)
+ {
+ x->f_max = fin > x->f_max ? fin : x->f_max;
+ x->f_min = fin < x->f_min ? fin : x->f_min;
+ outlet_float(x->smooth, fin);
+ outlet_float(x->min, x->f_min);
+ outlet_float(x->max, x->f_max);
+ x->f_prev = fin;
+ x->resetflag=1;
+ }
+ else
+ {
+ float min = fin >= x->f_prev ? x->f_prev : fin;
+ float max = fin <= x->f_prev ? x->f_prev : fin;
+ fin = (max - min) > x->f_maxjump ? x->f_prev : fin;
+ x->f_max = fin > x->f_max ? fin : x->f_max;
+ x->f_min = fin < x->f_min ? fin : x->f_min;
+ float sm_fin = fabs(fin - x->f_prev) > x->f_maxjump ? x->f_prev : fin;
+ outlet_float(x->smooth, sm_fin);
+ outlet_float(x->min, x->f_min);
+ outlet_float(x->max, x->f_max);
+ x->f_prev = fin;
+ }
+}
+
+void steady_bang (t_steady *x)
+{
+ outlet_float(x->min, x->f_min);
+ outlet_float(x->max, x->f_max);
+ x->f_min = 1e08;
+ x->f_max = -1e08;
+ x->resetflag=0;
+}
+
+void *steady_new(t_floatarg f)
+{
+ t_steady *x = (t_steady *)pd_new(steady_class);
+ x->f_min = 1e08;
+ x->f_max = -1e08;
+ x->f_maxjump = f;
+ x->resetflag = 0;
+ x->f_prev = 0;
+ floatinlet_new(&x->x_obj, &x->f_maxjump);
+ x->max = outlet_new(&x->x_obj, gensym("float"));
+ x->min = outlet_new(&x->x_obj, gensym("float"));
+ x->smooth = outlet_new(&x->x_obj, gensym("float"));
+ return (void *)x;
+}
+
+void steady_setup(void) {
+ steady_class = class_new(gensym("steady"),
+ (t_newmethod)steady_new,
+ 0, sizeof(t_steady),
+ 0, A_DEFFLOAT, 0);
+ post("|+++++++++++++++++>steady<------------------|");
+ post("|+>max, min and through must not jump more<-|");
+ post("|+++++++++>than a specified amount<---------|");
+ post("|+++>edward<------->kelly<++++++++>2005<----|");
+ class_sethelpsymbol(steady_class, gensym("help-steady"));
+ class_addbang(steady_class, steady_bang);
+ class_addfloat(steady_class, steady_float);
+}