1 / 18

Adding MusicBrainz Support to jMusicMetaManager

Bruno Angeles McGill University – Schulich School of Music MUMT-621 Fall 2009. Adding MusicBrainz Support to jMusicMetaManager. Outline. Introduction jMusicMetaManager and MusicBrainz Some Programming Definitions ID3v1 vs ID3v2 Changes From java_mp3 to jid3lib

payton
Download Presentation

Adding MusicBrainz Support to jMusicMetaManager

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bruno Angeles McGill University – Schulich School of Music MUMT-621 Fall 2009 Adding MusicBrainz Support to jMusicMetaManager

  2. Outline • Introduction • jMusicMetaManager and MusicBrainz • Some Programming Definitions • ID3v1 vs ID3v2 • Changes • From java_mp3 to jid3lib • Code Sections of Interest • Finishing the Project • Improvements • //TODO: • Current Issues

  3. What is jMusicMetaManager? • […] a tool for improving metadata associated with recordings by automatically detecting inconsistencies and redundancies. (McKay et al. 2006)

  4. What is MusicBrainz? • MusicBrainz is a user-maintained community music metadatabase. http://musicbrainz.org/doc/AboutMusicBrainz

  5. Some Programming Definitions • Object-OrientedProgrammingProgrammingparadigmObjects & Classes: Shapesexample • GUIGraphical User Interface • StringSequence of characters • Hash tableArray of values accessedwith a key

  6. ID3v1 vs ID3v2 • ID3v1 • 30 bytes max per field • Metadataisat the end of the file • ID3v1.1: add 60 bytes to title, artist, album • (ID3v1.2: comment 3043 bytes) • ID3v2 • Use Frames (hash table) of max total size 256MB! • Internationalization: differentcharacter sets • Metadataisat the start of the file  streaming • ID3v2.1, ID3v2.2, ID3v2.3 • ID3v2.4: not widelysupported

  7. From java_mp3 to jid3lib • java_mp3 (even the latest release 0.4 December 2008) supports ID3v1 but only ID3v2.0 (i.e., revision 0) • jid3lib supports: • ID3v1.0 and ID3v1.1 • ID3v2.0 to 4 • Other JAVA libraries for ID3 tags: jaudiotagger, Entagged , AudioTT, Axone , ID3v2 Audio Text Tools, ID3v2 ChapterTool, Jaikoz, etc.

  8. Code Sections of Interest • ID3 library change  Metadata abstraction • Class RecordingMetaData:public RecordingMetaData(File mp3_file) • Reporting choices • Class AnalysisPreferenceshandleGUIselections • Report generation • Class AnalysisProcessornew methodreportMusicBrainz() • MusicBrainz querying • Class MusicBrainzProcessor • GUI

  9. MusicBrainzProcessor Class Uses libmusicbrainz-javalibrary (revision 12315) for querying

  10. reportMusicBrainz() • Iterate through all parsed files: • Fetch artist name • Fetch album name (using artist name) • Fetch title (using artist and album names)

  11. GUI Changes

  12. GUI Changes

  13. Sample Report In browser

  14. Improvements • More files cannowberead by the software! • Simplest report, full personallibrary (all MP3, no iTunes XML): • Previously: readonly 6 985/10 377 = 67% of ID3 tags (mostlybecause of ID3v2 revision > 0) • Now: reads 9 892 / 10 377 = 95% of ID3 tags • Character set whenreadingyear canbefixed • ID3 tag exception  to investigate • Basic MusicBrainz support so far

  15. //TODO: • Improve MusicBrainz hit rate • Handle weird character sets • Create an ID3 randomizer for testing purposes? • Add more options to the MusicBrainz report • Add MusicBrainz links to the report • Maintain all the metadata fields from the previous implementation • Try other available libraries that support ID3v2.4 • Use other MusicBrainz servers to avoid low query rate? • Figure out if the credentials are necessary

  16. Current Issues • jid3lib: simplifies a lot of data fetching, but not everything! • Hash tables with different keys across revisions • Managed fields so far in my project: artist, album, title, composer, year (first 4 chars MUST be numbers), compilation, comments (only ID3v1), genres, bit_rate • Data integrity: • String fields that are converted to numerical values • Files with both ID3v1 and ID3v2 metadataRead v2, else read v1? Read v1, then overwrite with v2? • Handling different character setsÿþ 0xFF 0xFE signature of UTF-16 encoding

  17. Current Issues (continued) • Random IOExceptions • Tags that exist in 2 places: • Comments / SongComments • Year / YearReleased • Compilation tag: only if folder contains “Compilation” • Limit of 1 query per second can slow down reporting • 10 377 queriestake a minimum of 2 h 53 min

  18. References • McKay, C., D. McEnnis, and I. Fujinaga. 2006. A large publicly accessible prototype audio database for music research. In Proceedings of the International Conference on Music Information Retrieval. Victoria, Canada. 160–3. Links Dan O’Neill. 2009. Home – ID3.org. http://www.id3.org/ (accessed 26 November 2009) Cory McKay. 2006. jMusicMetaManager. http://jmir.sourceforge.net/manuals/jMusicMetaManager_manual/Manual.html (accessed 26 November 2009) EricFarng. 2005. Java ID3 Tag Library. http://javamusictag.sourceforge.net/(accessed 26 November 2009)

More Related