org.jaudiotagger.tag.id3.framebody
Class FrameBodySYTC

java.lang.Object
  extended by org.jaudiotagger.tag.id3.AbstractTagItem
      extended by org.jaudiotagger.tag.id3.AbstractTagFrameBody
          extended by org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody
              extended by org.jaudiotagger.tag.id3.framebody.FrameBodySYTC
All Implemented Interfaces:
ID3v23FrameBody, ID3v24FrameBody

public class FrameBodySYTC
extends AbstractID3v2FrameBody
implements ID3v24FrameBody, ID3v23FrameBody

Synchronised tempo codes frame.

For a more accurate description of the tempo of a musical piece this frame might be used. After the header follows one byte describing which time stamp format should be used. Then follows one or more tempo codes. Each tempo code consists of one tempo part and one time part. The tempo is in BPM described with one or two bytes. If the first byte has the value $FF, one more byte follows, which is added to the first giving a range from 2 - 510 BPM, since $00 and $01 is reserved. $00 is used to describe a beat-free time period, which is not the same as a music-free time period. $01 is used to indicate one single beat-stroke followed by a beat-free period.

The tempo descriptor is followed by a time stamp. Every time the tempo in the music changes, a tempo descriptor may indicate this for the player. All tempo descriptors should be sorted in chronological order. The first beat-stroke in a time-period is at the same time as the beat description occurs. There may only be one "SYTC" frame in each tag.

<Header for 'Synchronised tempo codes', ID: "SYTC">
Time stamp format$xx
Tempo data <binary data>

Where time stamp format is:

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

For more details, please refer to the ID3 specifications:

Version:
$Id: FrameBodySYTC.java,v 1.11 2009/11/12 13:25:21 paultaylor Exp $
Author:
: Paul Taylor, : Eric Farng

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
FrameBodySYTC()
          Creates a new FrameBodySYTC datatype.
FrameBodySYTC(java.nio.ByteBuffer byteBuffer, int frameSize)
          Creates a new FrameBody from buffer
FrameBodySYTC(FrameBodySYTC body)
          Copy constructor
FrameBodySYTC(int timeStampFormat, byte[] tempo)
           
 
Method Summary
 java.lang.String getIdentifier()
          The ID3v2 frame identifier
protected  void setupObjectList()
          Create the list of Datatypes that this body expects in the correct order This method needs to be implemented by concrete subclasses
 
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

FrameBodySYTC

public FrameBodySYTC()
Creates a new FrameBodySYTC datatype.


FrameBodySYTC

public FrameBodySYTC(int timeStampFormat,
                     byte[] tempo)
Parameters:
timeStampFormat -
tempo -

FrameBodySYTC

public FrameBodySYTC(java.nio.ByteBuffer byteBuffer,
                     int frameSize)
              throws InvalidTagException
Creates a new FrameBody from buffer

Parameters:
byteBuffer -
frameSize -
Throws:
InvalidTagException

FrameBodySYTC

public FrameBodySYTC(FrameBodySYTC body)
Copy constructor

Parameters:
body -
Method Detail

getIdentifier

public java.lang.String getIdentifier()
The ID3v2 frame identifier

Specified by:
getIdentifier in class AbstractID3v2FrameBody
Returns:
the ID3v2 frame identifier for this frame type

setupObjectList

protected void setupObjectList()
Description copied from class: AbstractTagFrameBody
Create the list of Datatypes that this body expects in the correct order This method needs to be implemented by concrete subclasses

Specified by:
setupObjectList in class AbstractTagFrameBody