Ubuntu – How to check music file for distortion

configurationmusicpulseaudiosound

Distorted audio

Sometimes, when playing some music file, it just does not sound right – for example it sounds like it's distorted by overmodulating – but it's not so strong that it is obvious how it was distorted. Part of the distortion may even intended effects in the original recording.

Present in file, or caused by playing it?

The problem is, that even when there is a distortion, it may not be from the file, but added later in the processing steps of pulseaudio, when it mixes relative volumes together.

Where to start looking?

To know where I have to look for the issue, I would like to have some kind of test tool, that can recognize and identify strong typical distortions – so strong that they are even audible, so the detection may well be possible.

With this, if the mp3 file tests ok, I know I need to fix my volume setting. If not, maybe I can just accept the distortion from the original.

Finding the feature

There are various audio tools, from sox to audacious, but I do not know where to look for what I need here.
It could be a command line tool, or a feature in the menu of a complex program.

Best Answer

One easy to use tool is Audacity which has the capability of showing distortion in your original file in an easy to under stand graphical manner. Simply import your file and then activate the clipping detection by using:

View --> Show Clipping

and you will see vertical red lines to indicate where the distortion is occurring. See below on a stereo mp3 file of my own:

enter image description here

This will give you an idea of any distortion in the original file, Audacity also has a tool that you might like to try to fix the issue under:

Effect --> Clip Fix 

which I confess has had varied results on my own system...

References:

Related Question