aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Henry <nusmuk@users.sourceforge.net>2008-06-26 15:50:10 +0000
committerCyrille Henry <nusmuk@users.sourceforge.net>2008-06-26 15:50:10 +0000
commit370ef738dd8435a1d3f28703e57c111687b30934 (patch)
tree3e2b7a5a07994470055438f088c9f5acd2949505
parent87fd5886f1c162922a9d86ec56faa9e1f7f44b67 (diff)
svn path=/trunk/externals/nusmuk/; revision=10107
-rwxr-xr-xtab/makefile2
-rw-r--r--tab/tabosc4c~.c17
2 files changed, 13 insertions, 6 deletions
diff --git a/tab/makefile b/tab/makefile
index 7f58099..1ae94c1 100755
--- a/tab/makefile
+++ b/tab/makefile
@@ -57,7 +57,7 @@ SGICFLAGS6 = -n32 -DPD -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \
# ----------------------- LINUX i386 -----------------------
-pd_linux: tabosc4c~.pd_linux tabread4c~.pd_linux tabosc4cloop~.pd_linux tabosc4h~.pd_linux
+pd_linux: tabosc4c~.pd_linux tabread4c~.pd_linux tabosc4cloop~.pd_linux tabosc4h~.pd_linux tabosc4l~.pd_linux tabosc4aa~.pd_linux
.SUFFIXES: .pd_linux
diff --git a/tab/tabosc4c~.c b/tab/tabosc4c~.c
index 406f770..f4a5a66 100644
--- a/tab/tabosc4c~.c
+++ b/tab/tabosc4c~.c
@@ -126,7 +126,7 @@ static t_int *tabosc4c_tilde_perform(t_int *w)
int n = (int)(w[4]);
int normhipart;
union tabfudge tf;
- double a0,a1,a2; // CH
+ double a3,a1,a2; // CH
t_float fnpoints = x->x_fnpoints;
int mask = fnpoints - 1;
t_float conv = fnpoints * x->x_conv;
@@ -157,10 +157,17 @@ static t_int *tabosc4c_tilde_perform(t_int *w)
// cminusb - 0.1666667f * (1.-frac) * (
// (d - a - 3.0f * cminusb) * frac + (d + 2.0f*a - 3.0f*b) ) );
// CH
- a0 = d - c - a + b;
- a1 = a - b - a0;
- a2 = c - a;
- *out++ = ((a0*frac+a1)*frac+a2)*frac+b;
+// a0 = d - c - a + b;
+// a1 = a - b - a0;
+// a2 = c - a;
+// *out++ = ((a0*frac+a1)*frac+a2)*frac+b;
+
+ // 4-point, 3rd-order Hermite (x-form)
+ a1 = 0.5f * (c - a);
+ a2 = a - 2.5 * b + 2.f * c - 0.5f * d;
+ a3 = 0.5f * (d - a) + 1.5f * (b - c);
+
+ *out++ = ((a3 * frac + a2) * frac + a1) * frac + b;
}
#endif