"Noise Removal (Reduction" in my C++ software: HOW?

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
darkingthereturn
Posts: 3
Joined: Fri Apr 15, 2011 5:34 pm
Operating System: Please select

"Noise Removal (Reduction" in my C++ software: HOW?

Post by darkingthereturn » Sun Apr 17, 2011 3:22 pm

Hi all! (sorry for my worst english)
I would like to use the function noise_removal.cpp from the source code of audacity to remove the noise from a file.
The problem is that i've written some C functions (using libsndfile, all of them are working) that i would like to integrate in my C++ source code.
I'll try to explain what i would like to do using this pseudo code:

Code: Select all

//C++ code

#include "my C functions"
#include "noise removal function"

main ()
{
	
	//function to sample the file "a.wav" into an array (written in C, it works, tested)
	file_sample ("a.wav", a_array);
	//function to sample the file "b.wav" into an array (written in C, it works, tested)
	file_sample ("b.wav", b_array);
	//function to pass the array to noise removal as my profile (is it possible?)
	pass_array_to_noise_remov (a_array);
	//function that remove the noise profile a_array to b_array (is it possible?)
	remove_noise (b_array, a_array);
	//function that write b file in a new array (or file, it doesn't matter) (written in C, it works, tested)
	write_to_array (new_array); 
}
Is it possible to do this? If not (i mean, not possible to use sampled wav file into an array), can i apply the noise reduction directly to a wav file?
p.s: i don't want to set-up how much noise to remove as audacity asks. Default option is ok! (slider to the middle)
p.p.s: this software has not a GUI and doesn't ask nothing to the user, so it's all automated.

THANKS! :)

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: "Noise Removal (Reduction" in my C++ software: HOW?

Post by steve » Thu Apr 21, 2011 11:38 am

I think you will probably find it easier to integrate your program with SoX than with Audacity.
http://sox.sourceforge.net/
http://linux.die.net/man/1/sox
http://sox.sourceforge.net/sox.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply