MusicBrainz
MusicBrainz is the leading provider of open source music metadata for musical Artists, Albums, and Tracks. [1]
Contents
Specifications
- MusicBrainz Metadata Vocabulary: http://www.ldodds.com/projects/musicbrainz/schema/mb.html
- MusicBrainz Terminology: http://test.musicbrainz.org/doc/MusicBrainz_Terminology
- MusicBrainz Next Generation Schema (NGS): http://musicbrainz.org/doc/Next_Generation_Schema (2011-onward)
- MusicBrainz DB Schema (OLD): http://musicbrainz.org/doc/Database_Schema/Full_Size (2000-2010)
Community
MusicBrainz was one of the first major online music communities and also one of the wiki-style open information collaboration tools (pre-dating even Wikipedia, as it began around January 2000[2] (one full year before Wikipedia was launched) as a scalable music metadatabase that attempts to create a comprehensive music information site. While it started primarily as an academic project by several music enthusiasts, it quickly grew into a popular service and active international open source community project with contributors all over the world. The founders cited a desire to create an open alternative to the CDDB which was taken over by GraceNote, the world's largest (at the time) music database, CD identification service, purveyor of Music statistics and music information.[3] While a free version of the last non-proprietary version of CDDB is still available at FreeDB, it is technically inferior in several ways (mostly because it is based on a flat file format not relational database) and contains many more duplicates than MusicBrainz.
Its success is largely attributed to it's openness, which stands in stark contrast to the proprietary music databases of the day. You can use the MusicBrainz data either by browsing this web site, or you can access the data from a client program — for example, a CD player program can use MusicBrainz to identify CDs and provide information about the CD, about the artist or about related information. You can also use the MusicBrainz Tagger to automatically identify and clean up the metadata tags in your digital music collections.
In 2005 MetaBrainz was founded to official take over the day-to-day administration of MusicBrainz (as it had grown too large for the hobbyist creators to manage), and control was handed over on April 19th, 2005.[4] At this point, many large donations came in, including from Google and Rick Jones (co-found of Last.fm).[5]
Database
- MusicBrainz products: http://musicbrainz.org/doc/Products
- MusicBrainz - (on-site catalogue) Text Search Syntax: http://wiki.musicbrainz.org/Text_Search_Syntax
- Band (artist) search: http://musicbrainz.org/search?query=AC%2FDC&type=artist | EXAMPLE - Artist page
- Album (release, type=album) search: http://musicbrainz.org/search?query=Back+in+Black&type=release_group | EXAMPLE - Album page
- Song (recording) search: http://musicbrainz.org/search?query=back+in+black&type=recording | EXAMPLE - Recording page
Web Service
Version 1.0
The MusicBrainz Web Service, v1.0 will be phased out until late 2011.
- MusicBrainz WS v1.0: http://musicbrainz.org/doc/XML_Web_Service/Version_1
- Searching for a specific Artist: http://musicbrainz.org/ws/1/artist/?type=xml&name=AC/DC
- Artist info (using ID obtained from a previous search, internal calculation, or external source): http://musicbrainz.org/ws/1/artist/66c662b6-6e2f-4930-8610-912e24c63ed1?type=xml&inc=url-rels+artist-rels
Version 2.0
As of 2012, v2.0 is the only way to use the MusicBrainz API.
- MusicBrainz WS v2.0: http://musicbrainz.org/doc/XML_Web_Service/Version_2
- Searching for a specific Band (artist): http://musicbrainz.org/ws/2/artist/?query=AC/DC
- Display Artist by Artist ID: http://musicbrainz.org/ws/2/artist/66c662b6-6e2f-4930-8610-912e24c63ed1
- Searching for (max 25) Albums (release) by a specific Artist: http://musicbrainz.org/ws/2/release?artist=66c662b6-6e2f-4930-8610-912e24c63ed1&type=album&limit=25 (may contain multiples, i.e. US version, UK version, etc)
- Searching for (max 25) UNIQUE Albums (release) by a specific Artist: http://musicbrainz.org/ws/2/release-group?artist=66c662b6-6e2f-4930-8610-912e24c63ed1&type=album&limit=25
- Searching for (max 25) Singles (release) by a specific Artist: http://musicbrainz.org/ws/2/release?artist=66c662b6-6e2f-4930-8610-912e24c63ed1&type=single&limit=25
- Searching for specific Album (release) by a specific artist: http://musicbrainz.org/ws/2/release/?query=artist:ac/dc+release:Back%20in%20Black
- Display Album versions for a given release ID: http://musicbrainz.org/ws/2/release-group/d3bc1a64-7561-3787-b680-0003aa50f8f1?inc=releases
- Display Album by its release ID: http://musicbrainz.org/ws/2/release/83ff6988-2f79-40b9-82d5-437f2a5da5f3?inc=artist-credits%2Blabels%2Bdiscids%2Brecordings%2Btags
- Searching for a specific Song (recording): http://musicbrainz.org/ws/2/recording/?query=Back%20in%20Black
- Searching for a specific Song (recording), by a specific Band (artist): http://musicbrainz.org/ws/2/recording/?query=artist:AC/DC%20Back%20in%20Black
MusicBrainz ID
MusicBrainz ID (MBID) is more than just an auto-generated key in some database, it is similar to the CDDB Disc ID for looking up a CD based only on knowledge of the number of tracks, their length and the total album length (although it has a significantly different algorithm). Each ID number is explained here:
Here's an example, using Pearl Jam's " Vs." album:
Track# | Title | Duration | Seconds | Timeline | Frame | Sum | CheckSum |
---|---|---|---|---|---|---|---|
0. | LEAD-IN | 0:02 | 2 | 0 | 150 | 0 |
-- |
1. | Go | 3:13 | 193 | 2 | 14672 | 2 |
2 |
2. | Animal | 2:49 | 169 | 195 | 27367 | 15 |
17 |
3. | Daughter | 3:56 | 236 | 364 | 45030 | 13 |
30 |
4. | Glorified G | 3:27 | 207 | 600 | 60545 | 6 |
36 |
5. | Dissident | 3:35 | 215 | 807 | 76707 | 15 |
51 |
6. | W.M.A. | 5:59 | 359 | 1022 | 103645 | 5 |
56 |
7. | Blood | 2:51 | 171 | 1381 | 116430 | 13 |
69 |
8. | Rearviewmirror | 4:44 | 284 | 1552 | 137730 | 13 |
82 |
9. | Rats | 4:15 | 255 | 1836 | 156887 | 18 |
100 |
10. | Elderly Woman... | 3:16 | 196 | 2091 | 171577 | 12 |
112 |
11. | Leash | 3:10 | 190 | 2287 | 185792 | 19 |
131 |
12. | Indifference | 5:02 | 302 | 2477 | 208500 | 20 |
151 |
EXAMPLE CDDB Calculation
Each CDDB Disc ID has[6]:
8 digits: XXYYYYZZ
You can caculate each as follows: XX = Checksum Total mod 255
checksum total (from table) is 151 % 255 = 151 ==> 97 in HEX
YYYY = Total Time, all tracks
album running time of 46:18 or 2778 seconds ==> ada in HEX, but we need 4 digits so it becomes 0ada
ZZ = Total Tracks
album with 12 songs, 12 ==> c in HEX, but we need two digits so it becomes 0c
970ada0c
EXAMPLE MusicBrainz ID Calculation
The CD Index algorithm simply takes the following pieces of data and runs them through the SHA-1 hash function[8][9][10][11][12]:
First track number (normally one): 1 byte Last track number: 1 byte Lead-out track offset: 4 bytes 99 frame offsets: 4 bytes for each track
To find this info for an album, use the sampling rate 44.1 kHz using 16 bits resolution per channel:
44100 x 2 bytes x 2 stereo channels = 176400 bytes of PCM data stored per second
Along with the fact that audio data is stored in logical blocks of 2352 bytes each on the CD, holding:
2352 blocks / 176400 bytes = 1 block / 75 seconds of sound
Each logical block has 882 bytes of error correction and control data that needs to be accounted for, giving:
882 * tracks ==> 882 * 12 = 10584 padding blocks
Again, for Pearl Jam's Vs. we get the following:
track 1: 150 (150 + 0) track 2: 14822 (150 + 14672) track 3: 27517 (150 + 27367) track 4: 45180 (150 + 45030) track 5: 60695 (150 + 60545) track 6: 76857 (150 + 76707) track 7: 103795 (150 + 103645) track 8: 116580 (150 + 116430) track 9: 138030 (150 + 137880) track 10: 157037 (150 + 156887) track 11: 171727 (150 + 171577) track 12: 185942 (150 + 185792) lead-out track: 208650 (150 + 208500)
Which gives us the MBID:
7244f710-6090-43a2-a4e0-772623d71cf5
Tools
- EAC/XLD CD Ripping tool log - to MusicBrainz Disc ID - converter: http://eac-log-lookup.blogspot.com/[13]
- libmusicbrainz - provides access to the API and Web Services for MusicBrainz's vastly expansive metadata catalogue: http://musicbrainz.org/doc/libmusicbrainz
- Python MusicBrainz - WebService REST API: http://users.musicbrainz.org/~matt/python-musicbrainz2/html/
- CD Record: http://cdrecord.berlios.de/private/cdrecord.html
Resources
- LinkedBrainz - A project to provide MusicBrainz NGS as Linked Data: http://linkedbrainz.c4dmpresents.org/about
- MusicBrainz - XML Web Services: http://musicbrainz.org/doc/XML_Web_Service/
- CGI portal wrapper to FreeDB's CD collection: http://freedb.musicbrainz.org/~cddb/cddb.cgi
- CDDB Server Protocol: http://ftp.freedb.org/pub/freedb/latest/CDDBPROTO
- CDDB1 database entry format: http://ftp.freedb.org/pub/freedb/latest/DBFORMAT
- CD technology FAQ: http://www.cdrfaq.org/
- How CDs Work: http://www.howstuffworks.com/cd.htm
Tutorials
- NGS Server Setup: http://wiki.musicbrainz.org/NGS_Server_Setup
- How PUIDs Work - Music Analysis vs Fingerprinting: http://musicbrainz.org/doc/How_PUIDs_Work
- Summer fun with Musicbrainz: the "real" Six Degrees of Kanye West: Pt.1 | Pt.2 | Pt.3
External Links
- MusicBrainz: http://www.musicbainz.org
- MetaBrainz: http://metabrainz.org/ (501.(c).3 tax-exempt non-profit owner of MusicBrainz)
- FreeDB: http://freedb.org | EXAMPLE - DiscID Search | EXAMPLE - Artist/Album text search
- wikipedia: MusicBrainz
- wikipedia: Gracenote
- wikipedia: CDDB
- wikipedia: Compact Disc
- wikipedia: DVD
- wikipedia: Hard disk drive
- wikipedia: Disk sector
- wikipedia: Eight-to-fourteen modulation
- MusicBrainz FAQ: http://musicbrainz.org/doc/General_FAQ
- MetaBrainz hires Kuno Woudt (warp) as a full time developer! (to finish NGS): http://blog.musicbrainz.org/?p=437
- Interview - Kuno Woudt, MusicBrainz : http://www.fsf.org/bulletin/2010/fall/mattl-musicbrainz
- NGS Bug fixes, 2011-09-12: http://blog.musicbrainz.org/?p=1046
- Gracenote Founder Rewriting History At Wikipedia: http://yro.slashdot.org/story/06/12/02/1955245/Gracenote-Founder-Rewriting-History-At-Wikipedia
- Gracenote Controversy: http://en.wikipedia.org/wiki/Talk:Gracenote#Controversy
- Kiwi Symphony's Errant Scat Music: http://www.wired.com/culture/lifestyle/news/2002/10/55701
- The House That Music Fans Built: http://www.wired.com/entertainment/music/news/2004/07/64033
- Companies fight over CD listings database (CDDB), leaving the public behind: http://news.cnet.com/2009-1023-258109.html
- It takes 1.75 minutes to analyze 100,000 sectors of digital space. How long would it take to analyze 7,000,000?: http://answers.yahoo.com/question/index?qid=20091023135753AAVlSM3
- How to Convert mm:ss:ff to Bytes? : http://forum.imgburn.com/index.php?showtopic=2122
- How much data can they (CD-DA) hold? 650MB? 680MB? : http://www.cdrfaq.org/faq07.html#S7-6
- Gracenote Help! It's a mystery: http://www.gearslutz.com/board/mastering-forum/563211-gracenote-help-its-mystery.html
References
- ↑ http://musicbrainz.org
- ↑ MusicBrainz project - User Group/Mailing list: http://lists.musicbrainz.org/pipermail/musicbrainz-users/
- ↑ About MusicBrainz: http://musicbrainz.org/doc/About_MusicBrainz
- ↑ MetaBrainz Launches: http://blog.musicbrainz.org/?p=102
- ↑ MetaBrainz sponsors: http://musicbrainz.org/doc/MusicBrainz_Sponsors
- ↑ Example calculation of a CDDB (FreeDB/Gracenote) disc ID: http://medlibrary.org/medwiki/CDDB#Example_calculation_of_a_CDDB1_.28FreeDB.29_disc_ID
- ↑ CDDB.java: http://introcs.cs.princeton.edu/java/51data/CDDB.java.html
- ↑ Disc ID Calculation: http://musicbrainz.org/doc/Disc_ID_Calculation
- ↑ MusicBrainz DiscID - wiki: http://wiki.musicbrainz.org/Disc_ID_Calculation
- ↑ Convert text to Uppercase: http://www.convertcase.net/
- ↑ SHA-1 Calculator: http://www.xorbin.com/tools/sha1-hash-calculator
- ↑ Base-64 Encoder/Decoder: http://www.motobit.com/util/base64-decoder-encoder.asp
- ↑ Source Code: https://gist.github.com/766668