[music-dsp] Frequncy smear?
earlevel at earlevel.com
Fri Jan 12 11:55:27 EST 2001
Gee, Olli--I was hoping for enlightenment ;-)
OK, I'll shut up after sharing a few observations. First, Olli's DC blocker acts
like a differentiator at low frequencies, which removes DC completely but
changes to no effect as frequency goes up. I've seen that the cutoff is really
good--drops off hard below 1 Hz and doesn't do much above it. I'm not sure
offhand why that is, since the lowpass is set quite a bit higher--need to think
about that one.
Looks like this at low frequencies:
-------------- + --->
| ______ | -
| | | |
Looks like this at high freuencies::
A couple of other ways to DC block:
1) The way that koen wrote (a lowpass filtered input sibtracted form the input).
I've always done it this way, but wondered if I was missing something wrong with
it--I've never seen anyone else do it this way or mention of it on the web until
2) A differentiator (a zero at 1) and a pole very close to it, just inside the
unit circle. Essentially, the differentiator kills DC completely (it's a unit
delay of the input, then subtracted from the input), and the pole (aka leaky
integrator, lowpass) "almost" cancelling it out (except for very low frequencies
and DC). I see this a lot, including source code like synthesis toolkit).
Note that all of these methods have caveats in fixed point. The method Olli
shows won't work there, and the other two need the lowpass to be not too low
(offhand, 30 Hz is fine, but forget about 1 Hz). You can use noise shaping
(error feedback) to fix this and allow you to set the lowpass Fc lower if needed.
> [DC remover]
> You bastards took me my night's sleep!! :D
> On Fri, 12 Jan 2001, koen vos wrote:
> > > >The output is the original data with a low-tuned second order lowpass
> > > >filter output subtracted from it.
> > I agree; a 1st order high-pass filter that is everywhere within 1 dB of
> > Olli's filter is
> > Loop:
> > output(t) = 0.999 * output(t-1) + input(t) - input(t-1)
> "Ran a full test" to see it myself and yeah, this filter really works just
> as good and is faster than mine.. so don't spend more of your precious
> time with its mysteries! :)
dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
More information about the music-dsp