| Platform SDK: DirectX |
The DMUS_NOTE_PMSG structure contains data for a music-note event.
typedef struct DMUS_NOTE_PMSG {
DMUS_PMSG_PART
MUSIC_TIME mtDuration;
WORD wMusicValue;
WORD wMeasure;
short nOffset;
BYTE bBeat;
BYTE bGrid;
BYTE bVelocity;
BYTE bFlags;
BYTE bTimeRange;
BYTE bDurRange;
BYTE bVelRange;
BYTE bPlayModeFlags;
BYTE bSubChordLevel;
BYTE bMidiValue;
} DMUS_NOTE_PMSG;
In the fixed-play modes, the music value is a MIDI note value in the range from 0 through 127.
When a note is to be played, the DMUS_NOTE_PMSG flows through the graph and any tools in the graph until it reaches the final MIDI output tool. When the tool recognizes that DMUS_NOTEF_NOTEON is set in the bFlags member, it sends a MIDI note-on message to the correct port (according to the dwPChannel member of the DMUS_PMSG part). It then clears the flag, adds mtDuration to the time stamp, and requeues the message so that the note is turned off at the appropriate time.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dmusici.h.
IDirectMusicPerformance::SendPMsg, Music Values and MIDI Notes