Waveform post processing

DearTeam Audacity,
Approaching you for a solution to a peculiar problem noticed while processing a heavily clipped mp3 file. I edited the Cleanspeach chain to retain only the normalize-leveller-normalize effects before the last step of exporting of the mp3 file. When a particular file was imported, the waveform had a sea of red indicating heavy clipping. As the normalize and levelling effects of the chain got applied, the ‘red’ in the Waveform vanished. As a last step, the file was exported to the mp3 format on expected lines. I did not delete the existing waveform/close audacity at the end of the processing activity. Out of curiosity, I imported the ‘processed’ file back into Audacity to compare the two waveforms (the waveform displayed at the end of the application of the audacity chain and the waveform of the ‘processed’ file). To my surprise, the waveform of the imported ‘processed’ file had a fair dose of red once again(though much less than the original waveform). I repeated the experiment by importing the original file once again and applied only the leveller effect this time (instead of the chain) and exported the ‘levelled’ file as mp3. The results were similar- there was a significant difference between the waveform displayed at the end of the leveller-export process and the waveform of the ‘re-imported’, ‘processed’ file. Any explanations? Can the ‘re-emergence’ of the ‘red’ be avoided? Why is there such a difference between the two Waveforms when the only thing that differentiates the two is an ‘export as mp3’ process? Thanks.

As I’m sure you know, MP3 is a lossy format… That means the encoded/decoded data is different from the original uncompressed data. The peak level is one of the things that can change… Some peaks wil be higher, some peaks will be lower… However, you are unlikey to hear the slight clipping.

I’ve never heard of a case where this was audible… If you hear MP3 compression artifacts, you usually hear something else… That is if you hear MP3 artifacts, reducing the level by a small amount to prevent clipping won’t eliminate the artifacts. And, it the MP3 is transparant (sounds identical to the unmompressed file in a blind listening test), normalizing for 0dB beaks before encoding will not make it non-transparent.

If you want to prevent it, you can use the Amplify effect, and set the peak level to something like -1dB.

In fact, the MP3 might not be clipped… It might “safely” go over 0dB without clipping… It’s my understanding that MP3 uses floating-point and (like Audacity’s internal format) it can go over 0dB. But, I think some MP3 encoders & decoders can go over 0dB and some cannot. Of course if you try to send a signal over 0dB to your DAC, it’s integer-based, it has a hard-limit, and it will clip.

If the original file was heavily clipped (as indicated by the abundance of red) there will be a lot of places where the waveform is (clipped) at 0 dB.
Red lines will occur if the audio touches 0 dB even if it is not actually clipped.
The Leveller effect will often bring audio up to (but not beyond) 0 dB, so it is not going to cause any more clipping than was originally present, but where the waveform touches 0 dB the warning red lines will still show.

Thanks DVDdoug and Steve - most of your comments went over my head though!!

As pointed out, MP3 always creates distortion. The fresh show sound and the MP3 show sound are always different. It’s built-in and you can minimize it, but you can never make it completely go away. That’s why we tell people never do production in MP3. You can’t ever get a good quality show at the end; it keeps creating more and more trash

If you insist on blue waves hovering right around 0dB, the clipping point, then you will likely always have some parts of the show with red tails. MP3 is unstable and unpredictable what it’s going to do to the waves. If you Effect > Amplify to -1dB instead of 0, I bet a lot of the red tails go away.

If you do very simple editing and effects, you may find MP3Splt handy. It can do very simple things to the show without making a whole new MP3 and creating more damage.

http://mp3splt.sourceforge.net/mp3splt_page/home.php
Koz