remove coughs

I am a new user and have recorded a group singing. One member of the group coughs once during the song, this is not good. How do I remove this without removing part of the song? Can I minimize the cough sounds by reducing the peaks made by the cough?
Please help.

The sneaky way to do this is replace the cough with a phrase of song from somewhere similar in the song.

Start a second timeline under the current one and paste the song possibilities on that. In 1.3, it’s Tracks > Add New. Audacity will play all the tracks unless told not to. Use the Timeshift and Envelope Tools to line up the new note over the old cough, then do some artsy cross fading.

Next time this happens, of course, you can use a portion of the song from the second or third take of the live performance.

This is advanced editing and I’m not going to be able to cover all the nuances and techniques you need in one post.

Some people also assume that “recorded Live” means you got the song “live” from the internet. If you did that, then editing may not work as well. Internet compression and sound processing doesn’t lend itself to complicated editing.

Koz

If you don’t do that replacement trick, then you will be stuck with some disturbance where the cough was, almost no matter what you do.

Koz

Thank you so much for your help. I will try this.

This kind of thing happens more often than you think. There is an NPR radio show whose theme song is one entire phrase longer than it was when the performers originally did it.

Koz

I’ve just been looking lately for a fix for this problem and found a site which may help someone who is Python and DSP savvy.
Look at:http://www.owlnet.rice.edu/~elec301/Projects02/lorisFor/index.html
There is code on Sourceforge at: http://sourceforge.net/projects/loris/files/

The procedure is described at: http://www.owlnet.rice.edu/~elec301/Projects02/lorisFor/our_algorithm.html

And for the really skilled and determined there are suggestions as to how to do it better at:
http://www.owlnet.rice.edu/~elec301/Projects02/lorisFor/conclusion.html

It is possible that some of the tools used in this algorithm exist in Nyquist and the right person may be able to be implemented an Audacity plugin to reduce or remove unwanted sounds.

An alternative approach which should be helpful is to use the DSS or Denoising Source Separation algorithms described at:
http://www.cis.hut.fi/projects/dss/
or more comprehensively in: http://jmlr.csail.mit.edu/papers/volume6/sarela05a/sarela05a.pdf
Some of the demonstrations separations are little short of amazing. It clearly is possible to use advanced statistical methods to remove unwanted contributions to sound recordings. It just needs someone with the enthusiasm and coding skills to tackle it.
I wish I was!
:wink:

<<>>

Are you volunteering? The whole Audacity Project is staffed by volunteers.

But failing that, anyone with a modicum of editing skills can cover up the cough with a similar phrase from somewhere else in the song.

Koz

<<<Are you volunteering? The whole Audacity Project is staffed by volunteers.>>>
I really wish I did have the coding skills to volunteer. My years as a programmer/software developer were in the 60 to mid 70’s and my math skills date from the 50’s! If you can suggest something I might effectively do let me know.

I do intend continue chewing away at the conceptual signal separation problem and will volunteer any results when/if I get some.

The point of my posting was:

  1. to dispose of the idea that “it can’t be done” as stated on a number of sites I’ve consulted.
  2. to attract the attention of any interested/capable people to the fact that there are now new, powerful & tested statistical techniques for separating & removing sounds including noise, power noise & unwanted sources(like coughs) which take advantage of the sources particular statistical properties.
  3. Suggest that these techniques might possibly be transferred from academic papers and open source matlab/octave code into useful tools for Audacity users.

Maybe I should post all this somewhere else??

<<<But failing that, anyone with a modicum of editing skills can cover up the cough with a similar phrase from somewhere else in the song.>>>

Finding and fitting a replacement of required pitch,dynamics and duration is a non trivial exercise, especially in some music (eg mixed piano & singing)

Hi Rob,
Your programming skills may well very rusty from that time ago (mine certainly are - I last programmed in Fortran on mainframes and minis). However I bet that your technical writinhg an editing skills are still intact. And from your postings you clearly have some good technical insight into digital audio. As Koz says the development team is pretty small - but the documentation team is even smaller and would welcome further technical writers editors with a good grounding in the subject and a good knowledge of Audacity (or even parts of it).

The manual, as with lots of s/w, lags a way behind the s/w development - lack of such documentation resources may end up being the delay in getting 2.0 out the door later this year. So if you do feel you have the skill and the time to spare do drop Gale Andrews a PM - I’m sure you’d be welcomed to the team.

WC

And back to the original problem. You are describing Noise Reduction software. Expose the software to its “profile” (sample of the noise) and it will try (later) to subtract that “noise character” from your selection or show. It’s possible you can select the middle of the cough, get the profile, and then select an area before and after the cough and see what happens – apply the filter. Only from Audacity 1.3, by the way. The NR software in 1.2 was pretty preliminary.

Also, it’s not a simple “get rid of the junk” problem. On non-pro sound equipment, you also have intermodulation distortion where even if you do remove the cough, there’s no intact music underneath to reveal.

And if you downloaded the performance from the internet or compressed it locally to save space, it’s pretty hopeless because Sound Character is one of the things that gets sacrificed in compression. The joke is that compression can turn two fish-and-chips violins and a Stradivarius into three fish-and-chips violins. That removes all the handles that noise reduction – or any other software like it – uses to do the work.

Koz

Can you post the cough and one or two minutes on both sides of it? As high a quality as you can. Don’t bother sending MP3.

You can try one of the many free posting services or ZIP the WAV file and post that here.

Koz

But many times it CAN be done, both effectively and relatively easily, without the need for advanced degrees in acoustics, mathematics and computer programming.

There has been a lot of work done by a lot of very clever people over the past few years in developing noise separation. For the film, music and television companies, a good solution to the problem would be worth $ millions. Although there has been a lot of progress made, and some very impressive “samples” demonstrated, there is still a very long way to go.

The mathematics alone are extremely complicated - here’s a “simple” example of the kind of thing involved:

It’s certainly light years beyond my Nyquist programming skills, but I can do a pretty good edit with Audacity.

The range of positive to negative infinity is a long way.

Koz

I understand the maths above. I use Z transforms and the like at work for
control engineering and DSP for detecting flames and the like.

In 1988 my college project was DSP based 68000 / C stuff, s plane to tustins of filters
(s _> Z) and FIRs and FFTs etc, so been doing this kind of thing for a while
Would like to know more about have to develop plugins.

Would like to develop an anti cough/unexpected noise filter.

Really need a bit of API knowledge fast track tips etc.

Probably the easiest type of effects to develop are “Nyquist plug-ins”.
“Nyquist” is a programming language based on XLisp (a dialect of Lisp). Nyquist scripts are written in plain text and do not require compiling.

Some useful links for Nyquist programming:
http://audacityteam.org/help/nyquist
http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/devel/audacity-nyquist-en.htm
http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/manual/home.html
http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/xlisp/xlisp-index.htm
http://forum.audacityteam.org/viewforum.php?f=39