libmusicbrainz5 OMG no Tutorial

Hi again 🙂

For a couple of days, I’ve been experimenting with libmusicbrainz5. Actually, I have to do a project related to it. But I did realize that there is no good documentation/tutorial for libmusicbrainz5. No good documentation, very few examples and that’s it. But yes, one thing I can say is its API Reference and the way functions/methods/classes etc. have been defined is good and impressive.

Although, libmusicbrainz5 is written originally in C++ but my project requires me to do it in C. Hence, I will be using libmusicbrainz5 C API.
Hence, I decided to write a good tutorial for libmusicbrainz5. Whatever, I will be writing is the information I gained from my experiments with libmusicbrainz5 and the examples given.
This post and also, the subsequent ones will give an idea to the poor 😛 programmers who have to work in libmusicbrainz5 but can’t get any good documentation or tutorial related to this great API.

Lets start with the first one.
Here is the API Reference for libmusicbrainz5 C API.
What you can see is different structs defined. Some of these are:
Mb5_Entity, Mb5_Artist, Mb5_Release, Mb5_ReleaseGroup, Mb5_Metadata, Mb5_Query and many others.
Moreover, there are also lists like:

Mb5_ArtistList, Mb5_ReleaseList, Mb5_ReleaseGroupList and many others.
Here Mb5 stands for MusicBrainz5. Also Mb5_Entity is the base for most of the other structs. Mb5_Artist, Mb5_Release, Mb5_ReleaseGroup all are derived from Mb5_Entity.
To know the meaning of Artist, Release, ReleaseGroup etc. refer to With libmusicbrainz5 you can request an Mb5_Entity and can get different Mb5_Entity related to the former. For example, for an Artist (say, Westlife) you can get its/theirs Releases,Release Groups, Recordings etc. What MusicBrainz has, is a database(a huge database, rather) of Songs and their related info. To access information related to any Entity, MusicBrainz provides a web interface to search in its database. So, MusicBrainz allows a query search syntax. Make a web query and get the result. MusicBrainz returns result in the form of an XML file, containing all the information requested by the user. MusicBrainz query searching interface is very good and impressive.
As written in
MusicBrainz has 6 core resources
We will be limiting our discussion to these resources.
I would advice you to go through the above URL, to make yourself comfortable with GET requests and main thing query.
One web page is:
Thats it for today. In next tutorial we will see, how to search for different Mb5_Entity using libmusicbrainz5 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s