Copyright © 2001-2018 MultiMedia Soft

MIDI.MarkersEnumItemGet method

Previous pageReturn to chapter overviewNext page

Remarks

 

After completing the enumeration, started through the MIDI.MarkersEnum method, of a specific type of marker detected inside the loaded MIDI stream, allows retrieving information about a specific marker.

 

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.MarkersEnumItemGet (

nPlayer as Integer,

nMarkerType as enumMidiMarkerNotifications,

nMarkerIndex as Long,

fPosition as Double,

nPositionUnit as enumMidiPositionUnits,

nTrack as Integer

) as BSTR


 

[C++]

BSTR control.MIDI.MarkersEnumItemGet (

short nPlayer,

short nMarkerType,

long nMarkerIndex,

double *fPosition,

short nPositionUnit,

short *nTrack

);


\

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

nMarkerType

Type of marker whose notification for which there is an interest.

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).

nMarkerIndex

Number representing the zero-based index of the marker.

fPosition

Reference that, on return from the method call, will contain the position of the marker expressed in the unit set inside the nPositionUnit parameter below.

nPositionUnit

The unit of measure used for the position value stored inside fPosition parameter above.

Supported values are the following:

Mnemonic constant

Value

Meaning

MIDI_POS_UNIT_TICKS

0

The value of the fPosition parameter is expressed in MIDI ticks.

MIDI_POS_UNIT_MS

1

The value of the fPosition parameter is expressed in milliseconds.

MIDI_POS_UNIT_PERCENTAGE

2

The value of the fPosition parameter is expressed in percentage.

nTrack

Reference that, on return from the method call, will contain the number of the MIDI track where the marker was detected. The total number of available MIDI tracks can be obtained through the MIDI:TrackCountGet method.

 

 

 

Return value

 

Value

Meaning

 

 

Empty string

An error occurred (see the LastError property for further error details)

Valid string

String containing the requested marker.

When dealing with markers MIDI_NOTIFICATION_LYRIC or MIDI_NOTIFICATION_TEXT, the returned string may contain the following characters:

'/' (slash) means that a new line (Line Feed or LF) must be inserted
'\' (backslash) means that the display containing previous texts must be cleared