Copyright © 2011-2019 MultiMedia Soft

TagsEditor.ID3V2_SynchLyricsFrameAdd method

Previous pageReturn to chapter overviewNext page

Remarks

 

Adds a new synchronized lyrics frame (SYLT) to the ID3V2 tag. If a synchronized lyrics frame having the same language and description already exists, it will be replaced by the new one.

The modification only happens in memory and not directly into the original sound file: in order to store modifications inside the file you need to call the TagsEditor.ID3V2_SaveChanges method.

 

For further details about methods related to tags editing refer to the TagsEditorMan class.

For details about the editing of tags see the How to edit tag info in sound files tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function ID3V2_SynchLyricsFrameAdd (

strLanguage as String,

strDescription as String,

strLyricsText as String,

nLyricsType as enumId3v2SyncLyricsType,

nTimeStampFormat as enumId3v2TimeStampFormats

) as enumErrorCodes


 

[C#]

public string ID3V2_SynchLyricsFrameAdd (

string strLanguage,

string strDescription,

string strLyricsText,

enumId3v2SyncLyricsType nLyricsType,

enumId3v2TimeStampFormats nTimeStampFormat

);


 

[C++]

public: string ID3V2_SynchLyricsFrameAdd (

string strLanguage,

string strDescription,

string strLyricsText,

enumId3v2SyncLyricsType nLyricsType,

enumId3v2TimeStampFormats nTimeStampFormat

);


 

Parameter

Description

 

 

strLanguage

String containing the language of the lyrics frame, for example "ENG", "ITA", etc.: must be exactly 3 characters long.

strDescription

String containing the description of the lyrics frame.

strLyricsText

String containing lyrics text.

The string is made up of multiple lines, each terminated by the CR+LF sequence. Each line starts with the timestamp which indicates the position within the sound file where the line is located during playback using the format below:

 

[xxxxxxxx] line1

[xxxxxxxx] line2

[xxxxxxxx] line3

etc.

 

where xxxxxxxx, enclosed within [ ] characters (square brackets), represents the timestamp value which may be expressed in MPEG frames or in milliseconds depending upon the value of the nTimeStampFormat parameter below.

 

In the example below the timestamp has been expressed in milliseconds:

 

[00015030]Tale

[00015070]as

[00016020]old

[00016070]as

[00017020]time

 

The equivalent string in C++ would result like this:

 

"[00015030]Tale \r\n[00015070]as \r\n[00016020]old \r\n[00016070]as \r\n[00017020]time \r\n"

 

while in VB6 would result like this:

 

"[00015030]Tale " & vbCrLf & "[00015070]as " & vbCrLf & "[00016020]old " & vbCrLf & "[00016070]as " & vbCrLf & "[00017020]time " & vbCrLf

 

nLyricsType

Value representing the type of lyric contents.

Supported values are the following:

Mnemonic Value

Value

Meaning

ID3V2_SYNC_LYRICS_TYPE_OTHER

0

Other

ID3V2_SYNC_LYRICS_TYPE_LYRICS

1

Lyrics

ID3V2_SYNC_LYRICS_TYPE_TEXT_TRANSCRIPTION

2

Text transcription

ID3V2_SYNC_LYRICS_TYPE_MOVEMENT_PARTNAME

3

Movement/part name

ID3V2_SYNC_LYRICS_TYPE_EVENTS

4

Events

ID3V2_SYNC_LYRICS_TYPE_CHORD

5

Chord

ID3V2_SYNC_LYRICS_TYPE_TRIVIA_POPUP

6

Trivia/pop up information

ID3V2_SYNC_LYRICS_TYPE_URL_TO_WEBPAGE

7

URLs to webpages

ID3V2_SYNC_LYRICS_TYPE_URL_TO_IMAGES

8

URL to images

nTimeStampFormat

Value representing the timestamp format.

Supported values are the following:

Mnemonic Value

Value

Meaning

ID3V2_TIMESTAMP_FORMAT_FRAMES

1

MPEG frames

ID3V2_TIMESTAMP_FORMAT_MS

2

Milliseconds

 

 

Return value

 

Value

Meaning

 

 

Negative value

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

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.