The Get Noise Profile (GNP) application generates statistical information about the frequency components of the input audio file and saves it to a noise template file for use with the nr application.
gnp (input file) (output noise template file) [/fftsize (FFT size)] [/window (window function)] [/snapshots (snapshot count)]
* for reading RAW files, see the common parameters page
A good noise template will be one of the most important (if not the most important) factors in achieving good noise reduction. The author has experimented with generating multiple noise templates from different segments of background noise and has found that some will outperform others (generally this performance can be seen in the resulting file having less artefacts).
Generally, longer noise samples are better – provided that the template contains no additional noises than what are necessary to be removed from the rest of the audio stream. Listen carefully to the noise sample in a quiet room on ‘looped’ playback, on a loud volume setting and using good headphones. Listen for things like the tone changing when the playback loops – this could indicate some sound in the background that is fading away or getting stronger throughout your template. Listen for things like birds which could create a high frequency peak in your template. Obvious other things to listen for are talking, walking sounds, creaks, etc. These are all to be avoided in your noise template source waveform.
Noise Profile Parameters
/window (window function)
The /window parameter specifies the windowing function to be used to window the input source data. This setting would have had a larger impact on quality in pre 0.14b versions, but is still included for testing. I cannot make comments at this stage on how different window functions will affect the output audio.
- BLACKMANHARRIS – Blackman-Harris windowing
- BLACKMANNUTTALL – Blackman-Nuttall windowing
- FLATTOP – Flat-top windowing
- GAUSS – application default – Gaussian windowing (sigma fixed at 0.4)
- HAMMING – Hamming windowing
- HANN – Hann windowing
- KAISERBESSEL – Kaiser-Bessel windowing
- RECT – Rectangular windowing
- TRIANGULAR – Triangular windowing with non-zero end points
Not all of these window functions are listed when the program executes as they have not been performance tested.
/fftsize (fft size)
The /fftsize parameter specifies the length of the FFT frames that are used to generate the noise template. The parameter specified MUST be a power of 2, but is totally unrestricted by the program. I cannot stress enough that a bigger FFT size does NOT equal a “better” noise reduction. Larger sample rates (greater than or equal to 96000) will require larger fft sizes to achieve good resolutions. Very large ratios of fft size to sample rate will cause more transient delay problems with the output audio. Some pro’s and con’s for large FFT sizes vs. small FFT sizes are listed below:
|Large FFT size||Small FFT size|
/snapshots (number of snapshots to contribute to profile)
The /snapshots parameter specifies how many FFTs will be taken from the input file to generate the noise template. The default value of 600 should be fine for almost all uses (unless your noise template is very very long – minutes).
General Remarks on Creating a Noise Profile
As the user, you will need to decide how to comprimise between transient response and frequency selectivity. When processing organ samples, the author (who processes his samples at 48kHz) uses different FFT sizes for different organ stops. For loud stops with important speech characteristics (such as a diapason or loud flute on the ‘great’ division), small FFT sizes of around 4096 work well. For average loudness stops (such as swell flutes or reeds) with not so important transient characteristics (generally because they are inaudible anyway) a FFT size of 8192 works well. For VERY soft stops with very weak fundamentals (Vox Humanas, Swell Gambas, etc) where the initial transient is usually unnoticed, FFT sizes of 16384 were able to provide the resolution necessary for keeping the lower harmonics. Again, the FFT sizes just given were based on a 48kHz input sample rate. You will have to decide what works best for you based on what you hear. The table below relates frequency resolution to the Sample Rate and FFT Size:
|Sample Rate/FFT Size||4096||8192||16384||32768||65536|
Values below 4Hz will result in very sensitive frequency selection. Values above 10Hz will result in very poor frequency selection and harmonic amplitudes are likely to be severly degraded depending on the windowing function. If you recorded at 44100 or 48000, an FFT size of 4096 should be your starting point. If it is not sensitive enough, try the next size. Repeat until a good quality output is found.
Experimentation and experience will result in good results. The above table serves as a very useful reference point. The author reccommends generating several noise templates at different FFT sizes, processing one or two samples using each template with the same reduction settings then listening to the differences. Let your ears decide which gives the best comprimise.