[LAD] Help with frequency domain filtering basics

Olivier Guilyardi list at samalyse.com
Thu Nov 26 22:30:27 UTC 2009


Hi Fons :)

On 11/25/2009 09:32 PM, fons at kokkinizita.net wrote:

> process (input, output)
> {
> // both input, output are of size fftsize/2
> 
> 1.   R1 <= IP * W1
> 2.   R2 <= input * W2
> 3.   IP <= input
> 4.   FFT, callback, IFFT
> 5.   output <= (R1 + OP) * scale
> 6.   OP <= R2
> }

Now, that works ! I'm attaching the fixed code for the records.

I've tried hard to understand where the problem was, and one thing I'm sure
about is that you fft'ize a given block of input twice, once with the ascending
part of the window applied (in R1), then again the same block of data multiplied
with the descending part of the window (in R2).

I'm still far from properly understanding these matters and I was indeed not
doing this. In my code, a given block of fftsize/2 input frames was either
multiplied with the ascending or the descending half-window, but not by both
subsequently, which obviously resulted in a loss of information.

Now, how I managed to get this running in Octave is a mistery to me ;)

Anyway you method did solve my problem, and I now still have a lot of work,
because I need all of this to run with integers (fixed point fft) and the joys
of overflow..

Thanks!

--
  Olivier


-------------- next part --------------
A non-text attachment was scrubbed...
Name: transform.c
Type: text/x-csrc
Size: 2691 bytes
Desc: not available
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20091126/e2c0a50e/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: transform.h
Type: text/x-chdr
Size: 554 bytes
Desc: not available
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20091126/e2c0a50e/attachment.h>


More information about the Linux-audio-dev mailing list