Syncs are set on MIDI streams in exactly the same way as on any other stream, using BASS_ChannelSetSync. Besides the standard stream sync types, MIDI streams also support the following types of sync.
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. |