Talk:Proposal DC Offset removal

Feedback From Martyn
DC removal should be part of people's workflow, and always L/R independently. It can be removed by a HPF (single pass) algorithm or by an absolute (two pass) algorithm, with a speed hit, but a better initial response.

We currently do the second, I believe (but I see it may not work for brass recordings).

Make it an effect and default it to be called after a recording, I say. But that will have a hit on time after a long recording (option to turn it off, discouraged).

I'm 50/50 on the method, so think we should leave it as it is for now (stability).

Bill: -1 on doing it automatically after a recording.

"But that will have a hit on time after a long recording (option to turn it off, discouraged)." As above, so option to turn it off.

"I'm 50/50 on the method, so think we should leave it as it is for now (stability)." Bill +1

Steve: Audacity already calculates the minimum and maximum peak for each block file, so I'd guess that there's probably very little additional overhead for calculating the absolute offset. Perhaps someone that is familiar with the code could check that.

Gale: Bill voted +1 in the Proposal for "remove DC offset anyway (possibly with a way to turn it off in Prefs)" so is the worry about processing time? And don't we need to remove offset when importing too? I don't see too much issue if the progress dialogue for offset removal is separate from any other dialogues. That would let the offset removal be cancelled. Possibly this would be a one time cancel, and you must go into Prefs to stop the removal being done (after any operation).

Peter: when I wrote "Could be automatically invoked immediately post-capture, or post import, if Audacity detects significant DC ... " my intention there was not to automatically remove any DC offset. I too would be worried by the time penalty involved - and I don't believe we should be changing anybody's audio without telling them what&why and giving them a chance to avoid the step. My intention was that on completion of a recording or an import Audacity should ascertain if there is significant DC on the signal. The analysis could be performed on a shortish section of the audio to limit the time penalty of the analysis. If such DC is detected then the user should be informed of this with a warning dialog box which gives them the opportunity of either invoking the "Remove DC offset" effect or dismissing the dialog. Do I need to make this clearer on the proposal page?


 * Gale: Certainly I took that as you would be removing offset automatically and I assume Koz wants that. I can't see the point "sampling" for DC offset if we want absolute assurance that we are going to remove it. So without changing the algorithm it will take 3 minutes for an hour of audio or whatever to remove any offset there may be. We have to decide if it's important enough to want to offer it to everyone (not just hope they find it in a menu). If it's important enough, maybe we want a dialogue like that for importing uncompressed audio that offers you a preference to remove offset on stopping recording and on importing and advises it could take time. If it isn't important enough, then maybe there is a case to offer it only in Normalize (and Amplify)? I say that because in some tests I've done, including offset removal with Normalize only adds about 30% extra time to Normalize, so there is a benefit in not doing it on its own. This leads to another thought. If it's always cheaper to combine removal with another process, don't remove it when stopping recording or importing (it would hold up an on-demand import). Remove it the first time after record or import that we write audio data. Offset shouldn't cause any harm until you start editing or exporting.
 * Peter 16Jun11: Gale wrote in a "quality" email thread: <>
 * There certainly would be a lot of resistance for an auto-invocation of DC-offset removal immediately after recording. Many of us have recording chains which are DC-offset free, or carry such miniscule DC that it's not really worth bothering about - the additional time penalty involved on recording (or import) would be tiresome.  The only way I could support having such an auto-invocation is if we also introduced a Preference setting to enable/disable it.

Gale 16Jun11: As of current HEAD, offset removal adds about 50% to Normalize processing time because we have now removed an un-necessary analysis pass when we did not remove offset. However, Normalize with DC removal takes the same time as DC removal on its own, because both need the analysis pass and the second pass applies the removal (and gain even if "Normalize" is unchecked). Perhaps we should research how or if other editors handle DC offset. Do they for example filter it before the recorded data is written, so hide the processing that way, and is this a problem for slow computers? Gale 07May12: If DC offset is bad as most agree I am becoming increasingly convinced we should just remove it with the first effect or edit (or export if there is no effect or edit). There can be a preference (off by default) not to remove offset. If we want to make users aware of offset, this could be a warning (that can be switched off) or a progress message when we remove it, and/or paint a horizontal line where the centre of the waveform is if it is not on zero (it could be a preference not to calculate the offset). Note that a new menu item "Remove DC offset" does not show user if they have offset or not, nor do novices know what it means. Not everyone uses Normalize (novices simply don't know what the word means, so use Amplify). If we are serious about offset removal and want to put it in effects, then Amplify should have it too (or merge Amplify and Normalize). 

Feedback From Vaughan
Seems to me best solution is to merge Amplify and Normalize, checkbox for stereo channels independent. And probably make Remove DC Offset a separate effect. I don't know, but it may be the case that doing Remove Offset separately from Normalize is a lot more time consuming than doing them in the same process. If nobody's looked at the code, it's easy enough to do some tests.
 * Peter: The key reason for wanting to separate DC Offset removal from Normalize is that DC Offset should be used at a very early stage in the editing process, normally immediately the capture (recording or import) whereas Normalization is normally the last editing step prior to export of the finished audio. Any additional time penalty would be a secondary cosnsideration compared to that.