DirectMusicPerformance8
The DirectMusicPerformance8 class overall manager of music playback. The performance maps to audiopaths, plays segments, dispatches messages, requests and receives event notifications, and sets and retrieves music parameters. It also has several methods for getting information about timing and for converting time and from one system to another.
If an application wants to have two or more complete sets of music playing at the same time, it can do so by creating more than one performance object. Separate performances obey separate tempo maps and play completely asynchronously, whereas all segments within one performance play in lock step.
The DirectMusicPerformance8 object is obtained by using the DirectX8.DirectMusicPerformanceCreate method.
The DirectMusicPerformance8 class has the following methods.
Audiopaths
Method |
Description |
CreateAudioPath |
Creates an audiopath object from a configuration. |
CreateStandardAudioPath |
Creates an audiopath object of a standard type. |
GetDefaultAudioPath |
Retrieves the default audiopath. |
SetDefaultAudioPath |
Sets and activates the default audiopath for the performance. |
Initialization and Cleanup
Method |
Description |
InitAudio |
Initializes the performance and optionally sets up a default audiopath. |
CloseDown |
Closes down the performance. |
Messages
Method |
Description |
SendCurvePMSG |
Sends a performance message containing information about a controller . |
SendMIDIPMSG |
Sends a performance message containing information about a MIDI channel message not covered by other methods. |
SendNotePMSG |
Sends a performance message containing information about a note. |
SendPatchPMSG |
Sends a performance message containing information about a MIDI patch change. |
SendTempoPMSG |
Sends a performance message containing information about a tempo change. |
SendTimeSigPMSG |
Sends a performance message containing information about a time signature. |
SendTransposePMSG |
Sends a performance message causing a transposition to begin. |
Notification
Parameters
Segments
Method |
Description |
GetSegmentState |
Retrieves an object representing the play state of the primary segment. |
IsPlaying |
Ascertains whether a particular segment or is currently playing at the speakers. |
PlaySegmentEx |
Begins playback of a segment. |
StopEx |
Stops playback of an object. |
Timing
Method |
Description |
AdjustTime |
Adjusts the internal performance time forward or backward. |
ClockToMusicTime |
Converts clock time to music time. |
GetBumperLength |
Retrieves the amount of time between the time at which messages are placed in the port buffer and the time at which they begin to be processed by the port. |
GetClockTime |
Retrieves the current time. |
GetLatencyTime |
Retrieves the current latency time. |
GetMusicTime |
Retrieves the current time of the performance, in music time. |
GetPrepareTime |
Retrieves the approximate interval between the time at which messages are prepared and the time at which they are processed and heard. |
GetQueueTime |
Retrieves the current queue (or flush) time. |
GetResolvedTime |
Adjusts a given time to a given boundary. |
MusicToClockTime |
Converts time in music time format to time in clock time format. |
SetBumperLength |
Sets the amount of time between the time at which messages are placed in the port buffer and the time at which they begin to be processed by the port. |
SetPrepareTime |
Sets the approximate interval between the time at which messages are prepared and the time at which they are processed and heard. |
Miscellaneous
Method |
Description |
Invalidate |
Flushes all queued messages whose time stamps are later than the supplied time and causes all tracks of all segments to resend their data from the given time forward. |
Reset |
Resets the port. |