Platform SDK: DirectX

DirectMusicPerformance.ClockToMusicTime

The DirectMusicPerformance.ClockToMusicTime method converts clock time to music time. Clock time is an absolute time. Music time is relative to the tempo of the performance.

object.ClockToMusicTime(ctTime As Long) As Long

Parameters

object
Object expression that resolves to a DirectMusicPerformance object.
ctTime
Time to convert, in clock time units.

Return Values

If the method succeeds, it returns the equivalent music time.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to DMUS_E_NO_MASTER_CLOCK.

Remarks

If a master tempo has been set for the performance, it is taken into account when converting to music time.

Because music time is less precise than clock time, rounding off occurs.

See Also

DirectMusicPerformance.MusicToClockTime, Clock Time vs. Music Time