This page has not been reviewed by our documentation team (more info).

MusicBrainz Client Library Examples

Status: This page is part of the effort of RestructuringTheDocumentation. It is a wikified version of this [WWW] static page. This pages WikiName is slightly misleading because the page talks more about ClientLibraryExamples.

All of these examples can be found in the download for the [WWW] MusicBrainz client library.

cdlookup.c

This application demonstrates the functions that must be called to determine the Audio CD submit address, which can then be shown in a standard web browser. Use the code in this sample to add CD Submit features to your Audio CD Player/Recorder application.

findalbum.c

This application demonstrates how to search MusicBrainz for a release given only the name of the release.

findartist.c

This application demonstrates how to search MusicBrainz for an artist given only the name of the artist.

findtrack.c

This application demonstrates how to search MusicBrainz for an artist given only the name of the track.

getartist.c

Use this application to retrieve information about an artist given the artist's unique ArtistID.

getalbum.c

Use this application to retrieve information about a release given the release's unique AlbumID or a DiscID. This sample application shows how to determine if a release is a SingleArtistRelease or a MultipleArtistsRelease, and how to read the information about each track in the release.

gettrack.c

Use this application to retrieve information about a track given the track's unique TrackID.

gettrm.c

This application shows how to retrieve the ArtistName, ReleaseTitle, and TrackTitle given a TRM and an AlbumID.

submittrm.c

Use this application to submit a [[TRM-ID]] to the MusicBrainz server. In order to use this application you need to have a MusicBrainz TrackID and a new [[TRM-ID]]. Also, the username and password of a valid MusicBrainz user is required to submit a TRM to MusicBrainz. While this application only allows one TRM at a time to be submitted, the query that is used to submit a TRM can be used to submit a batch of TRMs with one server query.

tagger.c

This application implements a pseudo mp3 file tagger. The appliction demonstrates how to use the FileLookupInterface by generating a TRM id and extracting ID3 information using the trm application and then passing this information on to the MusicBrainz server. Note that this application does not actually write the downloaded metadata back to the file or submit matched TRM Id, TrackID pairs to the server like the MusicBrainzTagger -- that is why it's a pseudo tagger. :-)

If you are interested in using MusicBrainz to tag music files, you should definitely read this code to see the best way to do this.


CategoryDevelopment

 
Creative Commons EFF GPL LGPL This material is Open Knowledge Valid XHTML 1.1 Valid CSS 2.0
Original Design|vacubomb.com Contact details Server version: RELEASE-20071014