Copyright © 2001-2019 MultiMedia Soft

MIDI.MarkersEnableNotifications method

Previous pageReturn to chapter overviewNext page

Remarks

 

Enables/disables the synchronization of the container application with a specific type of MIDI marker detected inside the loaded MIDI stream during playback.

When synchronization is enabled, the component fires the MidiMarkerNotification event for each specific marker enabled for notification.

 

Markers can also be enumerated offline, while the MIDI stream is not in playback, through the combination of the MIDI.MarkersEnum and of the MIDI:MarkersEnumItemGet methods.

 

For further details about the use of MIDI protocol see the MIDI object section and the How to deal with MIDI protocol tutorial.

 

 

Syntax

 

[Visual Basic]

control.MIDI.MarkersEnableNotifications (

nPlayer as Integer,

nMarkerType as enumMidiMarkerNotifications,

bEnable as enumBoolean

) as enumErrorCodes


 

[C++]

short control.MIDI.MarkersEnableNotifications (

short nPlayer,

short nMarkerType,

short bEnable

);


\

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

nMarkerType

The type of MIDI marker.

Supported values are the following:

Mnemonic constant

Value

Meaning

MIDI_NOTIFICATION_LYRIC

0

Lyrics (MIDI meta event 5)

MIDI_NOTIFICATION_TEXT

1

Text (MIDI meta event 1)

MIDI_NOTIFICATION_MARKER

2

Marker (MIDI meta event 6)

MIDI_NOTIFICATION_CUE

3

Cue point (MIDI meta event 7)

MIDI_NOTIFICATION_TIME_SIGNATURE

4

Time signature (MIDI meta event 88). The reported text is in the form of "a b", where a is the number of sharps, if positive, or flats, if negative, and b signifies major, if 0, or minor, if 1.

MIDI_NOTIFICATION_KEY_SIGNATURE

5

Key signature (MIDI meta event 89). The reported text is in the form of "a/b c d", where a is the numerator, b is the denominator, c is the metronome pulse and d is the number of 32nd notes per MIDI quarter-note.

MIDI_NOTIFICATION_COPYRIGHT

6

Copyright notice (MIDI meta event 2).

MIDI_NOTIFICATION_TRACK

7

Track name (MIDI meta event 3).

MIDI_NOTIFICATION_INSTRUMENT

8

Instrument name (MIDI meta event 4).

bEnable

Boolean value that specifies if the finding of the given marker during playback must be notified through the MidiMarkerNotification event.

Supported values are the following:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

Notification for the given marker is not enabled.

BOOL_TRUE

1

Notification for the given marker is enabled.

 

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful