DEVELOPERS BLOG

AudioMetaData WebWorks Plug-in

OPEN SOURCE / 02.10.15 / timwin1

This past fall we worked with the UCOSP program again, with a kickoff sprint back in September, and several students joined us to work on WebWorks plugins for the term. Many of the students worked on larger projects this time and wrote blog posts at the end of the term, which was in December. As a result, we’ll gradually publish their comments in blogs over the next few weeks. The first we’ll hear from is Jim, from the University of Alberta.

tim automed

While working with the BlackBerry UCOSP team, I was given the opportunity to work on a plugin that extracts ID3 metadata from mp3 files. I strode into the project thinking that it would be fairly simple; however, when it came to the time to code, everything fell apart. Given the previous examples provided by Tim, our advisor, assumptions of simple linkage of components were in my mind. However, it turned out that the license of the sample library I was supposed to use conflicted with the licenses which our plugins were based on. Besides the license conflict issue, other challenges also arose along the way. Midway into the project, Unicode handling became an issue as ID3 tags contained data that is encoded in either ISO88591 or Unicode. The data which I was working with turned out to be garbage in my test application and this had me stumped for a week or two. Besides some implementation issues, others occurred simply due to working with an unfamiliar platform. As more time was dedicated to the project problems began to be solved, I was able to produce a working plugin that fulfilled all the requirements. Finally, for the released product, the plugin takes a file path to the mp3 file the users wished to work with. In return, depending on the function called by the users, they can extract, set, as well as remove the ID3 metadata that exists on an mp3 file. However, the last functionality is a bit senseless, as the need to remove ID3 tags from mp3 files seems little to nonexistent.

In both extraction and injection of the ID3 tags, the user has the ability to only set the following:

  • song
  • title
  • artist
  • name
  • track
  • number of the song on the album
  • album name
  • year of release
  • genre

In the case of extraction, the data is returned in a JSON object in the following form: { “album” : “Let’s talk about love”, “artist” : “Celine Dion”, “genre” : “pop”,“title” : “My heart will go on”, “year” : “1997” }

And in the case of injection of data, the same formatted JSON data is needed to be passed into the function with the following keys editable: “title”, “album”, “artist”, “year”, “genre”, “track”.

Even though current version of release is functional, it is always possible to add new features. Some ideas include:

  1. Possible optimization to the library used as it currently copy and pastes the entire file edited thus causing a delay in operation.
  2. Further testing for specific edge cases that might have been forgotten to handle.

Overall the UCOSP program provided me with the chance to see what is like working with students across Canada on an open source project and I highly recommend this experience for students who are interested in contributing to open source application development.

We’ve already started a new term working with students, but we’ve got a few more updates to post about last term before we talk about their work. If you’re interested in following along with the student project, watch #bbucosp on twitter, and all the code will be going into the public BlackBerry repositories on GitHub. If you want to get involved yourself, contact me to get started: @timothywindsor on Twitter, https://github.com/timwindsor on GitHub.

About timwin1