|
Projects
Spring 2012 Older Courses Fall 2011 Spring 2011 Fall 2010 Spring 2010 Fall 2009 Spring 2009
Fall 2008
Spring 2008
Fall 2007 HOWTOs |
OPLspr09 /
SchemeMusicOrganizerKeith Fader OverviewThis project is intended to automatically convert a collection of unorganized music files into a more organized collection of id3-tagged mp3s. It is intended to have an extremely simple user interface, and to be able to run unobtrusively. Screenshot![]() Concepts Demonstrated
External TechnologyThis project integrates with a number of external technologies. It works with PLT Scheme's system interface to execute a number of external processes. SoX is used to convert the music files to mp3, mp3check is used to check the consistency of the mp3s, lltag is used to intelligently tag the mp3s, and mp3rename is used to assure a consistent naming format. InnovationThere is currently no tool designed to automatically fix large, disorganized, music collections. This program will run and fix, without user input, an entire music collection. Technology Used Block DiagramIn this program, the front end does not manipulate the music files. It accomplishes all the reading and writing through the use of SoX, lltag, mp3check and mp3rename, as shown. It initializes the processes through Scheme's system interface, and then communicates with them through input and output ports. ![]() Additional RemarksThe editing of the id3 tags was intended to be done purely in Scheme. Unfortunately, I was unable to implement this feature. There are 6 different types of ID3 tag, with up to 84 different fields and no standard for character encoding. The tag may be located at the beginning or end of a file, and there are many subtle but crucial differences between the versions. Given that the expectation was that this program would have to deal with an unorganized music collection containing any or all the formats and possibly broken files, I felt it was more appropriate to use lltag for the purpose of reading and writing the tags. The original intent was to use a web service to retrieve the metadata for the ID3 tags. Originally, this was to be accomplished by querying Gracenote's cddb service. I spent a week waiting for them to send me a developer's license before finding out that I couldn't use this service, as their database must be queried by album name. I then attempted to use libtunepimp through PLT Scheme's Foreign Function Interface. This also proved impossible, as libtunepimp has been deprecated and the documentation for it appears to have been removed. There is also a one-query-per-second limitation, which would have made fixing large collections take an annoyingly long time. Since lltag has a mode that allows it to intelligently write ID3 tags, I was forced to fall back on it for that as well. That said, the final program accomplishes it's objective. It is a quiet, unobtrusive music organizer that can process an entire collection in the background with no user interaction. It was intended to be turned loose on a directory of random files, and organize those into well-named sanely-tagged mp3s, and at that, it works perfectly. |