Update the tags from a meta data pointer, when using in a SYNCPROC using BASS_SYNC_MIDI_LYRIC or BASS_MIDI_MARK_TEXT.
Namespace: Un4seen.Bass.AddOn.Tags
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
Parameters
- midiMark
- Type: Un4seen.Bass.AddOn.MidiBASS_MIDI_MARK
The instance of the BASS_MIDI_MARK structure from which to update the lyric text, as retrieved form BASS_MIDI_StreamGetMark(Int32, BASSMIDIMarker, Int32, BASS_MIDI_MARK).
Return Value
Type: BooleanIf any tag was updated is returned. If nothing was changed will be returned.
Remarks
comment | With the detected new lyric text, if found.
If the lyric text begins with a '/' (slash) character, a new line ('\n')will be added to the comment. If it begins with a '\' (backslash) character, the comment will be cleared first - in all other cases the lyric text will be appended to the existing comment. |
track | With the midi track number, if changed. |
Examples
private SYNCPROC _mySync; private TAG_INFO _tags; ... int midi = BassMidi.BASS_MIDI_StreamCreateFile("test.mid", 0, 0, BASSFlag.BASS_STREAM_AUTOFREE, 44100); _tags = new TAG_INFO("test.mid"); // set a sync to get the lyric text updates out of the MIDI data... _mySync = new SYNCPROC(LyricSync); Bass.BASS_ChannelSetSync(midi, BASSSync.BASS_SYNC_MIDI_LYRIC, 0, _mySync, IntPtr.Zero); // get the initial tags BassTags.BASS_TAG_GetFromFile(midi, _tags); ... private void LyricSync(int handle, int channel, int data, IntPtr user) { _tags.UpdateFromMIDILyric( BassMidi.BASS_MIDI_StreamGetMark(channel, BASSMIDIMarker.BASS_MIDI_MARK_LYRIC, data) ); // tags.comment now contains the updated lyric text Console.Write("{0}\r", _tags.comment) }
See Also