Copyright © 2006-2019 MultiMedia Soft

FilterParametersSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Modifies parameters of the filter currently applied to the recording stream through the FilterApply method. Current parameters can be obtained through the FilterParametersGet method.

 

For further information about the use of embedded filters refer to the How to apply embedded filters section.

 

 

Syntax

 

[Visual Basic]

control.FilterParametersSet (

fFrequency1 as Single,

fFrequency2 as Single,

fGain as Single,

fTransitionTime as Single

) as enumErrorCodes


 

[C++]

short control.FilterParametersSet (

float fFrequency1,

float fFrequency2,

float fGain,

float fTransitionTime

);


 

 

Parameter

Description

 

 

fFrequency1

First corner frequency, expressed in Hertz.

 

For Low Pass and High Pass filters, this parameter represents the cut-off frequency.

For Band Pass and Band Stop filters, this parameter represents the low frequency cut.

The value of this parameter must be higher than 0 and smaller than half the frequency of the recording which can be determined in two ways:

 

if the EncodeFormats.ResampleMode property is set to RESAMPLE_MODE_CUSTOM_FORMAT, through the EncodeFormats.ResampleCustomFrequency property
if the EncodeFormats.ResampleMode property is set to RESAMPLE_MODE_NATIVE_FORMAT, through the frequency established by the value set into the   EncodeFormats.ResampleNativeFormat property

fFrequency2

Second corner frequency, expressed in Hertz.

 

For Low Pass and High Pass filters, this parameter is ignored and can be set to 0.

For Band Pass and Band Stop filters, this parameter represents the high frequency cut and its value must be higher than 0, higher than the value of the fFrequency1 parameter and smaller than half the frequency of the the recording which can be determined in two ways:

 

if the EncodeFormats.ResampleMode property is set to RESAMPLE_MODE_CUSTOM_FORMAT, through the EncodeFormats.ResampleCustomFrequency property
if the EncodeFormats.ResampleMode property is set to RESAMPLE_MODE_NATIVE_FORMAT, through the frequency established by the value set into the   EncodeFormats.ResampleNativeFormat property

fGain

Gain applied to the filter, expressed in percentage: typically this parameter should be set to 100 which leaves the original sound level unchanged during filtering; values under 100 reduce the sound level while values above 100 amplify the sound level.

 

This parameter is ignored by IIR filters like Bessel and Butterworth.

fTransitionTime

Transition time, expressed in milliseconds, describes how quickly a filter transitions from a pass band to a stop band, or vice versa.

The minimum accepted value is 201 milliseconds.

 

 

This parameter is ignored by IIR filters like Bessel and Butterworth.

 

 

 

 

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.