Changing Sequencer Synchronization

[The feature associated with this page, MCI, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of MCI, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note

Bias-free Communication Microsoft supports a diverse and inclusionary environment. Within this document, there are references to the word 'slave.' Microsoft's Style Guide for Bias-Free Communications recognizes this as an exclusionary word. This wording is used as it is currently the wording used within the software. For consistency, this document contains this word. When this word is removed from the software, we will correct this document to be in alignment.

To change the synchronization mode of a sequencer device, use the MCI_SET command message with the MCI_SEQ_SET_MASTER and MCI_SEQ_SET_SLAVE flags. Two members in the MCI_SEQ_SET_PARMS structure, dwMaster and dwSlave, are used to specify the master and subordinate synchronization modes.

The master synchronization mode controls synchronization information sent by the sequencer to an output port. Following are the constants for the dwMaster member and their corresponding master synchronization modes.

Constant Synchronization mode
MCI_SEQ_MIDI MIDI Synchronization. Send timing information to output port using MIDI timing clock messages.
MCI_SEQ_SMPTE SMPTE Synchronization. Send timing information to output port using MIDI quarter-frame messages.
MCI_SEQ_NONE No Synchronization. Send no timing information.

 

The subordinate synchronization mode controls where the sequencer gets its timing information to play a MIDI file. Following are the constants for the dwSlave member and their corresponding subordinate synchronization modes.

Constant Synchronization mode
MCI_SEQ_FILE File Synchronization. Get timing information from MIDI file.
MCI_SEQ_MIDI MIDI Synchronization. Get timing information from input port using MIDI timing clock messages.
MCI_SEQ_SMPTE SMPTE Synchronization. Get timing information from input port using MIDI quarter-frame messages.
MCI_SEQ_NONE No Synchronization. Get timing information from MCI commands only and ignore timing information (such as tempo changes) that are in the MIDI file.

 

Note

Currently, for master synchronization, the MCI MIDI sequencer supports only the No Synchronization mode (MCI_SEQ_NONE). For subordinate synchronization, it supports only the File Synchronization mode (MCI_SEQ_FILE) and the No Synchronization mode (MCI_SEQ_NONE).