Re: [LAD] Jack buffer management for block convolution

From: <fons@email-addr-hidden>
Date: Mon Jun 14 2010 - 13:16:11 EEST

On Mon, Jun 14, 2010 at 02:17:30PM +1000, Damien Zammit wrote:

> The algorithm I am using is the standard overlap-add method of block
> convolution as defined in Oppenheim and Schafer 1989. Basically, I take a
> FIR filter of length M taps, zero pad to N=L+M-1 where L is the length of my
> sub-block of convolution. Also zero pad L inputs up to to N, then convolve
> these N inputs with the zero padded filter.
> The first M-1 outputs are added to the last M-1 outputs from the previous
> block, and the output of the current block is truncated to L samples (from
> N).

If the lenght of your filter is M, and the jack period is P,
then in each process callback you have to compute the convolution
of M filter taps and P samples. The result has M + P - 1 samples,
no matter how it is done.

The position of this block of M + P - 1 samples in the output
stream advances by steps of P samples. You need an extra buffer
to store and accumulate the part of each convolution that can't
be output in the current cycle.

Ciao,

-- 
FA
O tu, che porte, correndo si ?
E guerra e morte !
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Jun 14 16:15:02 2010

This archive was generated by hypermail 2.1.8 : Mon Jun 14 2010 - 16:15:02 EEST