On 11.04.2014, at 03:07, Alexandre Torres Porres wrote:

> hey, the code I sent only calculates the coeficients, but I left out an 
> important part which is 
> 
> t_sample output = *in++ + coef1 * last + coef2 * prev;
> 
>         *out++ = gain * output;
> 
>         prev = last;
> 
>         last = output;
> 
> 
> 
> This shows how the filter is done with those coefficients
> 
> 
> 
> It's easy to implement this with [fexpr~], it goes something like:
> 
> 
> 
> [fexpr~ $x + (coef1 * $x1[-1]) + (coef2 * $x1[-2])]

"last" and "prev" are the last two _output_ samples.
i don't know fexpr~ very well, but it looks like you try to access the last 
_input_ samples.
vb


_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to