When use Effect -> Amplify, does it impact sound quality?

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
LeeX
Posts: 145
Joined: Fri Jul 27, 2018 12:24 am
Operating System: Windows 10

When use Effect -> Amplify, does it impact sound quality?

Post by LeeX » Mon Aug 24, 2020 8:24 pm

Hi,

I recently received an accompaniment that has lots of clippings (red lines). Please see screenshot below.

clippings.JPG
clippings.JPG (24.55 KiB) Viewed 290 times

Almost all of these clippings can be removed if I use "Effect -> Amplify (Amplification -2.0 dB)". Can someone please let me know if "Effect -> Amplify with negative dB" can possibly impact sound quality? I guess the positive dB possibly have negative impact on sound quality because it likely introduces new clippings and makes existing clipping worse, but I'm not sure about the impact of negative dB.

Thanks & regards,
Lee

DVDdoug
Forum Crew
Posts: 9278
Joined: Fri Sep 10, 2010 11:30 pm
Operating System: Windows 10

Re: When use Effect -> Amplify, does it impact sound quality?

Post by DVDdoug » Mon Aug 24, 2020 9:28 pm

No, it won't affect quality but it won't fix (actual) clipping) either.

Audacity shows potential clipping where the peaks go over 0dB or where there are several 0dB peaks in a row. Audacity doesn't know anything about the wave shape.

What format is the file? What does Amplify default to?

Your file probably is clipped, but certain formats (such as MP3) can go over 0dB without clipping. And, the lossy MP3 compression process makes some peaks higher and some peaks lower so you can have a 0dB normalized WAV file and when you make an MP3 it goes over 0dB and Audacity will show (potential) clipping.

For example, if Amplify defaults to -2dB, your peaks are currently hitting +2dB and they are not clipped at 0dB.

But, if you have a file that goes over 0dB without clipping you can still clip your digital-to-analog converter so it's a good idea to reduce the volume. (Personally, I don't worry about the slight-clipping caused by MP3 if the original didn't go over 0dB.)
I guess the positive dB possibly have negative impact on sound quality because it likely introduces new clippings and makes existing clipping worse,
Right! But by default, the "Allow Clipping" box is unchecked so that shouldn't accidently happen. And, Amplify will always default to whatever up or down change is needed for peaks at exactly 0dB.
I recently received an accompaniment
If you make a mix, mixing is done by summation so mixing can cause clipping. You can reduce the levels (to peak ta -6dB) before exporting, or you can export as 32-bit floating-pint WAV (which has no upper or lower limits), then re-import the mixed file and use the Amplify effect to bring down the levels before exporting to your final-desired format.

LeeX
Posts: 145
Joined: Fri Jul 27, 2018 12:24 am
Operating System: Windows 10

Re: When use Effect -> Amplify, does it impact sound quality?

Post by LeeX » Mon Aug 24, 2020 11:25 pm

Wow, thanks so much for the details. Feels like I'm reading a textbook back in school :lol:

(1)
No, it won't affect quality but it won't fix (actual) clipping) either.
So even though those red vertical lines are gone after I apply "Effect -> Amplify (Amplification -2.0 dB)", it doesn't necessarily mean the clipping (if any) has been fixed?

(2)
What format is the file? What does Amplify default to?
The accompaniment is MP3 format, and screenshot below shows its default.

default_accpnmt.jpg
default_accpnmt.jpg (48.41 KiB) Viewed 280 times

(3)
For example, if Amplify defaults to -2dB, your peaks are currently hitting +2dB and they are not clipped at 0dB.
Is -4.356 in screenshot above the "Amplify defaults" you mentioned? How/where can we find the dB# its peaks hit?

(4)
Right! But by default, the "Allow Clipping" box is unchecked so that shouldn't accidently happen. And, Amplify will always default to whatever up or down change is needed for peaks at exactly 0dB.
So when "Allow Clipping" box is unchecked, no matter what positive number I put in "Amplification (dB)" field, Audacity will automatically change the dB number I put there to guaranty no clipping occurs?

(5)
If you make a mix, mixing is done by summation so mixing can cause clipping. You can reduce the levels (to peak ta -6dB) before exporting
Do you mean to give -6dB to both accompaniment and solo in mix (see screenshot below) when exporting?

-6dB.jpg
-6dB.jpg (75.32 KiB) Viewed 280 times


Thanks & regards,
Lee

DVDdoug
Forum Crew
Posts: 9278
Joined: Fri Sep 10, 2010 11:30 pm
Operating System: Windows 10

Re: When use Effect -> Amplify, does it impact sound quality?

Post by DVDdoug » Tue Aug 25, 2020 12:01 am

Good news! Your file goes over 0dB but it's NOT clipped!

Clipping is flat-topped (and flat bottom) waves. If you want to see what clipping would look like, export your file as WAV (regular WAV, not floating point). Regular integer WAV files can't go over 0dB.

Re-import the WAV and "Amplify" by -6dB so you can see chopped-off waves. (Technically, a negative value is attenuation not amplification.)
So even though those red vertical lines are gone after I apply "Effect -> Amplify (Amplification -2.0 dB)", it doesn't necessarily mean the clipping (if any) has been fixed?
Correct.
Is -4.356 in screenshot above the "Amplify defaults" you mentioned? How/where can we find the dB# its peaks hit?
Your peaks are +4.356dB.

And, if you run Amplify again after attenuating by 6dB, it should default to +1.644dB (to bring the peaks to zero.)
Do you mean to give -6dB to both accompaniment and solo in mix (see screenshot below) when exporting?
Yes, both. -6dB is 50%. It depends on the peak of both files and how the peaks line-up. If both files peak at -6dB or less you are safe.

FYI - More advanced audio software* has a volume control and a meter for each track, plus a master volume control and master meter, similar to an analog mixer. But, it's still hard to perfectly control the levels so it's common to export to floating-point, or leave plenty of headroom, and then re-import the stereo mix for final "mastering".




* Digital Audio Workstation applications are designed for multitrack recording & mixing, but they are more complex than an audio editor like Audacity.

LeeX
Posts: 145
Joined: Fri Jul 27, 2018 12:24 am
Operating System: Windows 10

Re: When use Effect -> Amplify, does it impact sound quality?

Post by LeeX » Tue Aug 25, 2020 7:12 pm

Clipping is flat-topped (and flat bottom) waves. If you want to see what clipping would look like, export your file as WAV (regular WAV, not floating point). Regular integer WAV files can't go over 0dB.
Thank you for the clarification. I incorrectly though before that tracks had clipping when the red vertical lines appear. Now it's clearer.

Regards,
Lee

LeeX
Posts: 145
Joined: Fri Jul 27, 2018 12:24 am
Operating System: Windows 10

Re: When use Effect -> Amplify, does it impact sound quality?

Post by LeeX » Wed Aug 26, 2020 5:34 pm

I just noticed another issue that may be related to what we discussed above...

Below is what I observed. Can someone please explain why such issue occurs, and how to fix it?

(1) When play two tracks (a solo and a accompaniment) together in Audacity (Windows 2.3.3), one section (~ 5 sec long) has noise like da...da...da...da...da. However, when play either of the two tracks alone, neither of them has such noise in that section. The noise only occurs when both tracks play together in Audacity.

(2) When export both tracks (mix them together) to a MP3 file (Bit Rate Mode=Preset, Quality=Insane 320kbps), the same section makes the same noise just like playing them together in Audacity. But if I export both tracks as a 32-bit float PCM WAV file, the WAV file does not have such noise in the same section.

Thanks & regards,
Lee

DVDdoug
Forum Crew
Posts: 9278
Joined: Fri Sep 10, 2010 11:30 pm
Operating System: Windows 10

Re: When use Effect -> Amplify, does it impact sound quality?

Post by DVDdoug » Wed Aug 26, 2020 5:55 pm

But if I export both tracks as a 32-bit float PCM WAV file, the WAV file does not have such noise in the same section.
Try re-importing the WAV. Does it show (potential) clipping? If so, run the Amplify or Normalize effect to bring-down the volume, then export as MP3. Or, just go-ahead and Amplify or Normalize (with the default settings).

LeeX
Posts: 145
Joined: Fri Jul 27, 2018 12:24 am
Operating System: Windows 10

Re: When use Effect -> Amplify, does it impact sound quality?

Post by LeeX » Wed Aug 26, 2020 9:47 pm

Try re-importing the WAV. Does it show (potential) clipping?
After re-importing the WAV, that "noise" section is as showed in screenshot below. Are those red circles "clippings"?

clippings_2.JPG
clippings_2.JPG (125.18 KiB) Viewed 240 times
If so, run the Amplify or Normalize effect to bring-down the volume, then export as MP3
Since I'm not sure how to use Normalize effect, I simply turn down volume gain on left-side panel. Then the noise goes away if I play both tracks in Audacity. MP3 file does not have noise either :D

Thank you for your information.

By the way, can we say 32-bit float WAV files always have better sound quality than MP3 exported from the same tracks?

Regards,
Lee

Post Reply