Microsoft DirectX 8.0 (C++) |
Contains information about a note in a style. Used in the Style Form.
typedef struct _DMUS_IO_STYLENOTE { MUSIC_TIME mtGridStart; DWORD dwVariation; MUSIC_TIME mtDuration; short nTimeOffset; WORD wMusicValue; BYTE bVelocity; BYTE bTimeRange; BYTE bDurRange; BYTE bVelRange; BYTE bInversionID; BYTE bPlayModeFlags; BYTE bNoteFlags; } DMUS_IO_STYLENOTE;
The values in bTimeRange and bDurRange are converted to music time when the note is played, using the following function:
int StoredRangeToActualRange(BYTE bRange) { int nResult = 0; if (0 <= bRange && bRange <= 190) { nResult = bRange; } else if (191 <= bRange && bRange <= 212) { nResult = ((bRange - 190) * 5) + 190; } else if (213 <= bRange && bRange <= 232) { nResult = ((bRange - 212) * 10) + 300; } else // bRange > 232 { nResult = ((bRange - 232) * 50) + 500; } return nResult; }
Header: Declared in dmusicf.h.