What is "clipping" distortion?
What causes it, and how to avoid it when recording audio?
Clipping occurs when the signal exceeds the maximum dynamic range of an audio channel. If you're recording a sine wave, clipping looks like somebody cut the top and bottom of the sound wave:
Analogue equipment will often add other artifacts along with clipping and rarely will the peaks be cut cleanly as with digital clipping. In some applications, this kind of distortion is sought after and desired with analogue equipment. Digital clipping sounds very harsh and is usually to be avoided at any cost, but artists like Björk has experimented with digital clipping as a distinct effect as well. Some genres of electronic music now use digital clipping along with bit reduction and sample frequency reduction liberally as effects alongside regular distortion, reverb, chorus, etc.
When recording, you need to adjust the gain-control of the pre-amp so that the peaks do not exceed the maximum dynamic range. This is often indicated as 0dB, or with a overload LED indicator. To prepare for the recording, make sure you receive the same kind of sound signal as the actual recording and adjust the gain until the peaks almost hit 0dB. Your goal is to get as close as possible to 0dB without exceeding it throughout the entire recording. Doing so will guarantee the maximum dynamic range and the lowest possible noise level in your recording.
Throughout mixing and post production, you also need to watch out for clipping (unless you intend to use it for effect). Again, most equipment, analogue, digital, physical or software will have indicators for clipping.
"Clipping" or "hard clipping" distortion generally refers to trying to record at a volume level that is higher than the maximum value your hardware will check for. Since it can't store this value, it simply records the highest value available. If you look at the waveform, the peaks will look flattened off, as if someone clipped them off with a set of shears.
This is different from "soft clipping" which usually refers to the often-desirable distortion introduced by analog hardware such as tube-based amplifiers.
You avoid clipping by making sure your input levels are always below the maximum. I like to pick a target value to aim for (in digital, usually -12 or -18 dB depending on where the noise floor is) and try to keep it there. A little higher is okay, but the highest value I ever record should stay lower than -0, otherwise digital clipping will occur.
Most recording software has a "peak" or "redline" indicator that lets you know when you're getting close to this level.
Any audio signal path, digital or analog, will have a maximum amplitude. If you feed it a signal, or amplify it more, you will get "clipping distortion".
You avoid it by doing something that you should always do at all times: You should make sure that at each part of your signal path the path should be as loud as possible without distortion, but no louder. This will minimize noise.
Almost everything that can clip will have some sort of clipping indicator. Turn the levels up until it clips, then turn it down until it doesn't.