Re: [linux-audio-dev] newbie has problems with FIR filters

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] newbie has problems with FIR filters
From: David Olofson (david_AT_gardena.net)
Date: Sat Mar 03 2001 - 10:43:06 EET


On Thursday 01 March 2001 19:18, Remco Poelstra wrote:
> Hi,
>
> I'm a bit new to audio programming.
> A litle program I'm working on does some FIR-filtering.
> Every thing is converted from integers to reals (in the range from
> 0 to 1) and back to integers to be writen to file.
> The samples and the FIR-filter data is so small, that when the
> FIR-filter is aplyed and the reals are converted back to integers,
> there are only zero's.
>
> What can I do to solve this?
> (I like to keep the samples real)

Looks like the same silly mistake I do every time I write some
floating point DSP code - forgetting to scale the float values back
up to the integer range *before* the conversion. :-)

Anyway, why not just keep the natural range of the integer input?
Saves some scaling, and doesn't affect linear DSP algorithms.

(In a bigger system, however, it makes sense to specify a sensible "0
dB reference level" - amplitude 1.0, for example - for nonlinear
algos to have an idea about what they should expect to see. Using an
"arbitrary" value such as 32768 doesn't seem to be a good idea,
considering that lots of people use >16 bit audio data these days...)

//David

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> david_AT_linuxdj.com -'


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sat Mar 03 2001 - 11:07:07 EET