Zero DC Offset — User Guide
Measure and remove constant DC offset from a selected Sound by subtracting the exact mean amplitude independently from every channel — without high-pass filtering, normalization, or peak scaling.
What this does
Zero DC Offset removes a constant baseline displacement from one selected Sound. For each channel, the script measures the global mean amplitude and subtracts that value from every sample in the same channel.
The operation is intentionally minimal. It does not apply a high-pass filter, does not normalize the result, and does not rescale peaks. The corrected Sound therefore differs from the source only by the removal of the constant per-channel mean.
Offset → centered signal
Quick start
- Select exactly one Sound object.
- Run
Zero_DC_Offset.praat. - Keep Dc_trajectory_window_s at 0.25 s unless you want a finer or coarser local-mean display.
- Leave Draw_visualization enabled to compare the waveform before and after correction and inspect the local-mean trajectory.
- Leave Create_measurement_table enabled when you want per-channel numeric results for later inspection or export.
- The corrected Sound appears as
<source>_ZeroDC. The original Sound is preserved.
Method
For channel c, the script first measures the complete-channel mean:
It then copies the source Sound and applies:
The correction is performed independently for every channel. A stereo file may therefore receive two different DC corrections if its left and right channels have different baseline offsets.
Controls
| Control | Default | Function |
|---|---|---|
| Dc_trajectory_window_s | 0.25 s | Window duration used only for the optional local-mean trajectory in the Picture window. It does not change the correction itself. |
| Draw_visualization | On | Draws waveform before, waveform after, local-mean trajectory, and a compact QC summary. |
| Create_measurement_table | On | Creates the per-channel Table ZeroDC_Measurements. |
Measurements & QC
Before and after correction, the script measures every channel independently. The measurement table contains:
| Field | Meaning |
|---|---|
DC_before / DC_after | Global channel mean before and after correction. |
DCpctRMS_before / DCpctRMS_after | Absolute DC magnitude expressed as a percentage of channel RMS. |
RMS_before / RMS_after | Root-mean-square amplitude before and after correction. |
Peak_before / Peak_after | Absolute peak amplitude before and after correction. |
Peak_dBFS_before / Peak_dBFS_after | Peak level converted to dBFS when the peak is non-zero. |
The Info window also reports per-channel DC, RMS and peak values, plus the largest residual global DC after correction.
Visualization
When Draw_visualization is enabled, the Picture window follows the AudioTools analysis style and shows:
- Waveform before correction;
- Waveform after correction on the exact same amplitude scale;
- Local mean trajectory across the full Sound, comparing before and after;
- Global mean reference lines for the displayed channel;
- QC summary strip with maximum DC, peak change, strongest channel and correction formula.
For multichannel Sounds, the displayed waveform is the channel with the largest RMS before correction. The correction itself is still applied independently to every channel.
Outputs
| Output | When created | Purpose |
|---|---|---|
<source>_ZeroDC | Always | Corrected Sound with exact per-channel mean removed. |
ZeroDC_Measurements | Create_measurement_table enabled | Per-channel before/after DC, RMS, peak and dBFS measurements. |
| Picture-window QC page | Draw_visualization enabled | Before/after waveform comparison, local-mean trajectory and QC summary. |
At the end of the script, the original Sound and corrected Sound are selected together in the Objects window.
What is preserved
- Channel count: unchanged.
- Sample rate: unchanged.
- Number of samples: unchanged.
- Duration: unchanged.
- Time domain: original start and end times are preserved.
- No normalization: amplitudes are not rescaled after correction.
- No filtering: low-frequency audio content is not intentionally attenuated.
Notes & limitations
- Constant DC only. The method removes one global mean per channel. It is not a detrending algorithm and does not remove time-varying baseline wander.
- Trajectory is diagnostic.
Dc_trajectory_window_saffects only the QC display, not the processed Sound. - Large genuine low-frequency asymmetry can contribute to the measured mean. The script intentionally defines DC operationally as the complete-channel mean.
- No clipping protection. A corrected peak above ±1 is reported, not automatically attenuated.
- One Sound per run. The script requires exactly one selected Sound object.
- Native Praat implementation. No Python, subprocess, or external DSP engine is required.
Citation
Praat AudioTools: Cohen, S. (2026). Praat AudioTools: An Offline Analysis–Resynthesis Toolkit for Experimental Composition.