Microsoft DirectX 8.0 (C++) |
Describes a resolution anticipation. Used in the Style Form.
typedef struct _DMUS_IO_STYLE_ANTICIPATION { MUSIC_TIME mtGridStart; DWORD dwVariation; short nTimeOffset; BYTE bTimeRange; } DMUS_IO_STYLE_ANTICIPATION;
The time of the event can be calculated as follows, where TimeSig is a DMUS_IO_TIMESIG structure containing the time signature.
mtEventTime = nTimeOffset + ((mtGridStart / TimeSig.wGridsPerBeat) * ((DMUS_PPQ * 4) / TimeSig.bBeat) + (mtGridStart % TimeSig.wGridsPerBeat) * (((DMUS_PPQ * 4)/ TimeSig.bBeat) / TimeSig.wGridsPerBeat))
The value in bTimeRange is converted to music time when the event occurs, according to the formula given in the Remarks to DMUS_IO_STYLENOTE.
Header: Declared in dmusicf.h.