sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* noisered vs Audacity's noise removal filter
@ 2012-10-26 19:21 Daniel Jensen
  2012-10-27 18:17 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jensen @ 2012-10-26 19:21 UTC (permalink / raw)
  To: sox-devel

I find that Audacity's "Noise Removal" spectral noise gate filter gives 
me much better results than SoX's noisered effect. However, since I have 
over a thousand files requiring noise removal which could all use the 
same noise profile, and since for that kind of a job Audacity's 
rudimentary batch processing is tremendously inferior to using the 
command line, I really wish I could use SoX.

The primary problem seems to be that SoX gives "tinkling" artifacts like 
those in badly encoded mp3s. My preliminary guess was that this meant 
that SoX is making the determination of whether frequencies are above or 
below the profiled noise gate level independently for each FFT bin and 
window, with the result that individual bins rapidly pop back and forth 
across the threshold.

Glancing briefly at the noisered source (not enough to really tell what 
it's doing) I see that ever since the initial checkin some barebones 
attempt has been made to smooth out that decision, with the humorously 
applicable comment "Audacity says this code will eliminate tinkle bells. 
I have no idea what that means." I think this must mean that the code 
was adapted from the method used by the old noise removal filter in 
Audacity 1.0/1.2, without a lot of comprehension of what was going on.

At some point in their 1.3 beta cycle Audacity improved their noise 
filter substantially by adding frequency smoothing and attack/decay time 
and associated parameters. (Again, I haven't yet looked closely enough 
to say how these are implemented.) In their wiki they say "if you set 
both of the "smoothness" sliders to zero, you'll get something very 
similar to the old noise removal algorithm in legacy Audacity 1.2.x 
which is prone to artifacts and distortion..." Sure enough, setting both 
the frequency smoothing range and the attack/decay time to zero gives 
results basically identical to SoX's.

It would also be nice to have a more comprehensible scale. Audacity's 
effect asks you to specify "noise reduction" in dB; this is much more 
intuitive than noisered's 0-1 scale and does a decent job of allowing 
you to match noise levels between different clips. (A sharp transition 
where the background noise level suddenly changes can in many 
circumstances be more of a problem than the noise itself).

Obviously since Audacity's filter is GPL'd  while SoX's effects are 
LGPL'd, code can't be shared. (Even if SoX decided that this could go 
under the GPL, since Audacity's filter is in WxWidgets-heavy C++ this 
wouldn't help much.) I know very little about how clean-room one has to 
be in reimplementing their ideas to avoid the result becoming a 
derivative work.

Thoughts?

------------------------------------------------------------------------------
WINDOWS 8 is here. 
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: noisered vs Audacity's noise removal filter
  2012-10-26 19:21 noisered vs Audacity's noise removal filter Daniel Jensen
@ 2012-10-27 18:17 ` Eric Wong
  2014-12-30 11:42   ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2012-10-27 18:17 UTC (permalink / raw)
  To: sox-devel

Daniel Jensen <jensend@iname.com> wrote:
> Obviously since Audacity's filter is GPL'd  while SoX's effects are 
> LGPL'd, code can't be shared. (Even if SoX decided that this could go 
> under the GPL, since Audacity's filter is in WxWidgets-heavy C++ this 
> wouldn't help much.) I know very little about how clean-room one has to 
> be in reimplementing their ideas to avoid the result becoming a 
> derivative work.

I suggest writing a standalone LADSPA or lv2 plugin.  This way the
filter can be useful to different programs.

I've also made patches which improve LADSPA support in SoX:
https://sourceforge.net/tracker/?func=detail&atid=310706&aid=3534109&group_id=10706

SoX doesn't have lv2 support, yet; but lv2file ought to fill the gap
nicely (though I haven't needed/tried lv2, yet)

------------------------------------------------------------------------------
WINDOWS 8 is here. 
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: noisered vs Audacity's noise removal filter
  2012-10-27 18:17 ` Eric Wong
@ 2014-12-30 11:42   ` Eric Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Wong @ 2014-12-30 11:42 UTC (permalink / raw)
  To: sox-devel

Eric Wong <normalperson@yhbt.net> wrote:
> Daniel Jensen <jensend@iname.com> wrote:
> > Obviously since Audacity's filter is GPL'd  while SoX's effects are 
> > LGPL'd, code can't be shared. (Even if SoX decided that this could go 
> > under the GPL, since Audacity's filter is in WxWidgets-heavy C++ this 
> > wouldn't help much.) I know very little about how clean-room one has to 
> > be in reimplementing their ideas to avoid the result becoming a 
> > derivative work.
> 
> I suggest writing a standalone LADSPA or lv2 plugin.  This way the
> filter can be useful to different programs.

Did you ever get around to doing this as a plugin? :)

Two years passed, I barely touched audio editing in that time,
but today I used noisered for the first time.

I have a recording made with excessively low levels
(around -30dB Pk, -57dB RMS); yikes.

So far, I've only found some quiet 100ms sections to make a noise
profile with (due to people moving/talking around me).  At first, the
result was littered with nasty artifacts with the default noisered
"amount" parameter (0.5).

However, I found the results are pretty good with an "amount" value set
to zero.  Using a >0 amount seems to introduce unpleasant artifacts.

I'll try to get a cleaner "silent" sample to noise profile with
(recording a new silent track may be necessary).  Most of the noise I'm
trying to reduce is from my recording gear and mics.  The blessing in
that is it ought to be easy to make a good profile track once I get
myself into a quiet room.

Hopefully I can avoid doing any more coding if I find a better sample to
noiseprof with, since the artifacts in my current work-in-progress track
are barely noticeable.

But if push comes to shove, I'll see if I can improve the sox
effect or port the Audacity one to LADSPA...

> I've also made patches which improve LADSPA support in SoX:
> https://sourceforge.net/tracker/?func=detail&atid=310706&aid=3534109&group_id=10706

Applied in 14.4.2rc1 \o/

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-30 11:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-26 19:21 noisered vs Audacity's noise removal filter Daniel Jensen
2012-10-27 18:17 ` Eric Wong
2014-12-30 11:42   ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).