I’m trying to use AcousticBrainz and MusicBrainz to do a machine learning university project. My intention is to loop through playlists, retrieve the mbid of each track from MusicBrainz and then use it to fetch the data I need from AcousticBrainz.
My problem is that there are multiple mbid for the same track(I used the Black crowes example for testing) and only one of those mbids maps to the data in acousticbrainz. Am I doing something incorrectly? Thank you for any help
When entities in MusicBrainz’ database are merged, all MBIDs are retained so old metadata in files will continue to point to the relevant MusicBrainz entity. So that you are seeing multiple MBIDs on one track (though I think you are talking about the recording, not the track) is perfectly normal.
See for more information the documentation about MBIDs and merging.
Do a lookup of either id in the musicbrainz database.
The results will contain the new id as one of the fields in the output.
It does not matter if you picked the old or new id both will contain the new id in the results.
Others have pointed out how MBIDs can merge together, but I’m wondering: what do you mean by “the same track”? Is that “same track name by the same artist” (ie., a recording)? Or is it the “same track on the same release”? If you’re not using precise (MusicBrainz) terminology, it can be hard to be sure we correctly understand your issue.
If you mean the first case, there may be multiple Recordings of the same name by the same Artist that may or may not be candidates for merging. However, unless/until an editor looks over those Recordings and sees if there’s evidence enough to merge them, they’re going to stay as separate entities.
Also keep in mind that AcousticBrainz only covers a subset of all Recordings known to MusicBrainz. (As I’m writing this, AB reports 3,995,817 unique recordings while MB has 20,258,129 ones. And AB will have a number of duplicates as well, as recordings having been merged in MB isn’t reflected in AB yet (I didn’t find a separate ticket for this, but AB-115 touches on it).)
You still didn’t detail your concept of “sameness”, but most probably, yes. At least until MBS-3946 gets implemented, which you could then use to “group” Recording MBIDs:
Oh, and I kind of noted this before too, but AcousticBrainz has a number of duplicate Recording MBIDs that hasn’t gotten merged into their canonical MBID on the AB side. This may also result in some Recordings not getting a hit on the AB side of the merge target’s MBID didn’t have any submissions for it, so MBS-3946 could also be useful to check whether “old” AB submissions might be relevant.