Remove DC offset/bias with Vegas Pro 12?

cbrillow wrote on 2/6/2014, 7:35 PM
I have some video files that have a minor DC offset in the audio channels, and would like to remove it. Back in my 32-bit days, I ran Vegas 5 thru 10, and used Cool Edit 2000 as my external audio editor for noise removal and other miscellaneous problems, like DC offset.

But now I'm on VP-12, and in the 64-bit world and currently have no default external audio editor. (Haven't tried to install the old 32-bit Cool Edit 2000 or Cool Edit Pro...) I naively thought that Vegas might have the ability to remove DC offset, but I can't find any reference to it in the Help file. Maybe this is relegated to Sound Forge?

I did a search on the 'net and came up with an aging 32-bit DirectX plugin called dcoffset, from AnalogX. I installed it to the recommended default directory, but Vegas doesn't list it in the audio plugins listings. At startup, Vegas flies past the 'Initializing DirectX Plugins' stage, so it's at least not choking on it.

Any suggestions on removing the DC offset in Vegas, using a different tool for that purpose, or determining why Vegas doesn't see the dcoffset DirectX plugin, would be greatly appreciated.


john_dennis wrote on 2/6/2014, 9:07 PM
I don't find an audio effect to remove DC Offset in Vegas Pro 12 (64 bit). I have Sound Forge 9 (a 32 bit application) installed and it is prominently available in Sound Forge.

Perhaps it's time to set up a default audio editor for this kind of work even if the programs are old. Wav files are old, too.
musicvid10 wrote on 2/7/2014, 12:40 AM
DC offset is only a factor if you will be doing other processing. It does not affect playback directly.
As said by jd, this is best done in Sound Forge.
John_Cline wrote on 2/7/2014, 3:39 AM
You can use "Track EQ" and set Frequency to "20", Gain to "-Inf", and Rolloff to "24", this will remove any DC Offset on your tracks.
cbrillow wrote on 2/7/2014, 2:58 PM
Thank you all for your input. A few comments:

* As a retiree who primarily works with audio and video as a hobby, it's hard to justify the purchase of Sound Forge to perform basically one function.

* Musicvid10, my experience has been that DC offset in audio files produces an audible click at edit points. I suppose the click could be reduced or eliminated by enabling the quick-fade at edit points, but I'd rather get rid of it entirely. When I see DC offset, it waves the 'something is wrong here' flag...

* John_Cline, I tried your suggestion and didn't see any difference. I tried it first on the event, then on the mixer output, just listening for the click to go away at the beginning of playback. (It did not.) Maybe I should have rendered to a file or new track to check the levels visually, but didn't take it that far. May do that as an exercise later. Don't like not knowing why things don't work as you expect them to...

What I ended up doing was scrounging up my old Cool Edit 2000 installation disc, serial number and registration program. At first blush, it appears that 32-bit CE2K runs just fine under 64-bit Windows 8. Maybe I'll run into problems somewhere, but it's now ensconced as my default audio editor in Vegas 12 and takes care of the original problem.
Steve Mann wrote on 2/7/2014, 4:40 PM
Just curious, but where are you seeing a DC offset?
John_Cline wrote on 2/7/2014, 6:20 PM
This has nothing to do with DC-offset, a click at an edit indicates that the edit is not occurring at the zero crossing of the audio waveform, this is why the quick-fade feature at edits is enabled by default. Just turn it back on.
musicvid10 wrote on 2/7/2014, 9:03 PM
Zoom out to full level, and cut at zero crossings. Fade a few samples if one channel is not close. You should be able to find free editors with DC offset control, but that won't fix cuts made at random places in the waveform.
cbrillow wrote on 2/8/2014, 12:14 PM
@Steve Mann:

DC offset shows up on the timeline, as shown below:

Rob Franks wrote on 2/8/2014, 1:23 PM
"This has nothing to do with DC-offset, a click at an edit indicates that the edit is not occurring at the zero crossing of the audio waveform, this is why the quick-fade feature at edits is enabled by default. Just turn it back on."

But that's the problem with having a DC offset. You can't cut at the zero crossing very well because of a DC voltage mixed into the signal which keeps the entire wave off the 0 volt line.
john_dennis wrote on 2/8/2014, 1:54 PM
Seeing your pictures took me back to the 70s when amplifier manufacturers (and some of us circuit tinkerers) loved to brag about using direct-coupled amplifiers where there were no capacitors in the signal path. One potential downside was that bias could drift and produce a non-zero DC output with a zero input.

It may be time to give some thought to where the offset is coming from.
Rob Franks wrote on 2/8/2014, 3:38 PM
Funny, that's what I was thinking. Used to see dc offset all the time.... 30 years ago
larry-peter wrote on 2/8/2014, 5:55 PM
I haven't run into visible DC offset in a long time (as in the screenshot above), but in the days of DAT, ADAT, prosumer reel-to-reels that would come in for mixing it was sometimes worse than pictured. Any time I need to take a track into Sound Forge (or any external editor capable of it) I always remove DC out of habit.

In the case of the screenshot, the biggest issue for me is how much the offset is limiting the dynamic range if not removed before processing. If that's a Vegas timeline that's gotta be more than 3db from zero! I haven't tried the low EQ rolloff approach, and I see how that would reduce what's basically a 0hz standing wave, but I don't understand how it would address the actual offset of the entire waveform. Zero would still crossed by what were originally non-zero energy levels.

Edit: And if you want to see your speakers do a neat trick, just cut out a section of DC offset and normalize it. SERIOUSLY, don't. I'm just kidding.
VidMus wrote on 2/8/2014, 9:50 PM
Audacity will normalize and remove the DC offset.
John_Cline wrote on 2/8/2014, 11:05 PM
"John_Cline, I tried your suggestion and didn't see any difference."

Well, you wouldn't see any difference in the audio waveform display on the timeline as it shows the waveform of the original file.
Rob Franks wrote on 2/8/2014, 11:53 PM
"Well, you wouldn't see any difference in the audio waveform display on the timeline as it shows the waveform of the original file. "

Judging by your above comments I'm not sure you understand what a dc voltage offset is.

The entire sound wave is riding on a positive (or negative) DC voltage. The zero crossings on the wave do not match up to the zero crossing on the graph. As a result there is a voltage spike (clicking) even when you cut on the zero crossing line because of the dc voltage involved. A quick fade will not work in this case. Even if you fade out the wave at the cut, you will still have the dc voltage to contend with. To remove the dc offset you must in essence apply an equal and opposite dc voltage to zero out the wave form.
John_Cline wrote on 2/9/2014, 3:36 AM
Rob, I FULLY understand what DC offset is, I've been involved with digital audio since 1975 when I helped design the 88MU-1 A/D D/A board for the Altair 8800 computer.

The original question was how to remove DC offset from a file using only Vegas. I suggested setting a 20hz high-pass (low shelf) filter using the Track EQ, which should remove the DC offset. The original poster said that he applied the filter but did not see any difference, which I assumed meant that he visually looked at the audio waveform on the Vegas timeline and the DC offset was still there. My comment was that he would not visually see the results of the filter since the timeline was still showing the original waveform, rendering to a new track would show the result.

Since I use Sound Forge for my audio processing, what I did not realize is that the Sony Track EQ low-shelf filter in Vegas does not remove all the DC offset but only reduces it. If the file has a constant amount to DC offset, then adding or subtracting a fixed offset will indeed null the offset, however, many of the old digital files I work on (recorded on PCM-F1 and 601 digital processors) have a slightly varying amount of DC offset within the file and a Waves high-pass filter will completely remove the DC component. Bottom line, my suggestion to use Track EQ to remove DC offset was valid in theory but, ultimately, not the best advice I've ever dispensed on the Vegas forum.
paul_w wrote on 2/9/2014, 7:06 AM
John was absolutely correct in suggesting an EQ plugin with 20Hz roll off to remove DC. The trouble here is that Vegas is not emulating what a real analog EQ would do. And the fact that it only 'reduces' the DC is just plain weird!.. never mind.
What's needed is a 'software capacitor'. I mean a plugin that removes dc like a capacitor would. Try a few EQ plugins and experiment to see if they do remove DC. Seems the Sony one does not.
Another way to look at this, if all your audio clips have the same DC offset, cutting from clip to clip should be fine, with minimal or no click at all. The trouble then would only be start and end of whole clip on the timeline, not individual clips. If thats the case, then its simply a case of fade in / fade out the audio at start and end of timeline. Your DC offset will fade from zero and to zero with no click.

Edit: worth mentioning that if you are trying 32 bit plugins for DC removal, like EQs or the AnalogX one linked above, you'll need to be running a 32 bit version of Vegas to see them.
cbrillow wrote on 2/9/2014, 9:26 AM
I was in the middle of composing another response immediately after posting the waveforms picture yesterday, but was interrupted and unable to finish it. So I'll start over. There have been a couple of subsequent posts, homing in on points that I was going to make.

With respect to this post about dcoffset.exe from analogx, I mentioned in the thread starter that I had already downloaded and installed it, but VP 12 did not recognize it as a directX plugin. paul_w has suggested that only 32-bit versions of Vegas can use it. Sound reasonable, to me. Thanks, paul_w.

Rob_Franks, you then go on to say precisely the point I was going to make in my prematurely-aborted post, that, in my situation, the DC offset has nearly everything to do with the audible click. As you can see from the Vegas timeline image I posted, the cuts are occurring during portions of the video that are supposed to be silent. As it turns out, there's also a bit of 60/120hz noise in the signal, so the waveform isn't 'flatlined', but here are no zero-crossing excursions at which to make the cut.

atom12 also made referenced an issue I was going to raise. With that much of a DC offset, many of the peaks in the file are biased dangerously close to clipping, especially on the left channel. The snippet I've shown doesn't really make that clear, but atom12 picked up on it...

John_Cline, you are correct that I used the word "see" in a very precise context. I was not surprised that it'd not displayed visually on the timeline after putting in about 10 seconds of thought about that. I didn't take the time to render to a new track or output file, which would have provided a visual confirmation that the advised EQ setting worked as-advertised.

I agree that fades -- either quick-fades or manual variety -- will successfully suppress the clicks. My bottom line was that I wanted the DC offset 'outta there', mainly because I want to see the file's flatlines sitting at 0db on the timeline before doing any additional processing on the audio.

I also agree with paul_w's postulate that any cuts made in this file that has a constant DC offset throughout, should not produce significant artifacts, because they're all at the same level and no zero-crossings are made at those points, cuts or no cuts. I haven't actually tried this to confirm it, but think our suspicious would be justified, if I did. (unless Vegas tossed a curveball for some odd reason)

At this point, I'd like to thank everyone for your contributions. Since the installation of Cool Edit 2K as my default audio editor -- thank goodness this old chestnut runs under 64-bit Windows & Vegas! -- I have the solution I was looking for. I've enjoyed the discussion and learned a little along the way. It was interesting to see that Audacity will apparently take care of it, too. Given that it's not exactly abandonware, like Cool Edit, it may be wise that I learn it at some point and make the change before something else blows up.

Finally, one more comment about the cleaned-up waveform. You may have noticed that the buzz/hum is also missing in the lower track. I used the noise reduction functionality in Cool Edit to get rid of that, and the DC offset also disappeared as a 'side effect'. I expected to have to perform a separate operation, but got 'two-for-the-price-of-one' with noise reduction!
SecondWind-SK wrote on 2/9/2014, 5:34 PM
FYI Audition 3.0 (32-bit) also runs fine on my 64-bit computer.
paul_w wrote on 2/9/2014, 5:46 PM
32bit applications will run in Windows 64bit. But 32 bit plugins will not work in 64 bit NLEs.

NormanPCN wrote on 2/9/2014, 7:18 PM
But 32 bit plugins will not work in 64 bit NLEs.

Not directly, but Vegas does work with 32-bit plug-ins of specific kinds.
Vegas has a 32-bit program, FileIoSurrogate, which it uses to bridge to 32-bit plug-ins from 64-bit Vegas.

Quicktime is 32-bit.
The Sony MP3 decoder is 32-bit.
VST audio plug-ins can be 32-bit AFAIK.
I cannot comment on DirectX audio plug-ins.
paul_w wrote on 2/10/2014, 3:21 AM
Interesting, never seen a 32 bit loaded in 64 Vegas before. I have been writing some pluggins and always have to compile for both 64 and 32 bit versions for them to work on both types. Maybe there is a away around it then.. I must investigate! Another thread perhaps.