Daniel Jensen
2012-10-26 19:21:08 UTC
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?
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?