| «« More on the Quick Edit Perspective | Durham Not Using Java 5 »» |
|
About
I'm Ryan Lowe, a Software Engineering graduate living in Ottawa, Canada. I like agile software development and Ruby on Rails.
I write this blog in Canadian English and don't use a spell checker. Typos happen.
Projects
» Full-time Ruby on Rails freelancer
» Full-time with Rails since May 2005 » Former committer for RadRails (now Aptana) » I also have a few Rails side-projects in development: 1. wheretogoinTO.com Toronto nightlife 2. Hey Heads Up! TODO list and sharing 3. Layered Genealogy family history research 4. foos for foosball scoring 5. fanconcert for music fans (on hold) Hiring Rails developers? I can telecommute by the hour from Ottawa, Canada »» Email: rails AT ryanlowe DOT ca
BulletBlog
Now hosted on Hey! Heads Up -- check it out!
Syndication
Pings
Recent
Derek Lowe's (Ryan's older brother) words at Ryan's funeral
blog@ryanlowe.ca no more Forging Email Headers: Good, Bad or Ugly? Sarcastic Dictionary (Part 1 of Many) Tags Hierarchies Twisting Rails is Risky Business Risky Business? My Take on Early Alphas Whoa, it's August 2007 Closing Comments A Postscript to "Growth at the grassroots" »» All Blog Posts
Linkage
del.icio.us/ryanlowe
technorati/ryanlowe.ca/blog Aurora Roy Jim Andrew Trasker Travis Kibbee Karen Dr. Unk Ayana Van Bloggers Joel Spolsky Robert Scoble Tim Bray Dave Winer Raymond Chen James Robertson Ruby/Rails Bloggers rubyonrails.org weblog David Heinemeier Hansson Dave Thomas James Duncan Davidson Mike Clark Jamis Buck Signal vs. Noise Tobias Luetke Amy Hoy: (24)slash7 Jeremy Voorhis Eclipse Bloggers Planet Eclipse EclipseZone Luis de la Rosa Eclipse Foundation Kim Horne Billy Biggs Ian Skerrett Mike Milinkovich Bjorn Freeman-Benson Denis Roy
Archives
|
Properties Get More Difficult
Properties used to be simple. They used to be just a name and value pair, like these:
You could store these name-value pairs in a Java Map, and get the values using the name as the Map key. Then id3v2 came along and complicated matters. id3v2 has many properties using keys comprised of more than one value. A simple example is the Comments frame of id3v2 -- frame ID of COM or COMM -- which can exist multiple times in an id3v2 tag as long as the language and description fields are different (Here's a list of all of the id3v2 frame types). Three fields then become the property key -- id, language, description -- and uniquely identify the property. An application like iTunes uses the key:
for the "default" comment -- the one that shows up in the UI. Possibly for other language versions of Mac OS X the language changes, I can't be sure about that. It also uses two other comments to store some iTunes-specific values:
WinAmp is lazy and just picks up the first Comment frame instead of looking for the one with the blank description. So the first could be the user-entered comment or one of this iTunes ones with data in it that doesn't make much sense to a user. The spec says that the comments should be sorted by importance. Maps are handy for storing properties and I want to keep using them. But my property keys are going to have to get a little more complicated to handle these types of properties. I also want to keep it simple for simple situations though -- the Map should still support regular one string names for keys as well. Of course in a Map all of the keys need to be unique. --- That's not all. The UI has to be able to know what a valid key looks like. To do that I have to be able to describe keys and the elements in them. In the example above valid id and language values come from a known set (ie. enumeration). The UI could display this set as a dropdown box. The description field is a little more free-form and can even be blank. In other id3v2 properties some of the keys are numbers that have to be within a certain range or cannot be empty. Expressing these restrictions could be a little tricky... I don't want to get too far ahead of myself but at the same time I don't want to trivialize metadata properties by thinking they are always easy name-value pairs. It might be nice to start with a basic name-value pair-based GUI for Durham but at some point Durham is going to have to support these "advanced" kinds of properties as well somehow. Hopefully sooner than later because great id3v2 support could really be a killer feature of Durham and the next AudioMan. I know Roy's definitely been clamoring for great id3v2 support. ;) Posted at January 11, 2005 at 03:29 PM ESTLast updated January 11, 2005 at 03:29 PM EST Comments
Yes I have! People like us want to identify what songs we have, however, 99% of the users out there are too lazy to manually update it, thus these id3v1/2 tags are a waste of space and lead to misinformation and illegitimate data listings in your mp3 player, HD, and on P2P apps. This has to be automated, or atleast intelligent, or else things will stay the same. People are lazy by nature and are not going to give a damn about id3v1/2 tags. It's sad but true. But, we still need to improve it. I think it's like a phase in digital audio right now. We're in that "damn, we should've automated that metadata update before we the Internet was flooded with a billion mp3s." Oops. That's pretty much where we stand right now. Lessons learned...and it also doesn't help that the id3v1/2 specs were made unncessarily complex. Like, who in the world uses the "Composer" field when filling out their id3v2 tag?!? The artist is good enough. No need to get cute and fancy. » Posted by: roy at January 12, 2005 12:20 AMOne thing that I would suggest would be to make a simple "key" class rather than trying to shoehorn strings as keys all the time. If you override the methods like hashcode, equals and toString you can still keep them in sorted data structures easily enough. I just think that long term it would be more flexible. You may also want to make a key interface so that for any meta data just have to implement that. And that way for specific restrictions like "this has to be a number between 0-255" you can hid that in the implementation. Just a suggestion... ;-) » Posted by: Jim at January 12, 2005 09:14 AMI'll be posting my initial run at the properties stuff soon .... probably in -- ACK! -- UML. » Posted by: Ryan at January 12, 2005 09:26 AM |