Microsoft DirectX 8.1 (Visual Basic) |
The SendMIDIPMSG method sends a performance message containing information about a MIDI channel message not covered by other methods.
object.SendMIDIPMSG( _
lTime As Long, _
flags As Long, _
channel As Long, _
status As Byte, _
byte1 As Byte, _
byte2 As Byte)
Parts
object
Resolves to a DirectMusicPerformance8 object.
lTime
Time at which the message is to play. This is in music time unless DMUS_PMSGF_REFTIME is in flags.
flags
Flags modifying how and when the message is processed. See CONST_DMUS_PMSGF_FLAGS.
channel
status
Standard MIDI status byte. See Remarks.
byte1
First data byte. Ignored for MIDI messages that do not require it.
byte2
Second data byte. Ignored for MIDI messages that do not require it.
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_ALREADY_SENT |
DMUS_E_INVALIDARG |
Remarks
If the time of the message is set to 0 and the flags parameter contains DMUS_PMSGF_REFTIME, the message is cued to go out immediately.
Because the channel is specified in another parameter, status does not contain the channel number in the 4 lower bits, as it would in a standard MIDI message. Thus status is &H80 for a note-off, &H90 for a note-on, and so on. See the MIDI specification for other status bytes.