|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jaudiotagger.tag.id3.AbstractTagItem org.jaudiotagger.tag.id3.AbstractTagFrameBody org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody org.jaudiotagger.tag.id3.framebody.FrameBodySYLT
public class FrameBodySYLT
Synchronised lyrics/text frame.
This is another way of incorporating the words, said or sung lyrics, in the audio file as text, this time, however, in sync with the audio. It might also be used to describing events e.g. occurring on a stage or on the screen in sync with the audio. The header includes a content descriptor, represented with as terminated textstring. If no descriptor is entered, 'Content descriptor' is $00 (00) only.<Header for 'Synchronised lyrics/text', ID: "SYLT"> | |
Text encoding | $xx |
Language | $xx xx xx |
Time stamp format | $xx |
Content type | $xx |
Content descriptor | <text string according to encoding> $00 (00) |
Encoding: | $00 | ISO-8859-1 character set is used => $00 is sync identifier. |
$01 | Unicode character set is used => $00 00 is sync identifier. |
Content type: | $00 | is other |
$01 | is lyrics | |
$02 | is text transcription | |
$03 | is movement/part name (e.g. "Adagio") | |
$04 | is events (e.g. "Don Quijote enters the stage") | |
$05 | is chord (e.g. "Bb F Fsus") | |
$06 | is trivia/'pop up' information |
$01 Absolute time, 32 bit sized, using MPEG frames as unit
$02 Absolute time, 32 bit sized, using milliseconds as unit
Abolute time means that every stamp contains the time from the beginning of the file.
The text that follows the frame header differs from that of the unsynchronised lyrics/text transcription in one major way. Each syllable (or whatever size of text is considered to be convenient by the encoder) is a null terminated string followed by a time stamp denoting where in the sound file it belongs. Each sync thus has the following structure:
Terminated text to be synced (typically a syllable) | |
Sync identifier (terminator to above string) | $00 (00) |
Time stamp | $xx (xx ...) |
Newline ($0A) characters are allowed in all "SYLT" frames and should be used after every entry (name, event etc.) in a frame with the content type $03 - $04.
A few considerations regarding whitespace characters: Whitespace separating words should mark the beginning of a new word, thus occurring in front of the first syllable of a new word. This is also valid for new line characters. A syllable followed by a comma should not be broken apart with a sync (both the syllable and the comma should be before the sync).
An example: The "USLT" passage
"Strangers in the night" $0A "Exchanging glances"
would be "SYLT" encoded as:
"Strang" $00 xx xx "ers" $00 xx xx " in" $00 xx xx " the" $00 xx xx " night" $00 xx xx 0A "Ex" $00 xx xx "chang" $00 xx xx "ing" $00 xx xx "glan" $00 xx xx "ces" $00 xx xx
There may be more than one "SYLT" frame in each tag, but only one with the same language and content descriptor.
For more details, please refer to the ID3 specifications:
Field Summary |
---|
Fields inherited from class org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody |
---|
TYPE_BODY |
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagFrameBody |
---|
objectList |
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagItem |
---|
logger |
Constructor Summary | |
---|---|
FrameBodySYLT()
Creates a new FrameBodySYLT datatype. |
|
FrameBodySYLT(java.nio.ByteBuffer byteBuffer,
int frameSize)
Creates a new FrameBodySYLT datatype. |
|
FrameBodySYLT(FrameBodySYLT body)
Copy Constructor |
|
FrameBodySYLT(int textEncoding,
java.lang.String language,
int timeStampFormat,
int contentType,
java.lang.String description,
byte[] lyrics)
Creates a new FrameBodySYLT datatype. |
Method Summary | |
---|---|
int |
getContentType()
|
java.lang.String |
getDescription()
|
java.lang.String |
getIdentifier()
Return the ID3v2 Frame Identifier, must be implemented by concrete subclasses |
java.lang.String |
getLanguage()
|
byte[] |
getLyrics()
Get lyrics TODO:better format |
int |
getTimeStampFormat()
|
void |
setLyrics(byte[] data)
Set lyrics TODO:provide a more user friendly way of adding lyrics |
protected void |
setupObjectList()
Setup Object List |
Methods inherited from class org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody |
---|
createStructure, equals, getSize, read, setSize, setSize, write |
Methods inherited from class org.jaudiotagger.tag.id3.AbstractTagFrameBody |
---|
getBriefDescription, getHeader, getLongDescription, getObject, getObjectValue, getTextEncoding, isSubsetOf, iterator, setHeader, setObjectValue, setTextEncoding, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FrameBodySYLT()
public FrameBodySYLT(FrameBodySYLT body)
body
- public FrameBodySYLT(int textEncoding, java.lang.String language, int timeStampFormat, int contentType, java.lang.String description, byte[] lyrics)
textEncoding
- language
- timeStampFormat
- contentType
- description
- lyrics
- public FrameBodySYLT(java.nio.ByteBuffer byteBuffer, int frameSize) throws InvalidTagException
byteBuffer
- frameSize
-
InvalidTagException
- if unable to create framebody from bufferMethod Detail |
---|
public java.lang.String getLanguage()
public int getTimeStampFormat()
public int getContentType()
public java.lang.String getDescription()
public java.lang.String getIdentifier()
AbstractID3v2FrameBody
getIdentifier
in class AbstractID3v2FrameBody
public void setLyrics(byte[] data)
data
- public byte[] getLyrics()
protected void setupObjectList()
setupObjectList
in class AbstractTagFrameBody
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |