Proposal DC Offset removal

From Audacity Wiki
Jump to: navigation, search
Proposal pages help us get from feature requests into actual plans. This page is a proposal to rationalize DC management offset removal.
Proposal pages are used on an ongoing basis by the Audacity development team and are open to edits from visitors to the wiki. They are a good way to get community feedback on a proposal.


  • Note: Proposals for Google Summer of Code projects are significantly different in structure, are submitted via Google's web app and may or may not have a corresponding proposal page.




The Problem

DC offset removal is only bundled in the Normalize effect. This leads to DC offset not being done at all, or being done too late as a final editing step in Normalize. See Proposal DC Management for a discussion of whether Audacity should be removing DC offset by default.

When currently invoking DC offset removal from Normalize, and without any normalization requested, the progress box confusingly displays Normalize... > Normalizing

  • Peter 7May12: This progress message has been fixed for release 2.0.1

Proposed Feature

Remove DC offset becomes a separate menu item (consensus says remove it from Normalize).

The current Normalize effect to remain as-is, containing optional DC removal (for users who overlook DC removal early on - and avoids a regression).

Developer/QA Backing

  • Peter
  • Steve
  • Bill: +1 for "Remove DC offset" becoming a menu item before 2.0.

Use Cases

  • DC on the signal should be removed early in the editing process.
  • It is often overlooked by users as it is "hidden" in an effect normally used late in the editing process.
    • MJS: Overlooked maybe, but not "hidden" at all. Maybe we should publicise the workflow of 'capture', 'normalize' to those not familiar with normal working practice.
      • Peter 7May12:Yes Martyn I agree that we should probably publicise it more to users (the manual does already contain two workflow tutorials: LP digitization and Recording 78s that stress this point, as does the "Recording and Editing" tutorial which is part of "Your First Recording"). But I still think it would be clearer to users if there was an explicit, separate, DC-removal tool; named accordingly, this would make it more discoverable in the efects menu in the program and on the manual page on effects.
        But I can see some sense in also retaining the DC removal in Normalize for those users who overlooked it in the first place, though by then it may be too late to prevent editing damage - but it would at least optimize the headroom available for amplification.
        So I think that what I am asking for is a new DC offset removal tool in addition to retaining the Normalilize effect as it currently stands.
  • Steve: 06Nov12: In cases where there is non-constant DC bias, the method for DC offset removal that is used in the Normalize effect will fail because it is designed to remove (only) constant DC offset. Gale has indicated that some users prefer the LADSPA "DC Offset Remover" because of its ability to also remove sub-audio frequencies (it is a low frequency high-pass filter). However, a flaw with the LADSPA effect is that it is not capable of correcting DC offset at the very beginning of the selection. This is an example audio file that has been "corrected" for DC offset by the Audacity Normalize effect: Trumpet sample. If this audio is dropped into a silent section of a track, there will be a small but audible click at the start of the sample. Neither the Normalize DC correction or the LADSPA effect are able to prevent that click. To prevent that click, either the audio needs to be faded in, or needs to be offset corrected in a way that can handle non-constant DC bias, such as the "Dynamic bias correction" used in the Nyquist DC offset tool. The sample was derived from this recording.
    • Gale 06 Nov12: Some users also prefer LADSPA dcremove because they allege there are brass and wind recordings where Audacity DC offset removal in "Normalize" used on the whole track in situ creates an audible click. Some of these people acknowledge dcremove creates a small "inaudible waveform squiggle" at the start of the selection, instead of an audible click. This is only the "in situ" case and I still have no audio examples from any of these people.

Details

  • Create a new separate function to Remove DC offset.
    • Steve: +1
    • Peter: +1
  • Either in the Effect menu
  • Or in the Edit menu
    • Gale: I am no longer supporting the proposal for a menu item (see History) but if it was implemented, I think it should be a menu item without dialog in the Edit menu next to Find Zero Crossings.
      • Peter: +1 for the Edit menu, partly because the Effect menu is over-long already.
  • Could also be retained in Normalize, if thought necessary, to avoid a regression.
    • Bill: +0.5
    • Peter: +1
    • Steve: +1
  • Could be automatically invoked immediately post-capture, or post import, if Audacity detects significant DC (to nudge the user into optionally dealing with it).
    • Bill: +0.5
    • Gale: +1 When we can, remove DC offset anyway (possibly with a once-only "first use" dialog that says what offset is, that you can turn off DC offset removal in Prefs and includes an off-by-default checkbox that turns it off.). This would have to be done so that the dialog did not appear just because Prefs. was initialised.
      • Bill: +1
      • Peter: -1 We should not do this unless we warn the user that we are doing so and explain why. They should really be fixing the hardware and/or associated drivers.
        With that change my vote would change to +0.5
      • Gale: If we get DC offset removal right, it does no harm to remove it even if the user does fix the hardware. Your proposal for a menu item also encourages people not to fix the hardware, it's just less effective because fewer people will find it.
        • Peter: The problem with that Gale is that if we auto-fix it and don't tell them than they are extremely unlikely to know that their hardware and/or drivers are adding DC to the signal [...](IIRC Edgar-rft supported the suggestion of informing the user when discussing DC in the related forum thread.)
        • Gale: I am not suggesting not telling them. See above "first use" dialog. User can always turn DC offset removal off in Prefs to check if their hardware still has the fault. Also even if the Windows audio devices' DC offset cancellation is really a hardware filter as Steve describes below, shouldn't users still either fix the hardware (if e.g. a mic was the cause) or use another device without offset?
    • Steve: There may be technical obstacles to fixing DC automatically. In hardware, this is done by high-pass filtering the input, which works fine because the filter is working all the time whether the input is being used or not. In an application (such as Audacity) the audio stream does not start until you press the record button, so high-pass filtering the input will, if DC offset is present, create a click at the start of the recording. We can not rely on automatic removal as a solution until it is demonstrated that it is possible. Manual correction of DC offset is tried and tested technology and the capabilities/limitations are known.
    • Gale I initially worried about the practicalities of "automatic" removal" when this all started - see my comment in the history (bottom of page). Therefore what I propose for "automatic" removal is (unless disabled in Prefs), automatically applying the best offset removal effect we have (currently that in Normalize) after completing ingress of the audio. This means after you stop the recording, or after import of the file. The prefs could choose between removing stable offset, removing dynamic offset, or doing a pass for both (slow), or doing it only for recording. I already mentioned this in the Talk page.

      From Steve's description, I would assume an intelligent offset filter when recording could pre-roll (if we had pre-roll) and delete the click, or otherwise adjust the problem at the start only. Goldwave has a DC offset filter when recording which I will try (my netbook often records with offset). However even if effective, a recording filter does nothing for files that are offset.

      To convince me we want a button somewhere that does offset removal (in addition to Normalize) it needs to be much more prominent, e.g. in Transport Toolbar (obviously not the same size as the other buttons) or a control on Meter Toolbar (Cool Edit's DC removal is a right click over the level meters).

    • Steve: Cool Edit Pro had DC removal during recording and a comprehensive set of tools within the Amplify/Fade UI (which included 2 types of bias removal and an option for setting a bias level). It also had "DC Bias Adjust" in the Normalize effect, a DC Offset option in the "Generate Tones" effect and displayed a measurement of the DC" in the "Waveform Statistics". As far as I'm aware Adobe kept all of these features in Audition.

GUI Examples

Proposed DC offset GUI.png

Previous Feature Requests relating to this proposal

  • Better management of DC offset:
    • Automatic removal of DC offset after recording (rather than just as an option in Normalize) (7 votes)
    • Audacity should block DC at source because of the problems it causes. DC is not sound, and passing DC should only be a fringe purpose for scientists/researchers. (2 votes)
      • Blocking DC at source raises technical issues which we may well not want to address.
Personal tools

Donate securely by PayPal, using your credit card or PayPal account!