aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Henry <nusmuk@users.sourceforge.net>2008-06-27 09:59:50 +0000
committerCyrille Henry <nusmuk@users.sourceforge.net>2008-06-27 09:59:50 +0000
commit942ebc2400c2bf910f0c7a71cb2165365962b498 (patch)
treef18716f2eb9ac397197dd40b651c0d3629e38777
parent7db9cddd23589b0fb92c256acc03c989e1ede35d (diff)
svn path=/trunk/externals/nusmuk/; revision=10114
-rw-r--r--tab/tabosc4aa~.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tab/tabosc4aa~.c b/tab/tabosc4aa~.c
index 8ebf5b8..fece19f 100644
--- a/tab/tabosc4aa~.c
+++ b/tab/tabosc4aa~.c
@@ -143,13 +143,13 @@ static t_int *tabosc4aa_tilde_perform(t_int *w)
#if 1
while (n--)
{
- t_sample frac, a, b, c, d, cminusb, temp, filter_out;
+ t_sample frac, a, b, c, d, cminusb, temp, sum, filter_out;
- temp = 0;
- for (i=0;i<8;i++)
+ sum = 0;
+ for (i=0;i<4;i++)
{
tf.tf_d = dphase;
- dphase += *in/8 * conv;
+ dphase += *in/4 * conv;
addr = tab + (tf.tf_i[HIOFFSET] & mask);
tf.tf_i[HIOFFSET] = normhipart;
frac = tf.tf_d - UNITBIT32;
@@ -168,15 +168,16 @@ static t_int *tabosc4aa_tilde_perform(t_int *w)
// temp = cut_filter(x, temp);
// t_sample filter_out;
- filter_out = 0.0147491 * temp + 0.0294982 * x->x_last_in + 0.0147491 * x->x_prev_in + 1.60425 * x->x_last_out - 0.663244 * x->x_prev_out;
+ filter_out = 0.0603297 * temp + 0.120659 * x->x_last_in + 0.0603297 * x->x_prev_in + 1.1565 * x->x_last_out - 0.397817 * x->x_prev_out;
x->x_prev_in = x->x_last_in;
x->x_last_in = temp;
x->x_prev_out = x->x_last_out;
x->x_last_out = filter_out;
+ sum += filter_out;
}
- *out++ = filter_out;
+ *out++ = sum/4;
*in++;
}
#endif