It was a dark and stormy night. I was rudely awakened at 3 AM by the ringing of a phone, pounding my brain like a jackhammer that spent way too much time chowing down at Starbucks. The voice on the other end was Pinky the engineer, and he sounded as panicked as a banana slug in a salt mine. “Anderton, some headroom’s missing. Vanished. I can’t master one track as hot as the others on the Kiss of Death CD. Checked out the usual suspects, but they’re all clean. You gotta help.”
Like an escort service at a Las Vegas trade show, my brain went into overdrive. Pinky knew his stuff…how to gain-stage, when not to compress, how to master. If headroom was stolen right out from under his nose, it had to be someone stealthy. Someone you didn’t notice unless you had your waveform Y-axis magnification up. Someone like…DC Offset.
Okay, so despite my best efforts to add a little interest, DC offset isn’t a particularly sexy topic. But it can be the culprit behind problems such as lowered headroom, mastering oddities, pops and clicks, effects that don’t process properly, and other gremlins.
DC Offset in the Analog Era
We’ll jump into the DC offset story during the 70s, when op amps became popular. These analog integrated circuits pack a tremendous amount of gain in a small, inexpensive package with (typically) two inputs and one output. Theoretically, in its quiescent state (no input signal), the ins and out are at exactly 0.00000 volts. But due to imperfections within the op amp itself, sometimes there can be several millivolts of DC present at one of the inputs.
Normally this wouldn’t matter, but if the op amp is providing a gain of 1000 (60dB), a typical 5 mV input offset signal would get amplified up to 5000mV (5 volts). If the offset appeared at the inverting (out of phase) input, then the output would have a DC offset of –5.0 volts. A 5mV offset at the non-inverting input would cause a +5.0 DC offset.
There are two main reasons why this is a problem.
- Reduced dynamic range and headroom. An op amp’s power supply isbipolar (i.e., there are positive and negative supply voltages with respect to ground). Suppose the op amp’s maximum undistorted voltage swing is ±15V. If the output is already sitting at, say, +5V, the maximum voltage swing is now +10/-20V. However, as most audio signals are usually symmetrical around ground and you don’t want either side to clip, the maximum voltage swing is really down to ±10V—a 33% loss of available headroom.
- Problems with DC-coupled circuits. In a DC-coupled circuit (sometimes preferred by audiophiles due to superior low frequency response), any DC gets passed along to the next stage. Suppose the op amp mentioned earlier with a +5V output offset now feeds a DC-coupled circuit with a gain of 5. That +5V offset becomes a +25V offset—definitely not acceptable!
Now let’s take a closer look at some other cases…
There are three main ways to solve DC offset problems with software-based digital audio editing programs.
- Most pro-level digital audio editing software includes a DC offset correction function, generally found under a “processing” menu along with functions like change gain, reverse, flip phase, etc. This function analyzes the signal, and adds or subtracts the required amount of correction to make sure that 0 really is 0. Many sequencing programs also include DC offset correction as part of a set of editing options (Fig. 3).
- Apply a steep high-pass filter that cuts off everything below 20Hz or so. (Even with a comparatively gentle 12dB/octave filter, a signal at 0.5Hz will still be down more than 60dB). In practice, it’s not a bad idea anyway to nuke the subsonic part of the spectrum, as some processing can interact with a signal to produce modulation in the below 20Hz zone. Your speakers can’t reproduce signals this low and they just use up bandwidth, so nuke ’em.
- Select a 2—10 millisecond or so region at the beginning and end of the file or segment with the offset, and apply a fadein and fadeout. This will create an envelope that starts and ends at 0, respectively. It won’t get rid of the DC offset component within the file (so you still have the restricted headroom problem), but at least you won’t hear a pop at transitions.
Granted, DC offset usually isn’t a killer problem, like a hard disk crash. In fact, usually there’s not enough to worry about. But every now and then, DC offset will rear its ugly head in a way that you do notice. And now, you know what to do about it.
To read the full detailed article please see: DC Offset