Need help with parsing id3v2 TCO/TCON frames

The place for "I can't figure out how to..." questions.
Post Reply
Igor Kroitor
Posts: 4
Joined: Fri Sep 15, 2006 2:36 am
Location: Moscow, Russia

Need help with parsing id3v2 TCO/TCON frames

Post by Igor Kroitor » Sun Sep 17, 2006 9:18 pm

Please clarify the description of TCO/TCON frame contents taken from id3v2.2/id3v2.3/id3v2.4 standards:
References to the ID3v1 genres can be made by, as first byte, enter "(" followed by a number from the genres list (appendix A) and ended with a ")" character. This is optionally followed by a refinement, e.g. "(21)" or "(4)Eurodisco". Several references can be made in the same frame, e.g. "(51)(39)". If the refinement should begin with a "(" character it should be replaced with "((", e.g. "((I can figure out any genre)" or "(55)((I think...)". The following new content types is defined in ID3v2 and is implemented in the same way as the numerig content types, e.g. "(RX)".

RX Remix
CR Cover
According to this, TCON frame can contain several references to id3v1 genres, where a reference is a round-braced numeric string with an optional refinement, which SHOULD be round-braced too, if begins with a '(' symbol.
So, these example strings appear to be standard-conformant:
  • (55)
Did i get it properly? There can be any amount of references, each holding an optional refinement which in turn can be braced, but can't start with a single brace? For id3v2.4 the separator has changed, so it became easier to parse such data, but what with id3v2.2/id3v2.3 ? Just need to be sure to understand things...

James Heinrich
getID3() v1 developer
Posts: 1477
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada

Post by James Heinrich » Sun Sep 17, 2006 9:36 pm

That looks right. Confusing, maybe, but according to the ID3v2 specs :D

Post Reply