Remove crackle due to data loss

GoldWave general discussions and community help
Post Reply
saunddj
Posts: 2
Joined: Tue May 12, 2009 1:42 pm

Remove crackle due to data loss

Post by saunddj »

I am looking for an algorythm or something that can search and correct the crackling that results from data loss during recording. I thought that sitting close the speaker was better but I found out that it overdrove the mic on my MP3 recorder resulting in data loss which is heard as a crackling noise during playback. You can detect the data loss in the wave form and I am currently manually correcting by simply restoring a straight line to the wave form. The result is the crackling is reduced and I can better hear the recording. But there are two hours of recording and it is getting awfully tedious. :cry:

Any help would be greatly appreciated.
DougDbug
Posts: 2172
Joined: Wed Feb 16, 2005 3:33 pm
Location: Silicon Valley

Post by DougDbug »

You might try Effect -> Filter -> Click/Pop. I think that filter is really designed to reduce vinyl record noise, but it might be worth a try.

Don't bother trying the Noise Reduction filter. This is designed to reduce background noise, and it works best with a constant low-level background noise.

For vinyl record "ticks" & "pops", I use Wave Repair ($30 USD). It's also very tedious, and it typically takes me a day, or a full weekend, to fix-up an LP transfer.

Wave Repair does have some better methods than straight-line interpolation, such as replacing the defect with the just-preceding few-milliseconds of sound, etc. But, I have no idea how well it would work with particular your defects. With your file, I wouldn't expect "perfect" restoration with any software. There is no substitute for getting a good recording in the first place. Even with modern high-end audio software, the professionals still use good quality low noise equipment in soundproof studios.
I thought that sitting close the speaker was better but I found out that it overdrove the mic on my MP3 recorder resulting in data loss which is heard as a crackling noise during playback.
Your theory was right! Either your recorder is low-quality, or it was set-up incorrectly. You need to be close to reduce room noise pick-up. Radio & TV announcers and singers work with the mic a few inches from their mouth. It's always a challenge to keep a strong level (for a good signal-to-noise ratio) while preventing distortion. Live event recording makes this especially difficult.

It's going to take some experimentation with your MP3 recorder to learn how to get the best from it... If your MP3 recorder doesn't have a recording volume control (and no recording level meter), it probably has an automatic volume control (AVC). AVC can be a blessing and a curse, because when the speaker pauses, it senses a low signal level and cranks-up the level (and the background noise). Then when the speaker starts speaking again, you get overload distortion until the AVC re-adjusts.

If you have a choice, it's better to apply AVC in post-production with something like GoldWave's AutoGain. Since you working with an already-recorded file, it can "look ahead" rather than reacting after the sound level changes. And if you don't like the results, you can always revert to the original file.


BTW - I don't like to see people using computers for recording live events either. Computers are just too unreliable for anything "critical", unless you've got a backup running in parallel.
Mr Sweden
Posts: 2
Joined: Fri May 08, 2009 6:52 pm

Re: Remove crackle due to data loss

Post by Mr Sweden »

saunddj wrote:I am looking for an algorythm or something that can search and correct the crackling that results from data loss during recording. I thought that sitting close the speaker was better but I found out that it overdrove the mic on my MP3 recorder resulting in data loss which is heard as a crackling noise during playback. You can detect the data loss in the wave form and I am currently manually correcting by simply restoring a straight line to the wave form. The result is the crackling is reduced and I can better hear the recording. But there are two hours of recording and it is getting awfully tedious. :cry:

Any help would be greatly appreciated.
For whatever it's worth, here is what I do to clean up my Vinyl when converting to CD/MP3. It's not the perfect way but works great.

- Record your Vinyl, I use a turntable w/ USB connector
- If you want to burn a CD w/ tracks, set a cue marks at each new track, same if you want to have separate MP3 instead of one file for each side of your vinyl
- Find an empty space between two songs and select it. If possible, try to pick a space with not to much pops and clicks.
- Select the area and apply Pop/Click filter w/ tolerance 2000 (this usually works fine but you can select any tolerance you like)
- Copy the selection to the clipboard, undo the Pop/Click filter. You now have a base for your noise reduction later. If you have say a live recording with no silent space, skip this part
- Trim your raw file in the beginning and end so you get no empty spaces there.
- Select the whole track and apply Pop/Click filter w/ tolerance 2000. NB, use the same tolerance here as earlier when copying the silent part
- Select Noise Reduction filter, choose Use Clipboard and OK. If you don't have anything to use in your clipboard, select "Very light hiss/rumble removal" in the Presets options, it usually works fine.
- Save your file.

I usually listen through it once to make sure there is no hacks that needs to be cut. If the Pop/Click filter cannot remove the click, try to simply cut it out. If it's no longer then 0,2 sec you won't here the difference anyway. The end result is great, I used this on both classic, pop and rock music.
saunddj
Posts: 2
Joined: Tue May 12, 2009 1:42 pm

Post by saunddj »

Mr. Sweeden and DougDbug, Thanks for your replies. I to adress a couple of items in your replies, this is not a recording from a vinyl record. For that I use GrooveMechanic, it works great, but that's all it does, but it removes the pops and clicks really well. This was a live recording and I was sitting too close to a speaker. I tried using the pop/click filter in GoldWave but it did not even touch it. But I am sure that the algorythm for this would be similar.

Is there anyone out there that could show how I can write and import such an algorythm? I maybe able to write myself since I am a professional programmer, I just am not familiar enough with this product to know how to write an algoryth and get it imported.
DougDbug
Posts: 2172
Joined: Wed Feb 16, 2005 3:33 pm
Location: Silicon Valley

Post by DougDbug »

Yeah, we know. :wink: But, it seems like a somewhat similar issue... You've got some short-duration, severe defects. Where the defects occur, there is no way to isolate the noise from the useful audio, or there is no useful audio during that time.
I am a professional programmer, I just am not familiar enough with this product to know how to write an algoryth and get it imported.
The good news is, there is a FREE Plug-In SDK for GoldWave! For the algorithm(s)... First you need to detect the defect, and second you need to make a "repair".

For repair techniques, I would suggest you download the trial verson of Wave Repair and take a look at it's methods. It may turn-out that Mr. Sweden's method of simply chopping-out the defect or straight-line interpolation is fine, but you might want to consider some other techniques.

Automatic detection of the defects might be more difficult. Wave Repair is week in this area, but your defects may be easier to find, because they are all associated with "overload", and probably all "severe". You'll need to analyze the amplitude and frequency content, and maybe just look at the waveform to see if you can identify the characteristics. (As a programmer, you may already be familiar with FFT/DFT.*) When you look at a spectrogram of a vinyl record, you can see the clicks & pops (at least the bad ones). I believe Audacity has a spectral display option. If you can see the defect on a spectrogram, you should be able to detect it with FFT. You might want to write a program that detects a defect, and then allows you to manually confirm & repair.

* If you're not familiar with FFT, the usual approach is to download a library or find a "cookbook" algorithm. It's all been done before, and there's no point in developing that code yourself.
Post Reply