Talk:DC offset

From Audacity Development Manual
Revision as of 09:58, 13 September 2014 by PeterSampson (talk | contribs) (archiving "Limitations of offset removal" with full ednotes to the Talk page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Limitations of offset removal

Audacity's DC offset removal method could potentially create a new offset and therefore a click in some rare cases. Two cases are noteworthy:

* where a waveform is inherently asymmetrical, which is possible with recordings of brass instruments, violin, bass drum, some male bass voices and certain notes on woodwinds

Steve: 31Oct12 I have heard many rumours that asymmetric waveforms can produce DC offset when "corrected", but no actual evidence to support that claim. I think it is a myth and without evidence to the contrary we should not perpetuate this belief. I think that it is worth mentioning asymmetric waveforms somewhere (I'm not sure where yet) as this is a common point of confusion re. DC offset.

  • Bill 21Jul14: I think I may have been one of those saying that asymmetrical waveforms could fool the DC offset removal tool. I distinctly remember thinking I had found a case, which I could later not reproduce. So I agree that this statement should be removed.
Gale: 31Oct12 From my trawl to find the "asymmetrical" link I added, the idea that DC offset exists in asymmetric brass waveforms and should be corrected therein is commonplace. Do you agree with that, to begin with? Wherever else we mention asymmetric waveforms I think we must do so here, if only to debunk any myths.

But...I find I have six complaints in my inbox about Audacity's DC offset removal creating clicks in brass and wind recordings. They were sent to me personally, not to mailing lists. There was no evidence by way of audio files, though two of them said dcremove fixed the offset without adding clicks. I've written to these people again today, hopefully someone "may" respond. But where are the online complaints, on -devel or the Forum, and is there not aural evidence there? Also see this public post by yourself where you state unequivocally Audacity's offset correction can create clicks in asymmetrical waveforms. Can we not test this? You play the violin and I understand that can produce asymmetical waveforms too? I am sceptical that there is no problem here.

  • Steve: 31Oct12 What can I say, I think I was wrong. At the time I believed that was true, but have repeatedly failed to prove it, nor have I seen any compelling evidence to support it. I have seen some rare cases that appear to support the idea but are actually misleading. Asymmetric waveforms are not uncommon in real world recording, and are easy to synthesize. A high pass filter will often change the shape of a waveform due to phase shifts, and this can add to the illusion and confusion. I've posted a sample on the forum to illustrate. http://forum.audacityteam.org/viewtopic.php?p=195648#p195648
    • Gale 06Nov12: ToDo-2 We need to discuss naturally occurring offset recordings as I am sure this wants to be covered here. I asked if Steve agrees that DC offset exists in asymmetric brass waveforms. Does non-constant offset naturally exist in brass waveforms? And since these waveforms frequently "look" offset (even if they are not), does the user need to apply a DC removal tool to them (let's say your Nyquist tool, as that seems without flaw at present)? In other words, is a naturally occurring offset as dangerous as one caused by defective hardware?
    • Bill 21Jul14: Are you suggesting we should point out that some natural recordings that appear to have DC offset do not, in fact, have DC offset?.
  • where only part of the audio is offset, for example if absolute silence with no offset has been inserted into an offset recording.
Gale 31Oct12: Re: the below, is it confirmed with evidence that Audacity's DC offset removal can create a click in these type of waveforms? I don't think this bullet can stand as is. Why is it not "slowly changing DC offset" if "DC offset" and "DC bias" are indeed interchangeable terms? Should we not have an image of this phenomenon so users can tell the difference?
  • Steve: 31Oct12 It can be easily demonstrated that the Audacity method of DC offset correction will not perform well if the "bias" is not constant. In audio engineering, "DC offset" is usually taken to mean a constant offset. The method for correcting that is used by the Audacity Normalize effect assumes that this is the case.
  • Steve: 01Nov12 The newly updated Nyquist DC offset tool handles non-constant bias better than either the Audacity Normalize effect or the LADSPA effect.
  • where the offset is not constant. Strictly speaking this is not DC offset, it is sub-sonic modulation or "slowly changing DC bias", but over a short time period it looks very much like DC offset.

In the case where some sections of the audio are clearly offset and some not, the solution in Audacity is to first carefully select each section of non-offset audio then use Edit > Clip Boundaries > Split New to split it a new track. Then remove the offset from the remaining audio, and paste the non-offset audio back. Use Edit > Find Zero Crossings before split and paste if the non-offset audio is not absolute silence.

Gale 31Oct12: "High Pass DC removal as in LADSPA dcRemove may well remove offset without adding new clicks if the offset is not constant." Is there any doubt dcremove avoids creating clicks where only part of the audio is offset (which bit you removed)? Dcremove works for me on that test file I PM'ed to you that had non-offset silence preceding offset audio. There is a small visible "wiggle" before the audio starts, but it is inaudible as it is masked by the start of the music.
  • Steve: 31Oct12 dcremove will generally perform better than "absolute" offset removal in cases where the bias is not constant, though it may not avoid the problem of clicks. In particular it cannot correct DC offset at the very beginning of the selection and it will not remove clicks if the offset suddenly changes.

High Pass DC removal as in LADSPA dcRemove may well remove offset without adding new clicks if the offset is not constant.

Advice Note: Removing offset after the event does not reinstate the original loss of headroom. Without offset it would have been possible to record louder, so with greater dynamic range and greater signal-to-noise ratio. It is always preferable to try to find and fix the source of the offset in the hardware. Updating your sound device drivers might help, too.