Thanks. Why break it into 100 pieces and take the average? Why multiply the samples with 0 to 1 using the method you mentioned? How would the intensity of the sound (distance from source to microphone) affect the DFT? Only the amplitude will change right?
Do you think it's necessary to do a DFT on the ambient noise as well and maybe filter the ambient noise out first?
You average 100 samples to reduce the variance of your estimate. The reason that most DFTs on DSOs are so bad is because the programmers did not do that.
The triangular, Bartlett, window is so the spectral peaks are not smeared out. In the frequency domain it's a (sin(x)/)**2 rather than the sin(x)/x of a rectangular window. I've yet to see a DSO that offered a Bartlett window. Check wikipedia on the subject of window functions. Install gnuplot, set samples to 10000, plot the two functions and take a look at the sidelobes.
The lower the amplitude the greater the quantization noise component.
I could compensate for the ambient noise, but I suggest you use a sound isolation box instead. You really don't want to learn that much about DSP or spend the amount of time it would take to code it properly. It is not trivial.
Most of a seismic processor's time is spent suppressing noise. How you do it depends upon what type of noise it is and where it is coming from. Data acquisition contracts have many pages of stipulations about noise levels and there is a company representative on hand to check them continuously during the entire acquisition. You can't shoot if another boat is closer than so many miles. You can't shoot if the waves are higher than some value, etc.
Install Octave and get to the point you can do the steps I outlined previously. You'll have a much better appreciation of the problem you have posed. It's very sensible and readily done, but it is not something you do in an afternoon. In your case, starting from square one it will probably take a week or more of work just to do a proof of concept.
Personally, if I were doing this I'd write a C program. I'm not impressed by the software engineering of Octave. I cannot compile it on Solaris. It claims to be able to read WAV files and I think it will interface to a sound card, but frankly I don't know. I use Octave from time to time to prototype solutions to problems, but that is all. Octave/MATLAB are not really designed for solving production problems. They are research tools. I only suggested using those because of the complexity and the amount of work a production quality C program would require.
Octave/MATLAB are good enough to produce a proof of concept. Make WAV format recordings of a good gearbox and a bad gearbox in a quiet environment and compare them using the process I outlined. A Zoom H1 recorder for $100 will give you a good stereo WAV file to work with.