Open petersampsonaudacity opened 2 years ago
Can you clarify what you mean by the first two algorithms "dynamic bias adjust" and "absolute offset"?
SuperCollider only does the 3rd one IIRC, as LeakDC. Some useful discussion (in that context) regarding algorithms here: https://scsynth.org/t/why-leakdc-and-not-a-standard-hpf-for-dc-removal/4780/
Can you clarify what you mean by the first two algorithms "dynamic bias adjust" and "absolute offset"?
That came from some experiments that I tried over a decade ago. (The original posts are somewhere on the Audacity forum).
If I recall correctly, "dynamic bias adjust" measured the amount DC bias over the first part of the selection, and applied compensation. It would then repeat the process on blocks of data, updating the bias correction as it went - in effect, a very low frequency high-pass filter, but with the advantage that it looked ahead to determine the required bias correction, so no click at the start.
"Absolute offset" was (probably) adjusting the DC offset so that the highest positive peak is equal to the lowest negative peak. This does not necessarily remove DC (in fact it may introduce DC offset), but it allows maximum amplification before clipping.
That's what I thought about the last para. Basically global vs local offset in a certain time window. Sane audio hardware compensates for the later with some output caps anyway. Fairly easy to measure with an oscope or even a voltage meter with memory or at least fast updates if it's a digital VM. Have done this for my own hardware out of curiosity in the past.
I'll check out the forum for details on the rest.
Sane audio hardware compensates for the later with some output caps anyway.
Caps leak. Cheap caps can leak significantly. High quality audio interfaces often use dual power rails and high quality "audio" caps to minimise DC offset.
I'll check out the forum for details on the rest.
This is probably the most relevant topic: https://forum.audacityteam.org/viewtopic.php?f=42&t=68463 (not quite a decade ago ;-)
Rather than implementing this as a new effect, does it make more sense to include one of the DC Offset Nyquist plugins on the forum in the standard distribution?
Personally I'd prefer it as a new effect - so that way it gets more prominence, is more "discoverable"
@petersampsonaudacity For the correction / removal operation, would you prefer "correct DC offset to X dB" (default X=0), or simply "remove DC offset"? The former allows specification of the new target offset, the latter hard codes the target to 0 but is a simpler UI choice.
The code should end up virtually the same either way, it's just a UI choice: simplicity vs. flexibility. I prefer the former option, but I don't know the user base well.
@JC3 I guess it depends of one wants to have a command that also creates DC offset as well as removing it.
For my money I would have:
a) simple DC Offset Removal with "Remove DC offset"
b) then if we wanted a tool to create DC offset (for testing or other purposes) a Nyquist plugin could be written for that, provided as an optional plugin that users can add if and when required - as it is somewhat of a niche piece of functionality.
I'd rather like to see a manual DC offset setting. It completely fails for me now. There's a slight positive offset in a file I have, but it's not removed at all. I need to tell it how to offset the samples to make it work.
Describe the bug 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.
DC on the signal should be removed early in the editing process but it is often overlooked by users as it is "hidden" in an effect normally used late in the editing process. Note that DC offset is not audible (so may not be corrected by the user) but reduces headroom for subsequent processing
This was originally logged as a Proposal in 2011 in the Audacity Wiki.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Screenshots
Additional information (please complete the following information):
Additional context Could be automatically invoked immediately post-capture, or post import, if Audacity detects significant DC (to nudge the user into optionally dealing with it).