Help - Search - Members - Calendar
Full Version: DC offset correction
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Casius
Hi, this is my first post in this portal but I've been following it since the very beginning, so it's not like I'm a newbie, so... here it goes

I've been reading about dc offsets and found out that an incorrect offset in the wave might lead to some distortion (some rumbling in the bass), and that it could even be overemphazised when adding some effects to the sound, like echo, compression, dynamics, even changing the volume to the near top or top of the range, so I thought "Foobar2k's about the ultimate best quality sound even if we cant actually hear it laugh.gif", I think a plugin that corrects the dc offset and save it in a apev2 tag might solve the problem and we could have an even better sounding file, and the warm-fuzzy-feeling when using some of those plugins (dynamics, eq, convolvers, etc) knowing that we are getting the best quality out of them. cool.gif

I'm not very skilled in programming, if at all sad.gif , but I dont think such plugin would be so difficult to make, but as I said, I dont know much about programming, so u guys have the last word... ph34r.gif

What do u think?
(sorry, if this has been asked before but I didnt find anything using the search function)

PS.. Great site, great source of information, wish it lasted forever and I'm sure it will laugh.gif
Funkstar De Luxe
Hmm... It's not impossible, but DC offset calculation takes a lot of time (on my 350) so scanning an entire lirary woould take weeks. Also, if it's only CD's you're ripping there should be no DC offset.

On a side note, I wasn't aware DC offset was audible.
Casius
Hi,

Well, as a matter of fact original cds DO have uncorrected dc offsets, it all depends on how well calibrated the recording studio hardware was at the time, I've reripped 5 cds so I can see if it's a regular issue, and found out that ALL OF THEM have dc offsets... well, I corrected the offsets but after they were musepacked wink.gif and reverted to wav they had uncorrected dc offsets so maybe...

By the way, it might be or not audible sometimes but I also read that it can damage your speakers, and IM SURE nobody wants that tongue.gif

Regards
DigitalMan
QUOTE(Funkstar De Luxe @ Dec 24 2003, 04:11 AM)
On a side note, I wasn't aware DC offset was audible.

DC offset isn't audible per se, but it does make the maximum signal level asymmetric (positive or negative maximum is reduced by the amount of the DC offset) and can damage equipment if there is not a high pass filter. Most modern audio equipment has a high pass filter, but not all. Without a highpass, DC offset can also push circuitry and speaker drivers into less linear ranges. Generally best to eliminate DC offset when possible.
Casius
So, do you think a plugin for that would be a good idea?, I mean, that dc offset could be retrieved when scanning replaygain values, right? it has to decode the entire file anyways, it would be helpful to do both things at the same time, gain+dc offset correction... wink.gif
Mike Giacomelli
On an oscilliscope or AC supply, DC offset is where the center of a wave is focused as i recall. How does that apply to audio files?
ssamadhi97
QUOTE(Mike Giacomelli @ Dec 25 2003, 06:39 AM)
On an oscilliscope or AC supply, DC offset is where the center of a wave is focused as i recall.  How does that apply to audio files?

In the exact same way.



I'm tempted to write an adaptive coarse DC offset remover dsp, but I'm away from Visual Studio for the next two weeks.. smile.gif
tigre
What I don't understand about this: You say original CDs have DC offsets and it can damage your speakers, this would mean ordinary CD playback on a hifi can damage speakers due to DC offsets? IMO a more logical assumption would be that DC offsets of commercially available audio CDs (and lossy encoded files from these) are small enough to avoid problems and/or that equipment is able to handle DC offsets without damage/audible problems.

If this assumption is wrong, a DC correction plugin for fb2k would mean that we finally reach what seemed impossible: Lossy encodings that are better than original (at least when played back through fb2k). tongue.gif
n68
gday...


yes.. i second your proposal Casius..
that would mean a whole lot..


smile.gif
vember
yup....
that would be awesome.. I've been looking for the magical crisp sound with waterfall-clearness that will reveal the colour of the carpet of the room the music was mastered in and I think this is what'll make it happen...

ph34r.gif




honestly, this isn't something you should worry about. It is to be taken care by of whoever recorded the file in the first place, and when recording through a decent A/D-converter (SBlive! not included) there will be no relevant DC-offset. I hereby declare this thread "uninteresting"...
Casius
Aren't those guys the ones that make our ears burst out with overloaded tracks lately? the ones that make vorbisgain, mp3gain, and replaygain give us some -10dB, -11dB, even -14dB gain values with the new tunes?, remember Californication and Laundry Service?? wink.gif ... guess what??? I DONT TRUST THOSE GUYS tongue.gif !!
Casius
Ohh I forgot... MERRY CHRISTMAS smile.gif !!!
Casius
I know you're gonna hate me for continuing this thread... but I've been doing some encodings (wav 24 bitdpeth made from 16bit using foobar's diskwriters to avoid artifacts in audiograbber) with both uncorrected and corrected dc offsets and lame -aps... then I used Encspot to check if the usage of vbr and joint stereo... and found out that more ms frames are used in the corrected wav (92.8%) than in the uncorrected one (91.5%) like I thought(Cristian Castro - Es Mejor Así.wav)... I know one sample maybe not very representative... but I assume the stereo image gets well balanced due to the fact that corrected dc seems to change the rms volume in both channels independently... maybe as both channels get even at zero dc value the codec can make better exploitation of the psymodel (vbr usage and ms usage for example)... both files turned out to be 209kbps though...

Now that I think about it I should post this message in the main forum or something related given the fact that a plugin for correcting dc seems not to be "interesting" sad.gif .

Anyways the difference between the usage of vbr and ms usage seems interesting... I'll look more into it, make more encodes and come back with something more representative (and as I'm talking about the source wav it should apply to all codecs)...

Cheers tongue.gif
vember
Make sure that what you are correcting is a proper DC-offset (as caused by illdesigned hardware such as the sblive just to give an example of how these could occur) and not just assymmetries of the audio waveform (which should remain). The important point is that silence in the wave-file should correspond to a zero value.

Merry Xmas..
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.