Syncs are set on MIDI streams in exactly the same way as on any other stream, using BASS_ChannelSetSync. The following is a list of the types of sync supported on MIDI streams.
Sync types, with param and SYNCPROC data definitions.
|BASS_SYNC_MIDI_EVENT||Sync when a type of event is processed.|
param : event type (0 = all types). data : LOWORD = event parameter, HIWORD = channel (high 8 bits contain the event type when syncing on all types). If the event type is MIDI_EVENT_TEMPO, then the event parameter will use 24 bits (channel is replaced). See BASS_MIDI_StreamEvent for a list of event types and their parameters.
|BASS_SYNC_MIDI_MARK||Sync when a marker is encountered.|
param : marker type. data : the marker index, which can be used in a BASS_MIDI_StreamGetMark call.
|BASS_SYNC_MIDI_TICK||Sync when reaching a tick position.|
param : tick position. data : not used.
The BASS_SYNC_POS, BASS_SYNC_END, BASS_SYNC_SLIDE, BASS_SYNC_STALL and BASS_SYNC_FREE sync types are also supported on MIDI streams, as described in the BASS_ChannelSetSync documentation.