Page 1 of 1

Strange Over-Clipping Issue

Posted: Wed Nov 11, 2009 1:04 am
by coldclimb
I'm having an issue with some songs recorded during live church services. Obviously my first problem is that I let the audio get clipped in the first place, but now after the fact I'm trying to make some CDs and a few of these recordings have an over-clipping issue in the waveform that I'm unfamiliar with. Basically the signal will peak at either the top (or bottom) of the spectrum, and then drop sharply toward to the other end for the next few samples, and then return to the top. This throws in a sharp and loud bit of static at the harshly overclipped parts, turning an already botched recording into something disgustingly horrid. :lol:

So I've tried manually adjusting the peaks to return them to regular clipped status, and that works, but it's very time consuming. I'm wanting to find out where this issue is coming from so I can prevent it in the future, and is there a filter of some sort to automatically eliminate the problem? I've tried the Click Removal filter and a Declipping filter without success.

We recently started using a cardioid microphone instead of our Shure SM58 for songs. Would that cause this sort of clipping?

This audio goes through a Mackie Onyx sound board to an HT Omega sound card via Line-In, and I'm recording with Audacity.

Re: Strange Over-Clipping Issue

Posted: Wed Nov 11, 2009 7:01 pm
by steve
This type of distortion is "polarity reversal".
It is a problem that is specific to digital audio. It should not happen, and on high quality expensive equipment it rarely if ever does, but not uncommon on budget equipment. It is probably occurring in your sound card.

What is happening is that each "sample" in the digital audio is represented by a binary number. If you keep counting up there comes a point where you run out of "bits" (binary digits) and the next number becomes negative. Similarly, counting down you will get increasingly negative until you run out of bits, then the number will abruptly become positive. As you say, the effect sounds horrible.

To avoid the problem you need to ensure that the signal level is within the usable range throughout the signal path. There are multiple places that the distortion can occur - in the mixer, in the sound card, in Audacity... My guess is that the output from the mixer was too high for the sound card input.

Basically, when you get this kind of damage you can wave goodbye to the show, but if you want to have a go at making it a little less horrible, I made a modified version of ClipFix that is able to handle some degree of polarity reversal.

A couple of notes about this version of ClipFix:

1) It was written as an experimental "proof of concept" - there are no guarantees - in the (admittedly extremely unlikely, but possibly amusing) event of your computer exploding, don't blame me.

2) It only works with mono tracks. If your recording is a stereo track you will need to split the track into 2 single channel tracks before using this effect. (Click on the track name and select "split stereo track")

3) It is very slow.

4) It uses a lot of memory - if you attempt to process a large section of audio your computer will probably run out of RAM and Audacity will probably freeze or crash.

5) Even if it does work, the repair will not be perfect (it is attempting to reconstruct data that has been obliterated) but it may sound a bit less bad.

Having said that, do try it and let me know if you have any success. :)

Notes for usage: (do not test this on a valuable recording - make a copy of your recording and experiment on that).
1) If the track is stereo - split it into 2 mono tracks.
2) Before you use the effect, you need to ensure that there is enough "headroom" for the reconstructed waveform. Use the "Amplify" effect if necessary (with a negative amplification amount) so that there is plenty of space within the track above and below the waveform.
3) Select a short section of damaged waveform - apply the effect and wait.......

If you get any error messages, run the effect again nut use the "Debug" button instead of the OK button. This should give a more comprehensive error message which you can copy and post on the forum.