Right, you need a band pass filter. The "filter" operator is really
simple and you might get much better results with
"filter.iir.butterworth.bandpass" I guess, with something like

filter.iir.butterworth.bandpass(frequency1=350., frequency2=5000., s)

(you might also want to play with the order param, the higher, the
sharper the filtering is). I think that doing a proper FFT would really
be too CPU-demanding and our filters are the one that are actually used
in most of the audio processing.

I'll try to write some doc (I've put a ticket on our bugtracker to
remember).

Cheers,

Samuel.


Jase wrote:
> I think you mean band pass (the noise seems to disappear round 350Hz, or
> maybe I'm wrong because I've not slept). In all honesty while a band
> pass filter to allow voice though would cut out the low frequency and
> high freq. noise, some of the nose round the voice area will get
> through. (I ended up doing a 5Khz low pass and 200Hz high pass using
> filter() which still left some noticeable nose, despite acting in the
> same way as a voice band-pass filter would)
> 
> I think nearly all of the noise can be stopped (if you do a FFT to get
> freq-amp domain, trim off the low values and do a inverse FFT to go back
> to the time-amplitude domain, it should be possible to remove the noise
> in a very clean way. (admittedly it probably incurs a lot more CPU,
> which for now isn't an issue)
> 
> Thanks for explaining Q, I was looking at the band pass versions of
> those filters and had little idea how Q worked (I assumed it was some
> way to specify the bandwidth). Maybe it would help others if this was
> reflected in the docs?.. . just a thought.
> 
> Jase.
> 
> On Thu, 2009-01-29 at 10:22 +0100, Samuel Mimram wrote:
>> Hi,
>>
>> Jase wrote:
>>> Basically I have some very quiet white / greyish noise (seems to be
>>> not too bad round 350Hz region) which I need to filter. I see all
>>> these IIR and FIR filters and they don't mean a thing to me, the other
>>> filters I know probably won't be what I'm after. The more noticeable
>>> elements seem to be mains hum (I have a spike at 60hz, and for some
>>> reason at 140 Hz) so mic_filter reduces it a little, but not
>>> sufficiently.
>> You're right, we should try to put some more doc about filters...
>>
>> What you need is a notch (or band-stop) filter, which removes the sound
>> around a given freq (350Hz in your case if I understood well). There are
>> several implementations of this in liquidsoap and you should play a bit
>> to see which fits you the best. If you source is "s" you should try one
>> of these
>>
>> filter(freq=350., q=1., mode="notch", s)
>> filter.iir.eq.notch(frequency=350., q=1., s)
>> filter.iir.resonator.bandstop(frequency=350., q=1., s)
>> filter.iir.butterworth.bandstop(frequency1=345., frequency2=355., s)
>>
>> The q factor controls the width of the frequency band you filter around
>> 350Hz (if q is lower, you filter more frequencies).
>>
>> I hope that helps.
>>
>> Cheers,
>>
>> Samuel.
>>
>> PS : to developers, we should check for parameters names consistency
>> some time ("freq" vs. "frequency", "notch" vs. "bandstop", etc.)
> 

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to