[sdiy] Removing the effect of a DC blocking filter through DSP

Richie Burnett rburnett at richieburnett.co.uk
Sun Dec 11 20:21:01 CET 2022

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!)


-----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

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.

Synth-diy mailing list
Synth-diy at synth-diy.org
Selling or trading? Use marketplace at synth-diy.org 

More information about the Synth-diy mailing list