Operating principle of the WavePurity Declick Filter

The method described here is protected by the WavePurity™ trademark. It was developed by
Ulf Schönherr specifically for the WavePurity software.

The method described in the following section is included in WavePurity since version 3.00.

As beautiful as our old records may sound - and nostalgia certainly plays a part - there is one thing that everybody complains about: While handling the records during many years, the needle may have slipped from time to time and left its mark on the record. The human ear is very sensitive to interfering noises. While the psycho-acoustic models of new compression methods such as MP3 take advantage of some weaknesses of the human ear, on the other hand, the ear is very sensitive to crackling noises and perceives them with high accuracy. We also perceive dull crackling and rumbling noises quite well. Particularly in the quiet sections of the music, the needle of the record player has left its mark.

Just like many other programs, WavePurity was designed to fight these clicks and crackling noises. However, that is more easily said than done, in fact, it is one of the most complicated tasks of digital audio signal processing. Particularly in sections of medium volume, it is extremely difficult to identify clicks within the normal signal range. And it is just as difficult to eliminate them without causing unwanted side effects which would be equally unpleasant to hear as the original click. It would be a mistake to believe that a click could be removed simply by drawing a straight line from A to B (A and B being the beginning and the end of the click). The method is possible, but the effect is worse than the original - quite apart from the missing portions in the signal range.

Because the human ear perceives "spectrally" and differenciates well between medium pitch and treble, it reacts very sensitively to a short disruption in the entire frequency range. And this is precisely the unpleasant effect that is caused by clicks. Those readers who are familiar with signal theory will be aware of the fact that a short impulse (which is nothing but a click) causes an almost even disruption across the entire frequency range. This is referred to as a Dirac function or pulse function. Ideally, this creates a horizontal line in the frequency spectrum, so that all frequencies have the same energy for a short time. The resulting noise is usually unpleasant to hear. For example, if someone switches off a vacuum cleaner near you while you are listening to the radio, the sudden change of the magnetic field in the engine causes a short impulse which, if the radio reception is of low quality, will cause your radio to emit a "cracking" noise. In principle, this is the same phenomenon.

Step 1: Identifying clicks
The fact that we know how an impulse looks "spectrally" can be used to identify it. This is what WavePurity does. Progressing in small steps, the software analyzes the signal of the music track within the spectral range (frequencies). If there is a short peak, compared to the normal run of the curve, over a majority of all freqencies (wavelengths), this indicates that a click has been found.

Step 2: Removing clicks
If the identifying algorithm has found a click, it will narrow down its position. The start and stop positions are passed to the repair algorithm. The next, difficult task is to separate the click signal from the normal signal and to remove the disruption. This is more easily said than done. WavePurity solves this problem as follows:

  • The disruption is placed centrally in a signal buffer. This signal buffer has 2N samples. So, it can be passed directly to an FFT algorithm.
  • Next, an FFT (Fast Fourier Transformation) is performed. This creates a first frequency spectrum which contains both the signal and the disruption. The algorithm stores this spectrum.
  • In the next step, all parts of the signal range on the right and left of the disruption are masked, and another FFT is performed. The result is a frequency spectrum which contains only the disruption.
  • Now the disruption spectrum is subtracted from the original spectrum.
  • The result is transformed back into the time range (samples) via inverse FFT. In the resulting signal, the click has been eliminated.
  • A very pleasant side effect of the inverse FFT transformation is the fact that, in the position of the eliminated click, the original parts of the signal are reconstructed by the sinus and cosinus values of the FFT This means that the tone (frequency) found on the left and right of the repaired position is emulated in the repaired position. In this way, no "intermissions" are caused.

In reality, however, the process is not quite as straightforward as described here. For example, a number of software tricks are necessary, such as a soft cross-fading between the original and the repair signal. Furthermore, it is advisable to tilt the spectrum into a horizontal position by a slope offset correction before the repairing process is carried out. This helps to compensate for direct voltage signal parts in the selected section. Thirdly, it is immensely important to process the lowest frequencies separately. This helps to preserve the general low-frequency signal form during repair.

Separate treatment of clicks and large dull cracks (pops)
For all audio restoration programs - WavePurity is no exception - it is a very difficult task to recognize large dull cracking noises which were caused, for example, when the needle slipped and left a "Grand Canyon" mark on the record. When the record is played, the needle jumps on the record and may even land in a different groove. The long low-frequency disruptions caused by this damage can only be identified by a special algorithm. For repairing the damage, WavePurity then applies the same repair module (with a different buffer size).

Generally, algorithms for identifying dull cracks are very frequently mislead by normal music effects such as bass beats, which are then falsely identified as cracks. If these were repaired, obviously, the bass beat would be eliminated. Therefore, you should only apply this crack filter if you are absolutely sure that your record really contains dull cracks. On the other hand, you should always eliminate crackling and noise. The click filter will partly identify even the smallest irregularities and correct them.

How do I set the click and crack filters?
There is really only one parameter, namely a threshold for the identification limit. If you feel that the crack and click filters identify too many sections, you should increase the threshold. Unfortunately, there is no universal concept for determining the threshold values. They strongly depend on the type of music and the quality of the record, and must be adjusted for every record. With a value of 10, you will usually get acceptable results.

Please be patient!
Signal analysis in the frequency range is a very time-consuming task and can really bring your CPU to a boil. But there is no instant magic. You have the choice to either take the time and analyze your data thoroughly, or to leave it. WavePurity aims at thoroughness. This means that you will have to be prepared for long calculation times: up to 5 to 10 times the duration of a music track (depending on your CPU). But consider that you will only have to do this once for every record - and quality should be your most important aim. After all, you can let WavePurity do the work for you over night.

« back to overview