Csound Csound-dev Csound-tekno Search About

Re: FIR and IIR Filters

Date1998-04-28 03:57
FromMichael Gogins
SubjectRe: FIR and IIR Filters
>Being a bit of a convolution fan I have also often wondered how I would go
>about making one of those " single infinitely-narrow spike " as it might be
>fun to set one off in various accoustic environments to record the impulse
>response for use with convolution. Im sure it's simple enough to do in
Csound
>but I dont have any ideas on where to start. Any help would be truly great.


In Csound the closest you can get is sample 1 amplitude = 32767 all
subsequent samples amplitude = 0.

In taking impulse responses of halls, I don't know what the pros do, but I
suppose one of those starter pistols might serve, or clapping two flat
sticks of hard wood together.

Date1998-04-28 05:05
FromEli Brandt
SubjectRe: FIR and IIR Filters
Michael Gogins wrote:
> In taking impulse responses of halls, I don't know what the pros do, but I
> suppose one of those starter pistols might serve, or clapping two flat
> sticks of hard wood together.

A narrow amplitude-limited impulse has very little energy, so the
measured impulse response has lousy S/N.  If you had a signal x whose
autocorrelation were an impulse, you could measure
        y = x * hall    so that         x (*) y = x(*)x * hall = hall

What you do is you take a maximum-length sequence generated by a
shift-register PRNG and rescale it to +/-1.  Through some magic (it
falls out of the algebra, but I don't really know _why_), this has
almost the desired property.

I've heard the biggest gotcha is to watch out for temporal aliasing
(since you're using a finite periodic signal).  And don't measure on
the first period, since you're dealing with circular correlation...

-- 
     Eli Brandt  |  eli+@cs.cmu.edu  |  http://www.cs.cmu.edu/~eli/