FileDocCategorySizeDatePackage
FrameBodySYTC.javaAPI DocJaudiotagger 2.0.44739Wed Mar 30 16:12:02 BST 2011org.jaudiotagger.tag.id3.framebody

FrameBodySYTC

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:

author
: Paul Taylor
author
: Eric Farng
version
$Id: FrameBodySYTC.java 832 2009-11-12 13:25:38Z paultaylor $

Fields Summary
Constructors Summary
public FrameBodySYTC()
Creates a new FrameBodySYTC datatype.

    
public FrameBodySYTC(int timeStampFormat, byte[] tempo)

param
timeStampFormat
param
tempo

        setObjectValue(DataTypes.OBJ_TIME_STAMP_FORMAT, timeStampFormat);
        setObjectValue(DataTypes.OBJ_DATA, tempo);
    
public FrameBodySYTC(ByteBuffer byteBuffer, int frameSize)
Creates a new FrameBody from buffer

param
byteBuffer
param
frameSize
throws
InvalidTagException

        super(byteBuffer, frameSize);
    
public FrameBodySYTC(FrameBodySYTC body)
Copy constructor

param
body

        super(body);
    
Methods Summary
public java.lang.StringgetIdentifier()
The ID3v2 frame identifier

return
the ID3v2 frame identifier for this frame type

        return ID3v24Frames.FRAME_ID_SYNC_TEMPO;
    
protected voidsetupObjectList()

        objectList.add(new NumberHashMap(DataTypes.OBJ_TIME_STAMP_FORMAT, this, EventTimingTimestampTypes.TIMESTAMP_KEY_FIELD_SIZE));
        objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_DATA, this));