Click Removal

From Audacity Wiki
Jump to: navigation, search
Peter 2May14: This page is a potential candidate for deprecation, the material is, or should be, handled more than adequately in the Manual.
  • Gale 10May14: I deleted the text about "how to use" steps but the text about the Click Removal algorithm and about some other techniques of removing clicks is not available elsewhere. Even if we want to move all the "other techniques" material into the Manual, the information on the Audacity Click Removal algorithm should be moved to How Effects Work.
  • Peter 10May14: I made an entry with a link to this page on How Effects Work. The Spectrogram view tutorial is marked in the Wiki as a potential candidate for transfer to the manual. The other "other techniques" are referenced in the Manual in Remove clicks and pops.
  • Gale 12May14: OK I added "Silencing" to your LP workflow in the Manual and assume you will move the Spectrogram View tutorial to the Manual. Apart from testing "Subtraction" that leaves the detailed text about Hard Limiter. It cannot be removed yet because we link to it from http://manual.audacityteam.org/man/Hard_Limiter. I suggest moving the Hard Limiter text to Manual but I don't mind if it goes in your workflow as another bullet or is a separate page (the Spectrogram tutorial will have to be a separate page).

    At that point, should we move the algorithm information to How Effects Work and delete this page?

  • Peter 12May14:
    • Click removal using the Spectrogram view is already marked PT - I will get to this on my return from holiday.
    • I copied the algorithmic information to How Effects Work (no reason not to copy this now).
    • I copied the Hard Limiter details from Click Removal to my LP digitization workflow tutorial.
    • I always find the "subtraction" method a little esoteric - not sure we need it.
    • What we don't mention here is the technique for "big/long noise" of finding a similar piece of audio and pasting it over. This gets recommended on the forum from time to time - but it is tricky to do right/well.
    • ToDo-206 Marked for deletion on 2.0.6 release.
Click Removal (under the Effect Menu) tries to remove clicks from audio tracks. It is especially suited to removing random discrete clicks from a recording of a vinyl record without damaging the rest of the audio.
 
Related article(s):


Contents

Audacity Click Removal

How does it work?

The tool looks for short, abrupt discontinuities (known as "spikes") in the waveform, typical of those produced by a click on a record. Click Removal then interpolates the samples either side of the click to reconstruct the waveform. However, it's common sense not to rely exclusively on digital sound processing to clean up noisy records. Where possible, have the records professionally cleaned, or use your own cleaning methods.

The Click Removal algorithm consists of two parts:

The first part, click detection, works by measuring the amplitude of the sound in each small piece of the selected sound, and comparing it to the average amplitude in surrounding pieces. Short pieces of sound that are much louder than the region before or after might be spikes. (The threshold slider bar sets the square of the required ratio between the amplitudes inside and outside the loud section). Pieces of extra-loud sound that are shorter than the max spike width (measured in milliseconds) are marked for removal. This technique works well for vinyl record pops and clicks because it catches oscillations (not just single spikes). Electronic spikes typically drive the speaker in just one direction, but LP pops are harder to find because they often contain oscillation as the stylus and cartridge settle back down after the initial hit of the dust mote, groove gouge, or whatever.

The second part click removal, replaces the marked segment of sound. This part of the algorithm is pretty simple-minded -- it tries to make the audio samples move smoothly across from the position before the pop to the position after the pop. This may have the effect of creating a very short, hopefully not-very-noticeable silence in the track where before there was a loud click.

Click Removal steps

See Click Removal in the Manual.

Silencing and Draw Tool

Sometimes an even better result can be obtained by zooming in (CTRL + 1) to near sample level and either silencing the click (Edit > Silence), or using Draw Tool to smooth out the contours of the samples and so attenuate the click. Remember, the click will be visible as a "spike" in the waveform. Most discrete clicks up to 10 milliseconds long can actually be simply silenced or deleted without leaving an audible gap in the sound, although many clicks spread wider that that.

If the click is not suitable for silencing or deletion, enable Draw Tool by clicking the pencil icon center top of the Audacity screen, or press F3 on your keyboard. The mouse pointer will change to a pencil while over the audio track. You must zoom in until you can see the individual sample dots before you can use Draw Tool.

Click in the track at the point you wish a sample to be redrawn to, and wait for the samples to be rejoined together. Alternatively, click in the area of track where the line of samples is not smooth and hold down ALT on your keyboard. The pointer will now change to a brush. Each mouse click will then progressively smooth out the samples in the area. See Draw Tool in the current Manual for more help.

Use the Spectrogram view to identify clicks more easily

Click removal using the Spectrogram view is a workflow Tutorial giving steps to remove hard-to-spot clicks using Audacity's Spectrogram view. In the default Waveform view, loud clicks often show up as easily seen spikes, but smaller, lower amplitude clicks can be very hard to find without zooming in to near sample level then scrolling the waveform to identify the exact location of the clicks. Considerable time can be saved by first using Spectrogram view which identifies clicky regions more readily.

Other techniques

Silencing highly zoomed areas or redrawing samples can get tedious even over a relatively short stretch of audio. Here are a few other tricks you can try if Click Removal did not help as much as you hoped.

Repair of very short sections

Audacity has a Repair effect for very short sections of badly damaged audio up to 128 samples in length.

Spectrum analysis

Analyse the area with Analyze > Plot Spectrum to see if any spikes are concentrated in particular frequencies and then use Equalization under the Effect menu to reduce the volume of those frequencies. You can do this more precisely with the Notch Filter plug-in.

To install new plug-ins, unzip them into the Plug-Ins folder inside the Audacity installation folder. On Windows computers, this is usually under Program Files. On Mac OS X, it is usually under Applications. The plug-ins will be available after restarting Audacity.

Subtraction

Gale 10May14: ToDo-2 This could do with testing for usefulness.
Track Drop-Down Menu in legacy Audacity 1.2
Where the clicks sound equally loud in both left and right channels of a stereo recording (this often isn't the case), but the music information in the channels is very different at that point, you can try to cancel out the click by making the affected section of track mono and inverting one of the channels.
  • First, select the area of track that has the click, then click in the track name by the downward-pointing arrow to open the Track Drop-Down Menu (right). Choose "Split Stereo Track". Then in the Audacity menus at the top, choose Edit > Clip Boundaries > Split New. This moves the selected area into a new track underneath your original track.
  • Now on the new track, use the same Track Drop-Down Menu, make both channels mono and then select one of the channels by clicking where it says "Mono". In the menus at the top, choose Effect > Invert.

When you export the result as a stereo track, the area you split out will be effectively mono (in the sense that the previous music signal in the left and right channels will be mixed into both channels), but the click should be sharply attenuated without harming the music too much.

Hard limiting

Some users find the Hard Limiter an additional way of removing or attenuating clicks. A Hard Limiter is a particularly strong dynamic compressor to reduce the difference between loud and soft in an area of audio.

Steve 24Nov12: How does this work? Has this been tested and found to work? What sort of clicks does it work with? I'd not expect this method to make any significant improvement other than if there was a "click" where the audio touches or exceeds 0 dB.
  • Gale: It works as I added the description for it. Can you suggest how the description could be improved? Maybe easier to look in the Amplify effect to judge the limit level?

    I did actually test it before I modified this. The click does need to have a reasonably visible spike, but it's just as "successful" with a spike that only reaches -6 dB as one that reaches 0 dB. Why wouldn't it be, given it clips everything above the dB limit? It's far more effective on broad clicks and especially on LP "groove stitch" noises than Click Removal. I found it more effective on such noises than PopMute, unless you bring the attack/decay up and get the selection, threshold and mute levels exactly right. If you do, then yes PopMute might be preferable, but it's not available for legacy Audacity.

    • Peter 25Nov12: I seem to remember trying this technique a long while back when you recommended it to me Gale - but I don't recall it ever giving really satisfactory results.
    • Gale: Everyone's mileage will vary. I was pleasantly surprised that Hard Limiter got rid of a lot of groove stitching and ticks in quiet music on a recent LP transfer that Click Removal was useless for. Repair is of little use because a stitch noise can last anything up to several seconds. So I was saved the usual recourse of using Goldwave instead. The point I see is that since Audacity lacks all-in-one audio restoration tools, Hard Limiter is another possible tool in the armoury. Why deny people the chance of trying it?

A Hard Limiter is included in the Mac and Windows versions of current Audacity, underneath the divider in the Effect Menu. For Linux or for legacy versions of Audacity, a Hard Limiter is available in the SWH plug-ins suite as follows:

The Hard Limiter controls are are described in the Manual.

To try and remove the clicks, set the "dB limit" in Hard Limiter to the level of the bottom of the click spike, where it protrudes above the level of the music. If some of the click remains, set the dB limit a little lower to see if it is worth losing a little of the real audio signal to attenuate the click further.

To judge the dB limit accurately, it may be useful to use the Track Drop-Down Menu to change to Waveform (dB) view. You can left-click on the Vertical Scale to zoom in vertically, centered on the click point. You can also left-click and drag a region up or down then release to zoom vertically into that region.

Repair of broader clicks

Click Removal may not work well with broader clicks of 10 milliseconds or longer. Here are two Nyquist plug-ins you can try. Installation instructions for Nyquist plug-ins are here.

  • PopMute heavily attenuates loud clicks and pops (and even hand claps or small bangs) to make them less obtrusive.
  • Really loud and wide glitches may still sound too bad even if moderated with "Pop Mute". In that case, try EZ-Patch. This lets you repair the damage by selecting the glitch together with some undamaged audio on one side of the glitch, then smoothly replaces the glitch with the undamaged part of the selection.

Other software

It's also possible to use other software than Audacity for click removal, while still using Audacity for the other editing tasks and to produce the final master. Export your audio track from Audacity as a lossless WAV or AIFF file, and also save the click-removed audio as a WAV or AIFF for import back into Audacity.

Personal tools

Donate securely by PayPal, using your credit card or PayPal account!