Copyright © 2008-2018 MultiMedia Soft

Effects.DeNoiseFilterApply method

Previous pageReturn to chapter overviewNext page

Remarks

 

Applies the DeNoise filter to the given portion of sound under editing. Before calling this method the filter needs to receive the noise profile through the Effects.DeNoiseFilterProfileSet method.

 

A successful call to this method will fire the SoundEditStarted event followed by a number of SoundEditPerc events and finally by the SoundEditDone event.

 

For further details about noise removal refer to the How to perform noise removal tutorial.

For further details about methods related to the use of special effects refer to the Effects COM object.

 

 

Syntax

 

[Visual Basic]

control.Effects.DeNoiseFilterApply (

nStartPosition as Long,

nEndPosition as Long,

nWindowType as enumWindowTypes,

nWindowSize as Long,

fNoiseGain as Single,

nFrequencySmoothing as Single,

fAttackDecayTime as Single

) as enumErrorCodes


 

[C++]

short control.Effects.DeNoiseFilterApply (

long nStartPosition,

long nEndPosition,

short nWindowType,

long nWindowSize,

float fNoiseGain,

float nFrequencySmoothing,

float fAttackDecayTime

);


 

 

Parameter

Description

 

 

nStartPosition

Start position, expressed in milliseconds, of the sound range where the filter will be applied

nEndPosition

End position, expressed in milliseconds, of the sound range where the filter will be applied

nWindowType

Input audio is broken into small parts before processing. This parameter determines the function to be used to break audio. It determines the shape of window. A rectangular type window may cause aliasing effect in output (while lowering processing time) and a bell shaped window will result in almost no aliasing in the output.

For a more detailed explanation about window types, refer to the following article on Wikipedia

Supported values are the following:

Mnemonic constant

Value

Meaning

WINDOW_TYPE_BARTLETT

0

Bartlett window

WINDOW_TYPE_BLACKMAN

1

Blackman window

WINDOW_TYPE_GAUSSIAN

2

Gaussian window

WINDOW_TYPE_HAMMING

3

Hamming window

WINDOW_TYPE_HANNING

4

Hanning window

WINDOW_TYPE_HARRIS

5

Harris window

WINDOW_TYPE_WELCH

6

Welch window

nWindowSize

This parameter serves two tasks, determines window size to be used to break input audio into parts and calculate spectrum size. DeNoise filter works as a filter bank. Each filter in the bank has different band pass frequency and gain. This parameter currently determines the number of filters in the filter bank. Larger values mean more filters and better results. This parameter is also internally rated to input audio sample rate.

For example, consider an input audio sampled at 44.1 KHz. Suppose a value X for this parameter results in 10 bands for filter bank. Now each filter will have a bandwidth of 4.41 KHz. If Y (where Y>X) gives us 20 bands then bandwidth of each filter will be half of previous value. For an audio sampled at 22.05 KHz, X will result in 20 bands.

fNoiseGain

This parameter, expressed in dB, determines the Gain of noise in output and can range from 0 to -100. A value of zero will not remove any noise. Lower values will give better result.

nFrequencySmoothing

This parameter, expressed in Hertz, removes a side effect of filter. Depending upon input audio characteristics, there may result a constant low frequency in output. This parameter determines the frequency which will be smoothed out from output.

fAttackDecayTime

This parameter, expressed in seconds, determines how much previous input history should the DeNoise filter use. In the start (first input sample) old history is set to zero. Now while moving ahead filter saves previous t seconds input audio to determine precise noise thresholds. Larger values will give better result on the cost of more processing.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.