Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

Article Preview


Buy Now

Print:
PDF:

Review

iTunesLibraryParser

Issue: 2.1 (August/September 2003)
Author: Greg Fiumara
Article Description: No description available.
Article Length (in bytes): 4,432
Starting Page Number: 8
RBD Number: 2102
Resource File(s): None
Related Link(s): None
Known Limitations: None

Full text of article...

Integration is the latest developer buzz since Cocoa, at least it seems that way with the release of Apple's iLife. All four of the applications (iTunes, iMovie, iPhoto, iDVD) are interconnected so that one application can access data from the other. Integration is nothing new to the Mac, as with the release of Mac OS X v. 10.2, the Address Book application's data could be accessed from any application. Apple iSync provides for a way to synchronize the information from Address Book and Apple iCal to various digital devices. Countless applications allow Internet integration and importation of competitor product formats. Web browsers provide "auto-fill" features. Now, with iTunesLibraryParser 1.0, a new set of classes from DynamAPP, REALbasic developers are one step closer to iTunes integration in their own projects.

iTunesLibraryParser is compatible with REALbasic versions 4.5 and up, but not without some changes. To run the project under REALbasic 5, one must make some variable name changes. This is because some of the variable names iTunesLibraryParser uses are reserved words in REALbasic 5. The project runs without a problem under REALbasic 4.5.

The process iTunesLibraryParser uses to integrate with iTunes is very simple. iTunesLibraryParser uses Amar Sagoo's XML Toolkit to parse the iTunes Music Library.xml file (located in ~/Music/iTunes/). The next step is to decode the encoded URL reference to each audio file. This step uses the URLCodec plugin from Taaki Mizuno. However, the enitire routine is lengthy. For example, a 560 KB XML file with 409 songs required 1:07 minutes to parse when the example was compiled with REALbasic 5. The process was much longer when using REALbasic 4.5. DynamAPP recognizes this in the well-written documentation file included in the free download. There are other helpful items contained in the documentation, such as a reference guide for all events, methods, and properties included in the classes as well as a "how to" section. In addition to detailed documentation, iTunesLibraryParser comes with a completely commented example project.

There are numerous ways in which one could use iTunesLibraryParser. Aside from a decent learning experience, one could use the features in their own multimedia player. There are numerous multimedia players made with REALbasic. With iTunesLibraryParser, these applications will be able to copy a user's playlists and music from iTunes, substantially decreasing the application's setup time and providing the user with more time to get acquainted with the application's features, not setting up the program. When parsing the XML file, iTunesLibraryParser gathers some information about the audio file such as the name, album, and year. If you will be using iTunesLibraryParser in the way indicated, you may also wish to gather the ID3 resources from the audio file.

Integration provides for an easy way of data storage. A user can enter information one time and have that information used numerous places with out the inconvenience of entering the information. Ideally, that is what the personal computer was made for. As developers, we can make applications cater to the user. iTunesLibraryParser could possibly start a trend for REALbasic programmers.

In Brief
 
Product
iTunesLibraryParser 1.0
 
Manufacturer
DynamAPP
 
Price
Free
 
System Requirements
REALbasic 4.5, Included plug-ins
 
Contact Info

timlenertz-at-mac.com

http://homepage.mac.com/timlenertz

 
Pros
Accurately gathers all iTunes music files and playlists and organizes the, Decodes encoded URLs
 
Cons
Parsing is lengthy, Not compatible under REALbasic 5 without some variable name changes
 
Rating (1.0-5.0): 3.5

End of article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com