audacity-manual/manual/man/dc_offset.html
2025-12-04 12:24:42 +00:00

181 lines
17 KiB
HTML

<!DOCTYPE html>
<html class="client-nojs" lang="en" dir="ltr">
<head>
<meta charset="UTF-8"/>
<title>DC offset - Audacity Manual</title>
<meta name="ResourceLoaderDynamicStyles" content=""/>
<meta name="generator" content="MediaWiki 1.28.2"/>
<link rel="shortcut icon" href="../favicon.ico"/>
<link rel="search" type="application/opensearchdescription+xml" href="https://alphamanual.audacityteam.org/m/opensearch_desc.php" title="Audacity Development Manual (en)"/>
<link rel="EditURI" type="application/rsd+xml" href="https://alphamanual.audacityteam.org/m/api.php?action=rsd"/>
<link rel="copyright" href="http://creativecommons.org/licenses/by/3.0/"/>
<link rel="stylesheet" href="../m/skins/monobook/main.css/303.css" media="screen" />
</head>
<body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-DC_offset rootpage-DC_offset skin-monobook action-view"><div id="globalWrapper">
<div id="column-content">
<div id="content" class="mw-body" role="main">
<a id="top"></a>
<div class="mw-indicators">
</div>
<h1 id="firstHeading" class="firstHeading" lang="en">DC offset</h1>
<div id="bodyContent" class="mw-body-content">
<div id="siteSub">From Audacity Development Manual</div>
<div id="contentSub"></div>
<div id="jump-to-nav" class="mw-jump">Jump to: <a href="#column-one">navigation</a>, <a href="https://alphamanual.audacityteam.org/man/DC_offset#searchInput">search</a></div>
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="intro"><i><b>DC offset</b></i> is a <a rel="nofollow" class="external text" href="http://en.wikipedia.org/wiki/DC_bias">mean amplitude displacement from zero</a>. In Audacity it can be seen as an offset of the recorded waveform away from the center zero point. DC offset is a potential source of clicks, distortion and loss of audio volume.<br /><i>This page explains the causes and dangers of offset and how to remove it. Ideally any DC offset that is present should be removed as the first editing step after recording audio or importing it, before any other editing is attempted. </i></div>
<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1 tocsection-1"><a href="#Background"><span class="tocnumber">1</span> <span class="toctext">Background</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#Removing_DC_offset"><span class="tocnumber">2</span> <span class="toctext">Removing DC offset</span></a>
<ul>
<li class="toclevel-2 tocsection-3"><a href="#Audacity.27s_Normalize_Effect"><span class="tocnumber">2.1</span> <span class="toctext">Audacity's Normalize Effect</span></a></li>
<li class="toclevel-2 tocsection-4"><a href="#Cancel_DC_offset_in_sound_devices_on_Windows"><span class="tocnumber">2.2</span> <span class="toctext">Cancel DC offset in sound devices on Windows</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-5"><a href="#Limitations_of_offset_removal"><span class="tocnumber">3</span> <span class="toctext">Limitations of offset removal</span></a></li>
</ul>
</div>
<h2><span class="mw-headline" id="Background">Background</span></h2>
<p>DC offset is an offsetting of a signal from zero. On the Audacity waveform it would mean that the waveform in default view appears not to be centered on the 0.0 horizontal line, as in the upper track in this image:
</p>
<dl><dd><span title="Left and right channels of a recording where the upper (left) channel displays noticeable DC offset"><img alt="DC-offset.png" src="../m/images/d/df/dc_offset.png" width="373" height="200" /></span></dd></dl>
<p>The cause is almost always a fixed voltage offset somewhere in the audio chain before the analog signal is converted to digital values. For example, the voltage may be directly caused by a faulty audio interface, or may come from some other device that is attached to the sound card. Any offset is normally so small as to not be noticeable, but with defective or poor quality hardware it may become large enough to be a problem.
</p>
<div style="margin-top:12px; margin-bottom:12px; margin-left:24px; margin-right:24px">
<table style="background:#FEFFD0; color:black; border:1px solid #999999; padding-left:12px; padding-right:12px" width="100%" align="center">
<tr>
<td width="30px" valign="top" align="center"><img alt="Advice" src="../m/images/b/ba/warningicon.png" title="Advice" width="24" height="24" />
</td>
<td align="left" valign="top">You should check for and remove offset in any audio you are working with <b>before</b> editing it, even if the audio is not your own recording but an audio file you have obtained elsewhere.
</td></tr></table></div>
<ul><li>A sound that has DC offset will not be at its loudest possible volume when amplified or normalized. This is because the offset reduces the headroom between the peak level of the audio and the maximum possible level without <a href="glossary.html#clipping" title="Glossary">clipping</a>. This problem can possibly extend to the mix as a whole, since a sound with DC offset and a sound without DC offset will have DC offset when mixed.</li>
<li>DC offset can cause inaudible low level distortion. The distortion may become audible when effects that change the <a href="glossary.html#frequency" title="Glossary">frequency</a> content are applied, or when exporting the audio to a size-compressed format like <a href="glossary.html#MP3" title="Glossary">MP3</a>. </li>
<li>DC offset can cause audible clicks where audio sections are cut and pasted together, and can cause a click on playback at the start and end of the track, even without editing.</li>
<li>DC offset will become worse if the recording is amplified.</li></ul>
<h2><span class="mw-headline" id="Removing_DC_offset">Removing DC offset</span></h2>
<h3><span class="mw-headline" id="Audacity.27s_Normalize_Effect">Audacity's Normalize Effect</span></h3>
<p>Audacity's DC removal method performs a calculation to make the average positive and negative sample values equal. To perform removal, choose <span class="menu">Effect &gt; Normalize</span>, with the option checked "<b>Remove any DC offset (center on 0 vertically)</b>". Uncheck the "Normalize maximum amplitude" box unless you want to run Normalize as well (see <a href="amplify_and_normalize.html" title="Amplify and Normalize">Amplify and Normalize</a> for what Normalize does and when to use it).
</p>
<div id="cancel"></div>
<h3><span class="mw-headline" id="Cancel_DC_offset_in_sound_devices_on_Windows">Cancel DC offset in sound devices on Windows</span></h3>
<p>Newer Windows PCs may have a DC offset cancellation feature when recording from the built-in sound inputs. To check for or enable this:
</p>
<ol><li>Right-click over the speaker icon in the System Tray at the bottom of your screen and select <span class="menu">Sounds</span>. Click on the <span class="menu">Recording</span> tab.</li>
<li>Right-click over empty, white, space, show disabled and disconnected devices, then right-click over each device and enable it.</li>
<li>Right-click or select each device, choose "Properties" then look in the "Enhancements" tab.</li>
<li>If there is no "Enhancements" tab, look in the sound device's own control panel in "Hardware and Sound".</li></ol>
<p>For a more detailed walk-through of the above steps for Windows <i>(or if that does not work for your version of Windows)</i>, see <b><a href="windows_accessing_the_windows_sound_controls.html" title="Windows: accessing the Windows Sound controls">Windows: accessing the Windows Sound controls</a>.</b>
</p>
<h2><span class="mw-headline" id="Limitations_of_offset_removal">Limitations of offset removal</span></h2>
<p>Audacity's DC offset removal method could potentially create a new offset and therefore a click in some rare cases. Two cases are noteworthy:
</p>
<ul><li> where only part of the audio is offset, for example if absolute silence with no offset has been inserted into an offset recording. </li></ul>
<ul><li> where the offset is not constant. Strictly speaking this is not <i>DC</i> offset, it is sub-sonic modulation or "slowly changing DC bias", but over a short time period it looks very much like DC offset.</li></ul>
<p>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 <span class="menu">Edit &gt; Clip Boundaries &gt; <a href="edit_menu_clip_boundaries.html#split_new" title="Edit Menu: Clip Boundaries">Split New</a></span> to split it a new track. Then remove the offset from the remaining audio, and paste the non-offset audio back. Use <span class="menu">Select &gt; Region &gt; <a href="select_menu_region.html#ends_to_zero_crossings" title="Select Menu: Region">Ends to Zero Crossings</a></span> before split and paste if the non-offset audio is not absolute silence.
</p><p>High-Pass DC removal may well remove offset without adding new clicks if the offset is not constant.
</p>
<div style="margin-top:12px; margin-bottom:12px; margin-left:24px; margin-right:24px">
<table style="background:#FEFFD0; color:black; border:1px solid #999999; padding-left:12px; padding-right:12px" width="100%" align="center">
<tr>
<td width="30px" valign="top" align="center"><img alt="Advice" src="../m/images/b/ba/warningicon.png" title="Advice" width="24" height="24" />
</td>
<td align="left" valign="top"><b>Note: Removing offset after the event does not reinstate the original loss of headroom.</b> Without offset it would have been possible to record louder, so with greater <a href="glossary.html#dynamic_range_dynamic_range" title="Glossary">Glossary#dynamic_range dynamic range</a> 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.
</td></tr></table></div>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
<div id="column-one">
<div class="portlet" id="p-logo" role="banner">
<a href="../index.html" class="mw-wiki-logo" title="Visit the main page"></a>
</div>
<div class="generated-sidebar portlet" id="p-Navigation" role="navigation">
<h3>Navigation</h3>
<div class='pBody'>
<ul><li> <a href="../index.html" title="Main Page"><span title="Front page, complete with clickable image of Audacity screen.">Manual Home Page</span></a>
<ul><li> <a href="audacity_tour_guide.html" title="Audacity Tour Guide"><span title="A quick tour of selected features of Audacity. It doesn't tell you how to use features it would be much too long if it did. Rather it tells you about some of the features that exist in Audacity and will help you learn a little about those.">Tour Guide</span></a></li></ul></li>
<li> <a href="how_to_use_audacity.html" title="How to use Audacity"><span title="Quick Help, Audacity Foundations, Editing with Audacity, Help with Advanced Topics">Using Audacity</span></a>
<ul><li> <a href="../quick_help.html" title="Quick Help"><span title="A brief guide to help you get started with Audacity">Getting Started</span></a></li>
<li> <a href="how_to_use_audacity.html" title="How to use Audacity"><span title="A comprehensive guide to using Audacity">How-Tos</span></a></li>
<li> <a href="tutorials_for_audacity.html" title="Tutorials for Audacity"><span title="A guide to the tutorials that provide step-by-step instructions for performing common tasks in Audacity">Tutorials</span></a></li>
<li> <a href="tips.html" title="Tips"><span title="A guide to particular aspects of working with Audacity: Navigation. Playback, Audio Alignment">Tips</span></a></li></ul></li>
<li> <a href="../index.html#reference" title="Main Page"><span title="The components of the Audacity Graphical User Interface">Audacity GUI</span></a>
<ul><li> <a href="menu_reference.html" title="Menu Reference"><span title="A guide to the menus and submenus in Audacity">Menu Bar</span></a></li>
<li> <a href="toolbars_overview.html" title="Toolbars Overview"><span title="A guide to the various Toolbars used in Audacity">Toolbars</span></a></li>
<li> <a href="audio_tracks.html" title="Audio Tracks"><span title="A guide to the various types of track">Tracks</span></a></li>
<li> <a href="index_of_effects_generators_and_analyzers.html" title="Index of Effects, Generators and Analyzers"><span title="A quick index to the Effects, Generators and Analyzers that are shipped with Audacity">Effects</span></a></li></ul></li>
<li> <a href="customization.html" title="Customization"><span title="Adjust settings, change keyboard shortcuts, add plugins">Customizing</span></a>
<ul><li> <a href="preferences.html" title="Preferences"><span title="A guide to Preferences, which let you change most of the default behaviors of Audacity">Preferences</span></a></li>
<li> <a href="keyboard_shortcut_reference.html" title="Keyboard Shortcut Reference"><span title="A list of all the commands in the Audacity menus and all pre-defined keyboard shortcuts">Shortcut keys</span></a></li>
<li> <a href="customization.html#plugins" title="Customization"><span title="You can download and install plugins to add extra functionality to Audacity. Plugins can give you extra effects, or more audio generation and analysis capability.">Plugins</span></a></li>
<li> <a href="themes.html" title="Themes"><span title="Audacity now comes supplied with four pre-configured, user-selectable themes. This enables you to choose the look and feel you prefer for Audacity&#39;s interface.">Themes</span></a></li>
<li> <a href="customizing_toolbar_layout.html" title="Customizing Toolbar Layout"><span title="Audacity&#39;s toolbars can all be re-positioned (in the tooldocks or free-floating) and some can be resized.">Toolbars</span></a></li>
<li> <a href="manage_effects_generators_and_analyzers.html" title="Manage Effects, Generators and Analyzers"><span title="Manage your list of available built-in Effects, Generators, Analyzers and plugins with the Plugin Manager">Effects</span></a></li></ul></li></ul>
</div>
</div>
<div class="generated-sidebar portlet" id="p-Reference" role="navigation">
<h3>Reference</h3>
<div class='pBody'>
<ul><li> <a href="../index.html#reference" title="Main Page"><span title="Reference guide to the Audacity project window - you can hover over and click on the image to learn more">Reference</span></a>
<ul><li> <a href="searching_the_manual.html" title="Searching the Manual"><span title="Tips on how to Search the Audacity Manual">Search the Manual</span></a></li>
<li> <a href="digital_audio.html" title="Digital Audio"><span title="A beginner&#39;s guide to digital audio">Digital Audio</span></a></li>
<li> <a href="glossary.html" title="Glossary"><span title="Brief explanations of technical terms related to digital audio, with some links to Wikipedia for much more comprehensive explanations">Glossary</span></a></li>
<li> <a href="scripting_reference.html" title="Scripting Reference"><span title="Audacity Commands that are in menus, that can be used from Macros, Nyquist and Python">All Commands</span></a></li>
<li> <a href="faq_errors.html" title="FAQ:Errors"><span title="FAQ on common errors encountered when using Audacity">Errors</span></a></li>
<li> <a href="subject_index.html" title="Subject Index"><span title="A short, limited, index of the Manual">Index</span></a></li></ul></li>
<li> <a href="faq.html" title="FAQ"><span title="Frequently Asked Questions - most common questions are answered in the FAQ">FAQ</span></a></li></ul>
</div>
</div>
<div class="generated-sidebar portlet" id="p-Useful_Links" role="navigation">
<h3>Useful Links</h3>
<div class='pBody'>
<ul><li> <span title="Audacity Forum (best place for support requests)"><a rel="nofollow" class="external text" href="https://forum.audacityteam.org/">Forum</a></span></li>
<li> <span title="Audacity Wiki Home Page"><a rel="nofollow" class="external text" href="https://support.audacityteam.org/">Audacity Support</a></span></li>
<li> <span title="Audacity Latest Release"><a rel="nofollow" class="external text" href="https://www.audacityteam.org/download/">Latest Release</a></span></li></ul>
</div>
</div>
</div>
<div class="visualClear"></div>
<div id="footer" role="contentinfo">
<div id="f-copyrightico">
</div>
<div id="f-poweredbyico">
<a href="https://www.mediawiki.org/"><img src="../m/resources/assets/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" srcset="/m/resources/assets/poweredby_mediawiki_132x47.png 1.5x, /m/resources/assets/poweredby_mediawiki_176x62.png 2x" width="88" height="31"/></a>
</div>
<div align="center"><ul id="f_list"><li>This version created on 2025-12-04 - <a href="https://alphamanual.audacityteam.org/man/DC_offset">Check current version of this page (development Manual)</a></li></ul></div>
</div>
</div>
</body></html>