Copyright © 2001-2018 MultiMedia Soft

MIDI.TempoPercGet method

Previous pageReturn to chapter overviewNext page



Obtains the tempo of the playing MIDI stream. The current tempo can be modified through the MIDI.TempoPercSet method and is also affected by calls to the MIDI.BPMSet method.


For further details about the use of MIDI protocol see the MIDI object section and the How to deal with MIDI protocol tutorial.





[Visual Basic]

control.MIDI.TempoPercGet (

nPlayer as Integer,

fPercentage as Single

) as enumErrorCodes



short control.MIDI.TempoPercGet (

short nPlayer,

float *fPercentage








Number representing the zero-based index of the involved player


Reference that, on return from the method call, will contain the tempo variation, expressed in percentage, of the loaded MIDI stream.

Negative values mean that playback speed has been slowed down while positive values mean that playback speed has been accelerated.

A value 0 means that the the MIDI stream is playing at its original speed.




Return value






Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful