Tracks
Tracks are the components of a segment that contain its sequenced data, including information about notes, underlying chords, tempo, patch and band changes, and everything else the performance needs to know in order to play a piece of music.
Each track is represented by an IDirectMusicTrack interface. The methods of this interface are called by the performance, and most applications will not need to use them directly.
When an application calls IDirectMusicPerformance::PlaySegment, DirectMusic begins calling the IDirectMusicTrack::Play method on the segment's tracks. Most tracks respond by immediately generating timestamped messages containing data that is valid for the part of the segment that is being played. These messages are placed in a queue. (See Message Creation and Delivery for more information about what happens after that.)
A few tracks do not actively generate messages in response to IDirectMusicTrack::Play but instead do their work by responding to requests for information that come from the performance or other tracks in the form of a GetParam call. (See Setting and Retrieving Track Parameters.)
The following list shows the standard track types implemented by DirectMusic, with a brief description of each one. For a list of the methods supported by the standard tracks, see the reference for IDirectMusicTrack.
- Band. Downloads DLS data to the performance. Sends messages of type DMUS_PATCH_PMSG, DMUS_TRANSPOSE_PMSG, DMUS_CHANNEL_PRIORITY_PMSG, and DMUS_MIDI_PMSG (for volume and pan). Used in segments based on MIDI files and styles.
- Chord. Used to convert music values (as stored in patterns) to MIDI values. Sends messages of type DMUS_NOTIFICATION_PMSG (for GUID_NOTIFICATION_CHORD notifications).
- Chordmap. Used in template segments to compose chord tracks.
- Command. Used in template segments to compose chord tracks, and in style segments to determine which patterns will be played. Sends messages of type DMUS_NOTIFICATION_PMSG (for GUID_NOTIFICATION_COMMAND notifications).
- Motif. Used to play motifs to accompany other segments. Sends messages of type DMUS_CURVE_PMSG, DMUS_NOTE_PMSG, and DMUS_NOTIFICATION_PMSG (for GUID_NOTIFICATION_MEASUREANDBEAT notifications).
- Mute. Used with either style-based or MIDI-based segments. Allows PChannels to be remapped to other PChannels or to be muted.
- Sequence. Sends sequence messages of type DMUS_NOTE_PMSG and DMUS_MIDI_PMSG. Used in segments based on MIDI files. Also sends messages of type DMUS_CURVE_PMSG for segments saved in the .sgt format.
- Signpost. Used in template segments to compose chord tracks.
- Style. Fundamental track for segments based on styles. Sends messages of type DMUS_TIMESIG_PMSG, DMUS_CURVE_PMSG, DMUS_NOTE_PMSG, and DMUS_NOTIFICATION_PMSG (for GUID_NOTIFICATION_MEASUREANDBEAT notifications).
- SysEx. Sends system exclusive messages of type DMUS_SYSEX_PMSG. Used in segments based on MIDI files.
- Tempo. Sets the tempo of the performance by sending messages of type DMUS_TEMPO_PMSG.
- Time Signature. Sends messages of type DMUS_TIMESIG_PMSG as well as GUID_NOTIFICATION_MEASUREANDBEAT notifications. Used in segments based on MIDI files.