Jump to content

Dc offset removal - more than once?


Rossd23

Recommended Posts

It sometimes takes more than once to remove Dc offset from my tracks before mastering. Is this normal? It took me three times to remove the Dc offset completely and I feel that I overdid it. Another thing, is this change saved to my premaster file? I reopened another mastering session and checked the same file for Dc offset and it was gone, which is weird because I never thought that Logic actually changed a bounced/imported track.
Link to comment
Share on other sites

Hi

 

Working in the sample editor IS destructive. You're altering the audio file.

 

 

Without wishing to be too pedantic, sometimes working in the Sample Editor need NOT be destructive :wink: :

 

Move the region anchor

Adjust the region start/end points

Region to Selection

Save a copy as

Save Selection as

Create New region

Audio to MIDI Groove

Audio to Score

Adjust Tempo...

 

etc

 

 

However, those operations that affect the file itself can be destructive, allowing for the (default) undo steps in Preferences.

 

 

CCT

Link to comment
Share on other sites

Do you know what this function exactly does? If it did nothing but remove the DC offset of the whole audio region, there would be added/subtracted a fixed value to/from every single sample so the overall sum is zero. In this case the operation would be non-destructive in a way that the original waveform could be reconstructed exactly by simply adding/subtracting the same value with the opposite sign.

Obviously this approach would not guarantee a "pop-free" start or end of the region even when the start and the end of the region were silent because the sum of all positive and negative parts in between might be not zero, especially in short regions. Example: A short single noise/impulse like when a highly damped drum is hit will always start stronly into one direction (positive or negative) and then fall back weakly into the other direction/sign. Making the overall sum of the samples zero would result in a non-zero value at the silent start and the silent end of the region.

So the offset compensation needs to be adjusted dynamically which means a sort of highpass filtering in some way. And that's why the DC offset removal is destructive.

BTW i don't know what this function in Logic does, but you could easilly verify it yourself: You need an audio file containing an exact low frequency square wave (try 10Hz or even 1Hz) and look what DC offset removal does to it. (Square waves are fun to play with - not for listening but for testing audio devices.) Also try bursts of square waves that go to the positive or the negative side only. Or try a square wave and slowly alter the pulse width.

Link to comment
Share on other sites

Some hours later - I could use some sleep...

Just a single test result. This is what I gave Logic:

 

1652012565_Bildschirmfoto2012-05-10um23_55_12.png.99ea5113cce6cd81b26f5b4fd7e8a079.png

 

You can clearly see the waveform start and end at zero, but in between there is more "plus" than "minus".

And this is what DC removal did to it:

 

977149182_Bildschirmfoto2012-05-10um23_55_39.png.c327595b609705e04a29f0d12acc4456.png

 

The waveform does not start and end at zero anymore. So although overall DC offset was removed, there is added an audible "pop" at both the start and the end when the region is played back in the middle of some silence.

Repeatedly starting the DC removal function just results in the message "No offset found" (translated from German) - the function refuses to do it again.

What you see here means there is no dynamic adjustment of the DC compensation value - and thus no highpass filtering and no really destructive behaviour. The waveform looks exactly the same as before except for the, well, DC offset.

Of course this single test doesn't mean too much. The region is very short (about 371ms), maybe the DC offset removal function works different if applied to longer regions. But I'm getting tired...

Link to comment
Share on other sites

I rebounced the mixes that I did this to, so I am assuming that everything is alright now (?). I had no idea that this actually altered the waveform. I am a little worried about you guys saying that this function is "extremely destructive." We are only talking about a high pass filter at about 20hz, right? The thing is, I did this with one track and I like the way it sounds. I tried going back and redoing it with the rebounced file, but the spirit isn't there anymore and I just can't remember my mastering chain from before.

 

I am just glad that I didn't do this in the mixing stage or else I would be screwed.

Link to comment
Share on other sites

Without wishing to be too pedantic, sometimes working in the Sample Editor need NOT be destructive :

 

Move the region anchor...

 

Of course - but I'm talking about audio editing here: removing DC offset in the sample editor is a destructive process - always.

 

There is no way to undo the damage? Just rebounce the mix? I only use this function in audio mastering, never in the mixing phase.

Link to comment
Share on other sites

Destructive is destructive; preceding it with "extremely" is just redundant.

 

Not sure why you couldn't hit UNDO in the sample editor afterwards to undo the damage.

 

Ross, I'm curious to understand what led you to want to do a dc offset removal in the first place. Knowing this could shed some light on whether or not you even need to go through with this operation on the entire mix (as opposed to an offending part or two that's causing the offset in the first place).

Link to comment
Share on other sites

Destructive is destructive; preceding it with "extremely" is just redundant.

 

Not sure why you couldn't hit UNDO in the sample editor afterwards to undo the damage.

 

Because.

 

1. I had no idea.

2. This was already done several days ago. I've already rebounced the tracks that I messed up. I applied the DC offset function removal during the final mastering phase of my bounced down track. It was pure ignorance on my part since I don't use the sample editor often.

3. I probably won't be doing it again, but remastering these tracks is a pain. I won't get the same results and I was pleased with the initial mastering. Should I really be worrying about what's below 20hz anyway? It's inaudible to most. Assuming that the DC offset removal in Logic is a steep high pass filter at this frequnecy range.

4. Anyway, I won't be doing it again. You make mistakes only to learn from them.

Link to comment
Share on other sites

DIn this case the operation would be non-destructive in a way that the original waveform could be reconstructed exactly by simply adding/subtracting the same value with the opposite sign.

 

No: the fact that you can reconstruct the waveform (or audio data) does not make the operation non-destructive. In this case, it is still a destructive operation. Please read on...

 

Of course - but I'm talking about audio editing here: removing DC offset in the sample editor is a destructive process - always.

There is no way to undo the damage? Just rebounce the mix? I only use this function in audio mastering, never in the mixing phase.

There seems to be a confusion as to what "destructive" means: destructive means you have changed the audio file on your hard drive. In the case of the sample editor, depending on how you set your preferences, you may or may not be able to undo the process. But whether you're able to do that or not, you have changed the audio file when you processed it. That makes the process a "destructive" one.

 

Here's an example:

 

1) Using the gain region parameter is non-destructive: the audio file is still the same, and only that specific region in that specific project will reflect the gain change. Any other project using that file will see the same original audio file with no gain change, independently of the region parameters for that specific region.

 

2) Using the Gain Change feature in the sample editor is destructive: the audio file has changed, and any region in any project using that audio file will reflect the gain change. The sample editor may be able to undo the process, and even if it isn't you can re-open the audio file and use the Gain Change feature in the sample editor with the opposite gain value to retrieve the original audio file (assuming the gain change did not clip the audio file). Still, that process is called destructive.

Link to comment
Share on other sites

Because.

 

The best reason of all! :lol:

 

Should I really be worrying about what's below 20hz anyway?

 

Yes.

 

It's inaudible to most.

 

Except whales and elephants. But if you have excessive energy down in that range (even if you can't hear it) it can muddy up the sound of the mix. But...

 

Assuming that the DC offset removal in Logic is a steep high pass filter at this frequnecy range.

 

No, it's not a HPF. If it were, the edges of sharp waveforms would become noticeably rounder. Best I can tell, it's simply a mathematical process which looks to discover if there's a DC level on which the overall sound rides; should it detect this (or think it detects it) then I believe it removes DC by re-calculating the values of all samples by the same amount. Here's a hypothetical example based on my understanding of how this works... Let's say you have samples in an audio file with values of:

 

1, 1, 1, 1, 200, 900, 200, 1, 1, 1, 1

 

Logic looks at those values and determines that the 1's are steady DC; it then subtracts "1" from every sample in an attempt to remove DC, resulting in:

 

0, 0, 0, 0, 199, 899, 199, 0, 0, 0, 0

 

I don't know if it follows exactly that process, but that's my general understanding of how this process works.

Link to comment
Share on other sites

BTW, you should STILL be able to undo the DC offset on your original mixes. The sample editor's UNDO buffer is separate from the regular, everyday undo buffer. And if I'm not mistaken (David, please correct me here if I'm wrong), your UNDO for the sample editor remains intact even after you close out your session. So if I'm right about this, if you were to open your original mix project and open the audio file of that mix you liked in the sample editor, with any luck you'll still be able to undo those changes you made even after the fact.
Link to comment
Share on other sites

I am way confused.

 

First of all, looks like I will be redoing the masters after all. I can't let potentially degrading the audio when I didn't have to slide.

 

Second, why would I have to redo when I rebounced the mixes? I understand that next time I can do this, but I always open up an entirely new session and then import my bounced down 24 bit tracks for final mastering. I simply rebounced the track that I applied DC offset removal to and it should be in its original state again.

 

Third, sometimes I do high pass everything at 20hz. Not always, but sometimes I do. I've heard different opinions in regards to this. Some people claim that there is something there while others feel that high passing everything is fine.

 

I do have some offset according to Logic, like 0.076 percent. I do not know if it is a significant problem or not.

Link to comment
Share on other sites

Some people claim that there is something there while others feel that high passing everything is fine.

Do you mean the people who claim there is nothing there are the ones that say you should filter it? Why should one filter "nothing"? :shock: :?

 

The only thing filtering all your tracks with a high pass at 20Hz will do is distort the phase of the low frequencies in your mix.

Link to comment
Share on other sites

Looks like I will be redoing the masters after all. I can't let potentially degrading the audio when I didn't have to slide.

 

Hold on. Don't do anything like this unless you know for sure there's material below 20 Hz of sufficient amplitude to even worry about.

 

How can you tell? Well, you have to listen on a system capable of producing 20 Hz and/or by carefully studying a high resolution frequency spectrum analyzer during sections of a song where you think that those kinds of subs might be obscuring the mix. If you don't know, or you're not sure and you want to be safe about low frequency content, run a second pass through the HPF. Then you have to listen critically to the differences and see if one sounds better to you.

 

I do have some offset according to Logic, like 0.076 percent. I do not know if it is a significant problem or not.

 

You can't mix by numbers.

Link to comment
Share on other sites

DIn this case the operation would be non-destructive in a way that the original waveform could be reconstructed exactly by simply adding/subtracting the same value with the opposite sign.

 

No: the fact that you can reconstruct the waveform (or audio data) does not make the operation non-destructive. In this case, it is still a destructive operation.

 

In terms of audio engineering and programming, it sure is. But we should keep in mind the word destruction is older than sound recording.

Here's an example:

 

1524454598_HouseOffset.png.f2f0f4aec5305207f86cf676bea94650.png

 

The offset was altered, but most people would say it was a non-destructive way.

Concerning this second example

 

2089401837_HousenoOffset.png.5731f289cabcae4864eb9debb7ac8dc6.png

 

there is no question. The offset was left untouched, but the nonlinear operation applied to the house was definitely destructive.

Link to comment
Share on other sites

Best I can tell, it's simply a mathematical process which looks to discover if there's a DC level on which the overall sound rides; should it detect this (or think it detects it) then I believe it removes DC by re-calculating the values of all samples by the same amount. Here's a hypothetical example based on my understanding of how this works... Let's say you have samples in an audio file with values of:

 

1, 1, 1, 1, 200, 900, 200, 1, 1, 1, 1

 

Logic looks at those values and determines that the 1's are steady DC; it then subtracts "1" from every sample in an attempt to remove DC, resulting in:

 

0, 0, 0, 0, 199, 899, 199, 0, 0, 0, 0

 

I don't know if it follows exactly that process, but that's my general understanding of how this process works.

 

The example I posted above (the first one containing the waveforms) is similar to your numeric one, but obvoiusly logic didn't detect the zero values before and after the square wave burst to be steady DC (which in this case wouldn't need to be altered since it's already zero); Logic performed a sum of the complete sequence of sample values and then made this sum zero by adding a negative constant... So the beginning and the end of the waveform weren't zero anymore.

But you are right, there is no HPF which would have altered the even parts of the square wave burst.

Link to comment
Share on other sites

Jope,

 

Curious about something... Looking more closely at your waveform (copied below), you have only 1.5 cycles of the square wave, and I think that may have something to do with the result you got. Something tells me that if you had 2 complete cycles that you'd get a more correct result after using Remove DC Offset. Would you be able to test that out?

 

file.php?id=16281

Link to comment
Share on other sites

you have only 1.5 cycles of the square wave, and I think that may have something to do with the result you got.

 

You're right ski.

 

Jope, your results are normal: removing DC offset will find the average on your waveform and bring it to the center line. Your waveform has more positive values than negative values, so the average is not where the horizontal line at the start and end of your audio file is, but a little higher.

 

Here's another example:

 

Original audio file with 21% DC offset:

 

1747243483_Picture2.png.1999c1eabc0b91fdc5f008a11ffb1689.png

 

After removing the DC offset:

 

531028642_Picture3.png.19924a734d8a2157ad423c44977b7f8c.png

Link to comment
Share on other sites

Jope,

 

Curious about something... Looking more closely at your waveform (copied below), you have only 1.5 cycles of the square wave, and I think that may have something to do with the result you got. Something tells me that if you had 2 complete cycles that you'd get a more correct result after using Remove DC Offset. Would you be able to test that out?

 

I did. But first: the fact I used 1.5 cycles for this example was on purpose: It means there is an implicid offset as there's more "plus" than "minus" in the waveform. I just was curious if Logic would compensate it (it did!) or if it would proceed a more intelligent way... Which would have meant it left the waveform untouched.

The result is - mathematically speaking - offset free, but musically speaking it starts and ends with an audible "pop".

Now for the test performed on two full cycles: If you try to remove the (not existing) DC offset, Logic reports there is none at all... And does nothing.

Link to comment
Share on other sites

Jope, your results are normal: removing DC offset will find the average on your waveform and bring it to the center line. Your waveform has more positive values than negative values, so the average is not where the horizontal line at the start and end of your audio file is, but a little higher.

 

Yes, I know that by the result (and wrote it before). I think it is important to understand that

 

1. The DC removal function of Logic doesn't alter the shape of the wave

2. The function won't work twice on the same data if you don't change anything in between

3. The use of this function doesn't guarantee a "pop"-free start and end of the region.

 

BTW David (or someone else), do you know what happens if the DC shifting of the waveform would result in clipping? Maybe I'll test this later...

Link to comment
Share on other sites

BTW David (or someone else), do you know what happens if the DC shifting of the waveform would result in clipping? Maybe I'll test this later...

Then it clips the signal (Just did a quick test).

Ah, thanks. No warning at all? So here is an additional point:

 

4. The DC offset removal might in some cases result in clipping, especially for high levels and a non-neglegible offset. This can be avoided by lowering the amplitude first.

Link to comment
Share on other sites

  • 7 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...