Stop from saving audio with clipping

Give us an option or a warning when the audio to be saved is clipped!

Example
You have an audio within reasonable parameters showing nicely on the wave view. Then you apply a VST effect like amplifying the bass +2dB. Clipping will happen but it is not shown on the wave view. When you save the audio, it is saved with the clipping. When you open the file later, you have heavy clipping that you cannot repair because you don’t have the original file any more.

That is why you must either show any audio change from the live filter on the wave view or at least provide a warning while saving that clipping will be present.

There IS already a warning about clipping in the ‘View’ menu. Just tick the box that says “Show Clipping in Waveform”. I leave it on all the time. And why would you not keep an original?

1 Like

As you may know, Audacity uses floating-point internally so it can go over 0dB and it’s not actually clipped until you export.

It’s good practice to run the Amplify or Normalize effects as the last step before exporting. You can either accept the default, which will adjust the volume up-or down, bringing the volume down to a “safe” level, or with Amplify you can just check the default change and if it’s going to increase the volume you have headroom and you can cancel the effect and leave it as-is.

Or, if you have multiple tracks that will be mixed during export you can export as 32-bit floating point WAV (which can go over 0dB without clipping). Then re-import and Amplify or Normalize and re-export as your desired format. If the floating-point file goes over 0dB, Audacity will “show red” for potential clipping but it’s not actually clipped.

Your final file shouldn’t go over 0dB because the listener will clip their DAC if they play it at “full digital volume”.

because you don’t have the original file any more.

Why can’t you keep the original file until you’re sure you don’t need it? :wink:

P.S.
If you are making MP3s,
MP3 is lossy compression. The wave shape changes making some peaks higher and some lower. So it’s not unusual for Audacity to “show clipping” even though the original wasn’t clipped. Normalizing to around -1dB before exporting usually prevents that.

In this case, the MP3 isn’t really clipped because MP3 can go over 0dB without clipping. (Audacity is showing potential clipping.) But again, the DAC can be clipped during playback.

…Personally, I don’t worry if my MP3s go slightly over 0dB. As far as I know, this slight clipping isn’t audible (and MP3 is lossy-imperfect anyway) and I’m usually using software volume control so I’m usually not sending full-volume to the DAC.

But does the Show Clipping indicate that it will clip when exported? If not, how does it help, as a feature?

Normally Show Clipping works fine as a warning. It should “show red” if the peaks hit or exceed 0dB.

There are exceptions when you are mixing because the individual un-mixed tracks may not exceed 0dB, or with MP3 it may not exceed 0dB until the MP3 is created. In both cases it won’t know unless you re-open the exported file.

It also doesn’t differentiate between actual clipping and potential clipping. You can get false positives and false negatives… If you have clipped audio, lowering the volume (using a negative Amplify value) will “hide” the clipping by keeping the peaks below 0dB, but that doesn’t change the wave shape and remove the distortion.

I appreciate the explanation. I hope I get the hang of it one day. There is a lot to be said for ignorance being bliss… :laughing:

Solution (Workaround)
No warning is issued if you save a file with resulting clipping. However, in the editing/processing stage, you can set the encoding to “32-bit float” or “64-bit float“. That with preserve the information above 0 dB. The wave view will show the clipping (red vertical lines), but that can be managed by reducing the level. The apparently clipped information will be restored. Save in regular “signed 16-bit PCM“ encoding in the final stage after all the clipping was solved.

Still, warning about clipping while saving is a must.