New Tool (2.8): Noise Reduction

Hi,

This is my first Renoise tool for cleaning out noise from audio files by profiling and filtering the samples using SoX.

I’m kinda getting used to editing field recordings directly in Renoise, so I came up with this idea. Unfortunately, there are very few free cross-platform command-line denoise utilities, that can work with Renoise. SoX looks like the only one working out of the box and is okay for some of the recordings I tried.

The tool includes SoX binaries for Win/Mac, and requires SoX to be installed on Linux. I didn’t have a chance to test if the tool will work on Win/Mac, so I’d especially love feedback from these platforms.

Download (pre-release, tested only on Linux)

net.artfwo.NoiseReduction_Rns280_V0.1.xrnx

Usage

To use the tool, select a piece of audio sample, containing noise and preferably nothing else and choose Process->Create Noise Profile from the sample editor menu. After a noise profile is created you can remove noise from the Process menu or by a keyboard shortcut.

For best results, try smaller reduction amounts. Another trick is to normalize the noise sample before creating a profile.

I’d love to hear suggestions and feedback. Perhaps, it may be feasible enough to make a command-line port of another denoise tool (Audacity, Gnome Wave Cleaner…) and replace SoX with something else?

Downloading :)

Edit: encountered this bug

I selected a region of the sample (stereo sample), and rightclicked -> Create Noise Profile
(seems to work OK, I got a brief console window and no error message)

I then selected the entire sample, and rightclicked -> Remove Noise
The dialog turned up, and I selected approx. 90% removal amount and hit -> Process
(got the following error message, sample is unaltered)

  
'C:\Documents and Settings\bnn.MADKASSEN\Application Data\Renoise\V2.8.1\Scripts\Tools\net.artfwo.NoiseReduction.xrnx\' failed to execute in one of its menu entry functions.  
  
Please contact the author (artfwo [artfwo@gmail.com]) for assistance...  
  
std::logic_error: 'trying to load sample data from a non existing file: 'C:\DOCUME~1\BNN~1.MAD\LOCALS~1\Temp\Renoise-2584\Renoise_TmpFile-0-5.wav''  
stack traceback:  
 [C]: in function 'load_from'  
 main.lua:172: in function 'remove_noise'  
 main.lua:150: in function 'remove_noise_dialog'  
 main.lua:49: in function <48><br>
<br>```

<br>
<br>
[s]I tried to locate the temporary file from the path indicated in the error message, but there is no such file (might have existed?)[/s]<br>
<br>
Strike that, the files exist but seem to get a wrong number. E.g. I process a file, and a temp-file is created. <br>
But it's name is TmpFile-0-10, when the error message states that it was looking for TmpFile-0-11? <br>
<br>
<br>
Using Windows XP 32bit, SP3</48>

same as danoise

Fixed. Apparently, Windows doesn’t like the slashes in relative filenames :rolleyes:

Yep works, awesome! :D

it works here. really powerfull!

Sorry to jump so late to the party, but I just tried the version from the first post and I’m encountering the exact same “off by one” error as danoise and vincentvc.

Apparently the fix you applied did not cover me, as I’m on a mac system…


(It’s not the EXACT same of course. Here’s an example:)

  
*** std::logic_error: 'trying to load sample data from a non existing file: '/var/folders/q9/bqw59wts28v5gq0_58v_2sq80000gn/T/Renoise-2108/Renoise_TmpFile-0-37.wav''  
*** stack traceback:  
*** [C]: in function 'load_from'  
*** main.lua:173: in function 'remove_noise'  
*** main.lua:151: in function 'remove_noise_dialog'  
*** main.lua:50: in function <49><br>
<br>```

<br>
----<br>
And i have Renoise_TmpFile-0-36.wav there. (It's looking for Renoise_TmpFile-0-37.wav).</49>

ouch, will look into it today.

This is beyond cool. I just tried it out on… erm… “white noise.” but I don’t have a project going right this second, and I was really curious. Works well… I guess it has some bugs you are working on… I’ll totally keep it updated.

Thanks

:slight_smile:

B) B)

Edit = oh btw I am using win 7 home premium x64 in case anybody is curious.

sox has many dsp functions, options right? Like Johann made a tool utilizing the reversed reverb option, sound stretching years ago in his ‘run command on selection’ tool ( http://sandboxx.org/noise_ore/p/runcommandsonselection/ ).

Maybe you, someone else can create a tool exploiting all sox’s usable functions collected in one gui?

Could be useful, but yeah, many SoX functions will be unneeded. Do you have any specific SoX command in mind?

From what I see here http://sox.sourceforge.net/Docs/Features , the

sounds interesting, though I see it is w.i.p., dunno if it is workable in its current state.

Also what is

, does it isolate a voices frequency region, remove a voice?

This one sounds interesting as well, not sure how that one would work, providing your own coefficients?

I’d like to hear the multiband compression effect as well

Basically I’d like to have everything under one hood :) (filters, production effects, pitch bending stuff), instead of having to load multiple dsp’s, vst’s into a track and applying the fx button in the sample editor to render in the changes or having sox installed for your tool and another one for Johann’s stuff. A one stop sox tool would negate redundancy, but I can imagine a lot of work on the part of the scripter?

It won’t be much work to create a bunch of dialogs for various effects. I just don’t want to clutter my Renoise with various functions, which it already does natively :)

I understand what you’re saying, maybe having flangers and chorusses in there would be overkill :slight_smile: , though maybe they sound better or different in quality then the native effects? Or you can use them in a more creative schtick for a tool? Like some kind of processing matrix similar in use as the CDP front-end soundshaper pro (

The matrix determines the order in which the command line audio .exe’s are used to process the sound. Sorry for derailing your thread btw B)

KMaki, can you check if sox is installed with proper user permissions?

The sox binary should reside under Users/YourName/Library/Preferences/Renoise/V?.?.?/Scripts/Tools/net.artfwo.NoiseReduction.xrns/bin/mac and have the ‘execute’ permission, which allows to execute a file.

Hah, that’s ok with me :) It’s a pretty neat idea. Although I’ve been thinking of a pure Lua implementation of the noise filter, your proposed kind of tool could have a lot of awesome uses too.

Checked. My first time adjusting permissions on any system. Did a Google. Ran a “chmod a+x” on the thing.

Works. :yeah:

Thank you!

BTW. As you probably deduced: No, the execute permissions were not there when installed.

@artfwo This is a common problem on OS X. You should invoke this manually yourself in your script on startup. Example:

  
--------------------------------------------------------------------------------  
-- Fix executable permissions  
--------------------------------------------------------------------------------  
  
if os.platform() == 'MACINTOSH' then  
 io.chmod(renoise.tool().bundle_path .. 'bin/mac/YOURFILE', 755);  
end  
  

Example here.

Cheers.

the noise removal works great here on linux. I’m gonna look into that ‘swiss army knife’ thing some more and your tool artfwo (thank you for that) - in my opinion though e.g. multiband compression runnable on a sample only is quite useless to do from in renoise… you want to keep the music rolling mostly, neh?

Nah, not if you’re into soundsculpting your sample instruments. Render in a particular kind of sound. Normally I use wavelab for that kind of offline processing, but as Renoises sample editor has gotten more & more powerful, having everything self contained works really well.

good point