Copyright © 2008-2019 MultiMedia Soft

WaveformAnalyzer.GraphicItemVertPositionSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets the new vertical position of the given graphic item. The current vertical position can be obtained through the WaveformAnalyzer.GraphicItemVertPositionGet method.

 

For details about graphic items management on the waveform analyzer refer to the How to add graphic items to the Waveform analyzer section.

For details about the use of the Waveform Analyzer refer to the How to use the Waveform Analyzer section.

For further details about methods of the Waveform Analyzer refer to the WaveformAnalyzer object section.

 

 

Syntax

 

[Visual Basic]

control.WaveformAnalyzer.GraphicItemVertPositionSet (

nUniqueId as Integer,

nPosInPerc as Long

) as enumErrorCodes


 

[C++]

short control.WaveformAnalyzer.GraphicItemVertPositionSet (

short nUniqueId,

long nPosInPerc

);


 

 

Parameter

Description

 

 

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

nPosInPerc

The new vertical position of the line expressed in percentage of wave amplitude.

May assume values from -100 to 100: a negative value indicates that the line should be drawn over negative waveform peaks.

In case you should be willing the set the line position based upon a logarithmic scale, you could convert your value in dB to a value in percentage using the following formula:

ValueInPerc = 100 * pow (10, ValueInDB/20);

 

On the screenshot below you can see 3 lines, 2 on positive waveform peaks, respectively at 70% and 25% of the waveform amplitude, and one on negative waveform peaks at -80% of the waveform amplitude.

 

 

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.