Retrieves the number of markers in a MIDI file stream.
Namespace: Un4seen.Bass.AddOn.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
public static int BASS_MIDI_StreamGetMarksCount( int handle, int track, BASSMIDIMarker type )
Parameters
- handle
- Type: SystemInt32
The MIDI stream to retrieve the markers from. - track
- Type: SystemInt32
The track to get the markers from... 0 = 1st track, -1 = all tracks. - type
- Type: Un4seen.Bass.AddOn.MidiBASSMIDIMarker
The type of marker to retrieve, one of the following (see BASSMIDIMarker):BASS_MIDI_MARK_COPY Copyright notice events (MIDI meta event 2). BASS_MIDI_MARK_CUE Cue events (MIDI meta event 07). BASS_MIDI_MARK_INST Instrument name events (MIDI meta event 4). BASS_MIDI_MARK_KEYSIG Key signature events (MIDI meta event 89). The marker 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). BASS_MIDI_MARK_LYRIC Lyric events (MIDI meta event 05). BASS_MIDI_MARK_MARKER Marker events (MIDI meta event 06). BASS_MIDI_MARK_TEXT Text events (MIDI meta event 01). BASS_MIDI_MARK_TIMESIG Time signature events (MIDI meta event 88). The marker 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. BASS_MIDI_MARK_TRACK Track name events (MIDI meta event 3). BASS_MIDI_MARK_TRACKSTART Start of a track in a standard MIDI format 2 file. The marker text is the track number (0 = the first). BASS_MIDI_MARK_TICK FLAG: get position in ticks instead of bytes.
Return Value
Type: Int32On success, the number of markers is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_ILLTYPE | type is not valid. |
BASS_ERROR_ILLPARAM | track is not valid. |
See Also