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

Mattias Rickardsson mr at analogue.org
Mon Dec 12 14:01:45 CET 2022

Interesting problem, Didrik!

A quick spontaneous thought that I haven't even fully analysed yet, let
alone tried out...

OK, so the typical DC-block droop makes the flat parts of a signal become
droopy, as everything decays towards zero. But what would happen if you'd
send the signal once again through the filter, but time-reversed? I.e.,
turning a digital recording around in time, and then DC-block-filtering it
again. Would it become less ugly, more clear, and perhaps even more

Thinking about it a second more... I guess the "phase errors" introduced by
the first filtering would cancel out fully, since the same phase errors are
introduced once again but with opposite sign (due to time reversal). In
this respect I guess it would look like it's been FIR-filtered (symmetric
behaviours in time domain, no asymmetric droops) instead of
analog-/IIR-filtered. But the actual filtering in amplitude would become
doubled, so if the DC-blocking is 1-pole, then the response is now 2-pole.
Would it make it more useful in terms of understanding the looks of the

Don't know if this helps at all! :-)


On Mon, 12 Dec 2022 at 11:11, Didrik Madheden via Synth-diy <
synth-diy at synth-diy.org> wrote:

> On Sun, 11 Dec 2022 at 20:53, Gordonjcp <gordonjcp at gjcp.net> wrote:
> > Which console?
> >
> > Why not just pick audio up directly from the output of the sound chip?
> It's the original Gameboy, and the quirk in question is that the
> amplitude setting of one of the channels is sometimes glitchy (called
> "zombie mode" in the community) so what I needed to do was measure
> amplitude levels fairly precisely. In the last couple of years people
> have started to reverse engineer the hardware from die shots, so now
> we're validating theories of what the hardware should do in very
> specific situations, theorized based on looking at reverse engineered
> schematics.
> Right now I'm just inspecting the waveforms by eye, and the sloped
> waveforms threw me off enough that I wasn't confident in my readings.
> It's a totally reasonable thing to do in my case to probe the signal
> directly from the chip. The reason for not doing so initially was
> pretty "analog". I don't have an oscilloscope at home and I didn't
> feel like leaving home in the freezing weather on a Sunday to go to a
> lab that I have access to unless I really needed to. And I thought the
> question was sufficiently interesting to bring it up on this list, in
> case someone had any good advice, which of course people did.
> In the end I did a really simple integration technique with hand tuned
> constants to correct the signal recorded from the soundcard, and this
> worked well enough to where I could read the waveform and extract the
> information I needed.
> a=200000000
> igain=.0000000000339
> tmp=0
> for i in range(len(samples_in)):
>   samp_in=samples_in[i]
>   tmp+=samp_in*a
>   samples_out[i]=samp_in+tmp*igain
> --
> /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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20221212/fa90a70a/attachment.htm>

More information about the Synth-diy mailing list