DirectX SDK

DirectMusicPerformance.GetTempo

The DirectMusicPerformance.GetTempo method retrieves the tempo at a given time.

object.GetTempo(mtTime As Long, mtUntil As Long) As Double

Parameters

object
Object expression that resolves to a DirectMusicPerformance object.
mtTime
Time for which to retrieve the tempo, in music time. The last tempo change before or at this time is used to determine the tempo.
mtUntil
Variable to receive the music time (relative to mtTime) until which the tempo is valid. If this returns a value of 0, either the tempo is always valid, or it is unknown when it might become invalid.

Return Values

If the method succeeds, it returns the tempo, in beats per minute. This value is in the range from DMUS_TEMPO_MIN through DMUS_TEMPO_MAX (see CONST_DMUS).

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DMUS_E_NO_MASTER_CLOCK
DMUS_E_GET_UNSUPPORTED
DMUS_E_NOT_FOUND
DMUS_E_TRACK_NOT_FOUND