Clipping is a form of waveform distortion that occurs when an amplifier is overdriven and attempts to deliver an output voltage or current beyond its maximum capability. Driving an amplifier into clipping may cause it to output power in excess of its power rating.
When an amplifier is pushed to create a signal with more power than its power supply can produce, it will amplify the signal only up to its maximum capacity, at which point the signal can be amplified no further. As the signal simply "cuts" or "clips" at the maximum capacity of the amplifier, the signal is said to be "clipping". The extra signal which is beyond the capability of the amplifier is simply cut off, resulting in a sine wave becoming a distorted square-wave-type waveform.
Amplifiers have voltage, current and thermal limits. Clipping may occur due to limitations in the power supply or the output stage. Some amplifiers are able to deliver peak power without clipping for short durations before energy stored in the power supply is depleted or the amplifier begins to overheat.
The higher frequency harmonics generated by an amplifier operating in clipping can damage a connected loudspeaker. This additional high frequency energy has the potential to damage a tweeter via overheating. As a result, many amplifier designers have incorporated circuits to prevent clipping. The simplest circuits act like a fast limiter, which engages about one decibel before the clipping point. A more complex circuit, called "soft-clip", has been used from the 1980s onward to limit the signal at the input stage. The soft-clip feature begins to engage prior to clipping, for instance starting at 10 dB below maximum output power. The output waveform retains a rounded characteristic even in the presence of an overload input signal as much as 10 dB higher than maximum specified.
In digital signal processing, clipping occurs when the signal is restricted by the range of a chosen representation. For example, in a system using 16-bit signed integers, 32767 is the largest positive value that can be represented. If, during processing, the amplitude of the signal is doubled, sample values of, for instance, 32000 should become 64000, but instead cause an integer overflow and saturate to the maximum, 32767. Clipping is preferable to the alternative in digital systems--wrapping--which occurs if the digital processor is allowed to overflow, ignoring the most significant bits of the magnitude, and sometimes even the sign of the sample value, resulting in gross distortion of the signal.
The simplest way to avoid clipping is to reduce the signal level. Alternatively the system can be improved to support higher signal level without clipping. A limiter can be used to dynamically bring the levels of the loud parts of a signal down (for example, bass and snare drums).
Clipping can occur within a system as processing (e.g. a all-pass filter) can change the phase relationship between spectral components of a signal in such a way as to create excessive peak outputs. The excessive peaks may become clipped even though the system can play any simple sine wave signals of the same level without clipping. As such, some audiophiles will use amplifiers that are rated for power outputs over twice the speaker's ratings.
It is preferable to avoid clipping, but if a recording has clipped, and cannot be re-recorded, repair is an option. The goal of repair is to make up a plausible replacement for the clipped part of the signal.
Complex hard-clipped signals cannot be restored to their original state because the information contained in the peaks that are clipped is completely lost. Soft-clipped signals can be restored to their original state to within a case-dependent tolerance because no part of the original signal is completely lost. In this case, the degree of information loss is proportional to the degree of compression caused by the clipping. Lightly clipped bandwidth-limited signals that are highly oversampled have the potential for perfect repair.
Several methods can partially restore a clipped signal. Once the clipped portion is known, one can attempt partial recovery. One such method is interpolation or extrapolation of known samples. Advanced implementations may use cubic splines to attempt to restore a continuously differentiable signal. While these reconstructions are only an approximation of the original, the subjective quality may be improved. Other methods include copying the signal directly from one stereo channel to another, as it may be the case that only one channel is clipped.
Several software solutions of varying results and methods exist to repair clipping: CuteStudio Declip, Sony Sound Forge, iZotope Rx3, Adobe Audition, Nero Wave Editor, declipping solutions from CEDAR Audio, and Audacity plugins such as Clip Fix.
In analog audio equipment, there are several causes of clipping:
Some audiophiles[who?] believe that the clipping behavior of vacuum tubes (especially when used with little or no negative feedback) is superior to that of transistors, in that vacuum tubes clip more gradually than transistors, resulting in harmonic distortion that is generally less objectionable. This gradual onset of clipping is known as gain compression or "soft clipping". Circuits can be designed using either tubes or transistors to achieve this effect, and the behavior can be simulated with digital processing.
Clipping in a circuit can be detected by comparing the original input signal with an output signal that has been adjusted for changes in applied gain. For instance, if a circuit has 10 dB of applied gain, it can be tested for clipping by attenuating the output signal's gain by 10 dB and comparing it to the input signal. If the circuit is driven into clipping, the attenuated output signal will show less voltage in the comparison. The electrical offset between the two signals can be used to illuminate clipping detection indicators, such as a red LED, and can be used to decrease the gain of a preceding circuit so that the level of clipping distortion can be limited.