[sdiy] Removing the effect of a DC blocking filter through DSP
Mike Bryant
mbryant at futurehorizons.com
Sun Dec 11 20:29:27 CET 2022
> When working at frequencies of interest down near DC, FIR filters would also require a shed load of taps!)
Agreed. But when working down near DC it only takes a single bit of floating point rounding to move outside the unit circle. It sounded like the OP isn't doing it in real time so a 16384 tap FIR isn't than onerous to implement.
Another alternative is to use wavelet decomposition on the original signal, and then rebuild it altering each bin's gain co-efficient until you get the perfect squarewave/sawtooth you mentioned. Obviously you have to start with a reasonable guess on the correct gains but it is guaranteed stable, and a lot less computation.
________________________________
From: Synth-diy <synth-diy-bounces at synth-diy.org> on behalf of Richie Burnett <rburnett at richieburnett.co.uk>
Sent: 11 December 2022 19:21
To: Didrik Madheden <nitro2k01 at gmail.com>; SDIY List <synth-diy at synth-diy.org>
Subject: Re: [sdiy] Removing the effect of a DC blocking filter through DSP
Also forgot to emphasise the fact that I personally would recommend tackling
the compensation with an IIR filter. The original mechanism of the
DC-blocking action is "IIR" in nature, so it's best compensated using a
simple IIR "inverse filter" approximation. (FIR does have the age-old
advantage of guaranteed stability, but the phase response of FIR is
different to IIR, and it is often the phase response of DC-blocking stages
that results in much of the undesirable wave-shape mangling. When working
at frequencies of interest down near DC, FIR filters would also require a
shed load of taps!)
-Richie,
-----Original Message-----
From: Didrik Madheden via Synth-diy
Sent: Sunday, December 11, 2022 2:49 PM
To: SDIY List
Subject: [sdiy] Removing the effect of a DC blocking filter through DSP
Today the thing I'm tasked with is that I have some audio recorded
through a setup containing one or more DC blocking caps, and would
like to recover the unaffected audio. In principle, this could
potentially be fairly simple depending on the circuit: model a 1 pole
HP filter and run it backwards. Of course, the issue is that you would
be integrating over a fairly long period of time (in my case I'd need
to do it over multiple seconds) and the output is likely to diverge
easily. I'm able to produce a step function from this system as a
reference.
Before I roll up my sleeves and try to code something myself, is there
any project or code examples that does exactly this, in particular
automating or visualizing the trimming of the parameters needed to
avoid divergence? In the ideal case, such a software might have a
waveform view where I can select part of the reference waveform that's
silent, for extracting a corrective DC offset, and the pulse of my
reference step function, for extracting the filter parameters, and out
comes the parameters I need.
--
/Didrik
_______________________________________________
Synth-diy mailing list
Synth-diy at synth-diy.org
http://synth-diy.org/mailman/listinfo/synth-diy
Selling or trading? Use marketplace at synth-diy.org
_______________________________________________
Synth-diy mailing list
Synth-diy at synth-diy.org
http://synth-diy.org/mailman/listinfo/synth-diy
Selling or trading? Use marketplace at synth-diy.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20221211/a97c8bdd/attachment.htm>
More information about the Synth-diy
mailing list