From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Jensen Newsgroups: gmane.comp.audio.sox.devel Subject: noisered vs Audacity's noise removal filter Date: Fri, 26 Oct 2012 13:21:08 -0600 Message-ID: <508AE2A4.3000808@iname.com> Reply-To: sox-devel@lists.sourceforge.net NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1351281221 15277 80.91.229.3 (26 Oct 2012 19:53:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Oct 2012 19:53:41 +0000 (UTC) To: sox-devel@lists.sourceforge.net Original-X-From: sox-devel-bounces@lists.sourceforge.net Fri Oct 26 21:53:49 2012 Return-path: Envelope-to: gcasd-sox-devel@m.gmane.org X-ACL-Warn: X-Authenticated: #76253829 X-Provags-ID: V01U2FsdGVkX1+22lhpPU+2QikScQAYC1ozYs6043eg2c5BgULjPV 7tX0drljT2Eptp User-Agent: Mozilla/5.0 (Windows NT 5.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 X-Y-GMX-Trusted: 0 X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jensend[at]iname.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.208.122.35 listed in list.dnswl.org] X-Headers-End: 1TRpyG-0002sN-Vp X-BeenThere: sox-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: sox-devel-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.comp.audio.sox.devel:61 Archived-At: Received: from lists.sourceforge.net ([216.34.181.88]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TRpyS-0005rN-Mq for gcasd-sox-devel@m.gmane.org; Fri, 26 Oct 2012 21:53:45 +0200 Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1TRpyK-0003bp-4L; Fri, 26 Oct 2012 19:53:36 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1TRpyH-0003bj-VK for sox-devel@lists.sourceforge.net; Fri, 26 Oct 2012 19:53:33 +0000 Received: from mailout-us.mail.com ([74.208.122.35]) by sog-mx-4.v43.ch3.sourceforge.com with smtp (Exim 4.76) id 1TRpyG-0002sN-Vp for sox-devel@lists.sourceforge.net; Fri, 26 Oct 2012 19:53:33 +0000 Received: (qmail invoked by alias); 26 Oct 2012 19:21:10 -0000 Received: from 69.169.144.239.provo.static.broadweavenetworks.net (EHLO [192.168.1.101]) [69.169.144.239] by mail.gmx.com (mp-us011) with SMTP; 26 Oct 2012 15:21:10 -0400 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/