Copyright © 2005-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 MIDIMan class section and the How to deal with MIDI protocol tutorial.





[Visual Basic]

Public Function TempoPercGet (

nPlayerIndex as Int16,

ByRef fPercentage as Single

) as enumErrorCodes



public enumErrorCodes TempoPercGet (

Int16 nPlayerIndex,

ref float fPercentage




public: enumErrorCodes TempoPercGet (

Int16 nPlayerIndex,

float __gc *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 (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.