Commit 0f5d6a7f authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

remove trailing whitespace

parent a2f6e606
...@@ -526,24 +526,24 @@ static t_int *tabosc4_tilde_perform(t_int *w) ...@@ -526,24 +526,24 @@ static t_int *tabosc4_tilde_perform(t_int *w)
t_sample *freq = (t_sample *)(w[2]); t_sample *freq = (t_sample *)(w[2]);
t_sample *out = (t_sample *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int vecsize = (int)(w[4]); int vecsize = (int)(w[4]);
int loopmask = x->looplength - 1; int loopmask = x->looplength - 1;
int index = 0; int index = 0;
t_float baseincrement = x->oneoversamplerate * (t_float)x->looplength; t_float baseincrement = x->oneoversamplerate * (t_float)x->looplength;
double tabphase = x->tabphase; double tabphase = x->tabphase;
t_word *ptab = x->array; t_word *ptab = x->array;
t_float frac = 0., a, b, c, d, cminusb; t_float frac = 0., a, b, c, d, cminusb;
t_float endfreq = freq[vecsize-1]; t_float endfreq = freq[vecsize-1];
if (!ptab) goto zero; if (!ptab) goto zero;
while (vecsize--) while (vecsize--)
{ {
index = (tabphase >= 0.? (int)tabphase : (int)tabphase - 1); index = (tabphase >= 0.? (int)tabphase : (int)tabphase - 1);
frac = (GOODINT(index)? tabphase - index : 0.); frac = (GOODINT(index)? tabphase - index : 0.);
index &= loopmask; index &= loopmask;
tabphase += *freq++ * baseincrement; tabphase += *freq++ * baseincrement;
// interpolation // interpolation
a = ptab[index].w_float; a = ptab[index].w_float;
b = ptab[index+1].w_float; b = ptab[index+1].w_float;
...@@ -553,10 +553,10 @@ static t_int *tabosc4_tilde_perform(t_int *w) ...@@ -553,10 +553,10 @@ static t_int *tabosc4_tilde_perform(t_int *w)
*out++ = b + frac * (cminusb - 0.166666666666667 * *out++ = b + frac * (cminusb - 0.166666666666667 *
(1.-frac) * ((d - a - 3.0 * cminusb) * frac + (d + 2.0*a - 3.0*b))); (1.-frac) * ((d - a - 3.0 * cminusb) * frac + (d + 2.0*a - 3.0*b)));
} }
x->tabphase = frac + index + (endfreq * baseincrement); // wrap phase state x->tabphase = frac + index + (endfreq * baseincrement); // wrap phase state
return (w+5); return (w+5);
zero: zero:
while (vecsize--) *out++ = 0; while (vecsize--) *out++ = 0;
return (w+5); return (w+5);
...@@ -566,7 +566,7 @@ void tabosc4_tilde_set(t_tabosc4_tilde *x, t_symbol *s) ...@@ -566,7 +566,7 @@ void tabosc4_tilde_set(t_tabosc4_tilde *x, t_symbol *s)
{ {
t_garray *a; t_garray *a;
int looplength, pointsinarray; int looplength, pointsinarray;
x->arrayname = s; x->arrayname = s;
if (!(a = (t_garray *)pd_findbyclass(x->arrayname, garray_class))) if (!(a = (t_garray *)pd_findbyclass(x->arrayname, garray_class)))
{ {
...@@ -602,7 +602,7 @@ static void tabosc4_tilde_dsp(t_tabosc4_tilde *x, t_signal **sp) ...@@ -602,7 +602,7 @@ static void tabosc4_tilde_dsp(t_tabosc4_tilde *x, t_signal **sp)
{ {
x->oneoversamplerate = 1. / sp[0]->s_sr; x->oneoversamplerate = 1. / sp[0]->s_sr;
tabosc4_tilde_set(x, x->arrayname); tabosc4_tilde_set(x, x->arrayname);
dsp_add(tabosc4_tilde_perform, 4, x, dsp_add(tabosc4_tilde_perform, 4, x,
sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment