Switching Trident animation blueprints to MusicBrainz
Project Onyx aims to provide blueprints for animated Swing applications powered by the Trident animation library. It displays scrollable cover art for the specific artist, and allows viewing track listing for the selected album. When i first introduced Onyx a few months ago, it fetched the album information from the Amazon backend. Recently Amazon has decided to further tighten the requirements for applications connecting to its backend, and in addition to using application keys, it also requires that all requests are authenticated using signatures.
![]()
As this places even more obstacles for people interested in trying Onyx locally (or remotely, for that matter – since i don’t want to publish the keys that i was using), i started looking for an alternative backend provider. My first stop was Yahoo! Music API, but after reading the documentation i found that in addition to requiring an application key it also returns very small cover art. My next stop was Last.fm Web Services. Here, in addition to requiring an application key, the main limitation seems to be a lack of an API to retrieve the track listing for a specific album.
Finally, a helpful thread at StackOverflow pointed me to the MusicBrainz service. After reading the documentation and trying out the examples – without the need for any application key – i have migrated the Onyx codebase to use MusicBrainz. The best part is that since there is no key, Onyx can now be WebStarted by clicking the button below – just make sure that you have Java 7 installed since it uses the new Window APIs for translucent and shaped windows:
The backend connector for MusicBrainz is quite simple, and it uses the JDOM library to parse the XML responses. There are a few notable issues with MusicBrainz that still don’t make it the best choice to fetch album information from the web:
- In general, content is user supplied and not vetted for completeness.
- Multiple entries for the same albums – need to be filtered out based on artist/title or ASIN.
- Track entries for some albums are named [data track].
- Only XML format supported in replies.
- No ability to sort results based on album attributes (such as release date).
- Cover art is not available. Needs to be fetched using “magically” crafted URLs from Amazon.
In the next few days i’m going to move Project Granite – the SWT counterpart of Onyx – to use MusicBrainz as well. In the meantime, browse the updated Onyx code, run the demo above and enjoy the animations powered by Trident. Release 1.1 is just around the corner.
Related posts:
- Introducing Project Onyx – Animation Blueprints for Swing Project Onyx aims to provide blueprints for adding animation to Swing applications using the Trident...
- Introducing Project Granite – Animation Blueprints for SWT Project Granite aims to provide blueprints for adding animation to SWT applications using the Trident...
- Animation blueprints for Swing – the conclusion Concluding the series on adding animations to enable rich interactivity expected from modern Swing applications,...
- Animation blueprints for Swing – scrolling layout After adding such animation effects as fading, translucency, load progress and asynchronous load of images...

September 29th, 2009 at 9:57 am
Really nice.. very smooth animation… Cool!
September 29th, 2009 at 7:25 pm
Hi Krill,
Is Trident 1.1 a bugfix/enhancement or an Api change release..
Regards,
Pavan
September 29th, 2009 at 7:33 pm
Pavan,
Allow me to respond to this in the next few blog entries. Of course, you can always download the binaries / sources and take a look at the sources / samples.
Thanks
Kirill
October 6th, 2009 at 7:08 am
Hi Krill
Instead of using JDOM you can use the JAXB classes maintained at http://code.google.com/p/brainz-mmd-jaxb/downloads/list
October 6th, 2009 at 7:37 am
Hi Paul
Thanks for the link. I will look into using the JAXB classes in the next few weeks.
Thanks
Kirill