aboutsummaryrefslogtreecommitdiff
path: root/cyclone/sickle/rampsmooth.c
diff options
context:
space:
mode:
Diffstat (limited to 'cyclone/sickle/rampsmooth.c')
-rw-r--r--cyclone/sickle/rampsmooth.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cyclone/sickle/rampsmooth.c b/cyclone/sickle/rampsmooth.c
index c2023d8..848e304 100644
--- a/cyclone/sickle/rampsmooth.c
+++ b/cyclone/sickle/rampsmooth.c
@@ -3,8 +3,10 @@
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
#include "m_pd.h"
+#include "shared.h"
#include "sickle/sic.h"
+/* LATER select the mode fitter-optionally */
#define RAMPSMOOTH_GEOMETRIC /* geometric series (same as slide~) CHECKED */
#ifndef RAMPSMOOTH_GEOMETRIC
#define RAMPSMOOTH_LINEAR
@@ -82,8 +84,8 @@ static t_int *rampsmooth_perform(t_int *w)
}
else *out++ = target;
}
- x->x_last = last;
- x->x_target = target;
+ x->x_last = (PD_BIGORSMALL(last) ? 0. : last);
+ x->x_target = (PD_BIGORSMALL(target) ? 0. : target);
x->x_incr = incr;
x->x_nleft = nleft;
return (w + 5);
@@ -120,7 +122,7 @@ static t_int *rampsmooth_perform(t_int *w)
}
*out++ = last = f;
}
- x->x_last = last;
+ x->x_last = (PD_BIGORSMALL(last) ? 0. : last);
return (w + 5);
}
#endif