DC offset removal

The “Normalize” effect provides an option for “DC Offset” correction, but does this do what we expect?

DC Offset occurs when the recorded signal is incorrectly biased so that it is not centred on the 0.0 centre line. This may be caused by faulty hardware allowing a DC voltage to leak into the signal or other factors and DC Offset correction is designed to repair this.

It appears that inside Audacity the DC Offset correction does exactly as described on the interface: “centre on 0.0 vertically”
That is, it adjusts the waveform vertically so that the average sample value is zero.
It does not necessarily set silent parts to 0.0

In this image we see the waveform of a drum beat. Notice how the initial peak is the largest and is negative.
screenshot.png
Zooming in we can see that the silence between drum beats is at 0.0
screenshot.png
However the fact that the initial peak is consistently the highest amplitude and negative causes the average sample value to be negative, so if we apply DC Off-set correction then the silence becomes shifted upward to compensate (as can be seen in this image)
screenshot.png

Yes, we do need to be careful of our expectations. Square waves of appropriate frequencies will go through a sound system successfully. It’s one of the audio tests. Waves need not be symmetrical, either. There is one announcer on KPCC that I can pick out in the middle of an hour show because her voice patterns go negative. unlike everybody else.

After a great deal of arithmetic we also know that you can’t tell the DC is missing until you look at a full second or more of the show. Microscopic analysis of a small fraction of a second will tell you nothing, or worse make you come to bad conclusions.

Even more science fiction oddness can be had by knowing you will get what you probably expected all along by applying a filter that deletes everything below audibility – probably around 15 Hz or so, clearly not DC or battery voltage. That filter will, or should give you the drum tracks that settle with “zero” between them no matter what the rest of the sound channel is doing.

This is why sound channels that go beyond audibility, 20 Hz to 20,000 Hz in either direction are extraordinarily dangerous. Shows that contain battery voltages are just as damaging as ones that contain interference from the local radio station.

Koz

Yes that provides a good alternative to DC Off-Set removal in such cases, though it leaves a bit of a wiggle at the very beginning of the track so it should be applied before trimming silence from the beginning of the recording.

A simple way to apply a low frequency “high pass filter” for anyone that does not have the high-pass filter plug-in is to use the Nyquist prompt. Select the track, then choose “Nyquist prompt” from the effects menu and enter the following command:

(hp s 20)

This applies a high-pass filter to the sound (mono or stereo) at a frequency of 20Hz.

Filtering out ultra high frequencies can be done a similar way with

(lp s 16000)

(low-pass filter at 16kHz). Of course, the sampling rate itself imposes a restriction on the upper frequency (the highest frequency possible at a given sample rate is less than half of the sampling frequency), but the real problems that occur from picking up RF are not from recording those ultra high frequencies, but weird types of modulation that they can cause in the recorded audio.

Whether we are looking at frequencies above or below the audio band, it is far better to eliminate them from the source rather than trying to correct them later.