[ID3 Dev] TKEY

Ben Allison benski at winamp.com
Sun Jan 14 14:13:19 PST 2007


A-G (required) + b or # (optional) + m (optional)

According to music theory, not all combinations are valid (e.g. one would
use Bb instead A#).  If you want to be strict about it, the valid scales
are listed at the bottom of the wikipedia entry about diatonic scales
(http://en.wikipedia.org/wiki/Diatonic_scale).  However, I wouldn't
recommend validating to that extent.

-Ben Allison


> I have a question about the implementation of the TKEY, the Initial Key,
> frame.  Here's the spec for TKEY...
>
> The 'Initial key' frame contains the musical key in which the sound
> starts.
> It is represented as a string with a maximum length of three characters.
> The
> ground keys are represented with "A","B","C","D","E", "F" and "G" and
> halfkeys represented with "b" and "#". Minor is represented as "m".
> Example
> "Cbm". Off key is represented with an "o" only.
>
> I have no idea what a ground key or a halfkey is, so I really don't
> understand what the valid combinations are.  For example, is "A" by itself
> a
> valid value or does there have to be a halfkey, like "A#"?  Basically, I'm
> a
> big music fan, but I know next to nothing about this kind of stuff.
>
> What would be really nice is if someone could provide a RegEx expression
> to
> validate the TKEY text, but short of that, an explanation of the valid
> combinations of the above sections would be appreciated.
>
> Thanks,
>
> Mitchell S. Honnert
> www.UltraID3Lib.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
> For additional commands, e-mail: id3v2-help at id3.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org



More information about the ID3v2 mailing list