Query songs by BPM

Hi there!
I’m building an app for drum practicing, that would suggest songs by it’s BPM, using AcoucticBrainz data.

I tried to use AcousticBrainz database dump and it works great, but at this time it’s outdated. So the only way I see to build fresh bpm->song index right now is to iterate over all MusicBrainz songs, get low-level data from API and then store it in my own database. But I think this is a bad idea because it will produce a heavy load to AcousticBrainz servers and also would take a lot of time.

So, are there any more affordable ways to query songs by it’s BPM from AcousticBrainz? Maybe I missed something?

1 Like

hi,
for now you can access data for multiple recordings in a single query using our bulk get API: https://acousticbrainz.readthedocs.io/api.html#get--api-v1-low-level
For now, you may be able to query up to 200 items at once with this API. If that doesn’t work, please let us know so that we can try to fix it.
I added a ticket to add the ability to request just a specific piece of data: https://tickets.metabrainz.org/browse/AB-404, this is related to some discussion that we’ve already had about this kind of feature.

We don’t currently have any search functionality in acousticbrainz to do the opposite - look up recordings by a BPM query, although this is a pretty neat idea. Unfortunately we don’t have much development effort to be able to add features like this. I’ll add it to the list!

We’ve been slowly working on creating more updated dumps, but again, we’re short on developer resources. We’ll make sure to make a lot of noise when we finally make another one!

As a simple solution for you right now, here’s a link to an up-to-date dump that we made last month that also includes BPM: ftp://ftp.acousticbrainz.org/pub/acousticbrainz/2019-04-05-acousticbrainz-features-metadata.csv.bz2 - it’s about 1.8gb to download and uncompresses to about 4.6gb

5 Likes

Hi,
this dump is exactly what I need right now, thank you!

About querying up to 200 items - currently i’m getting an 502 Server Error, when trying to get ~48 or more items (example url: https://pastebin.com/5fnQMUVn).

Also, about search functionality - are you open for contributions to AcousticBrainz Webserver API?

1 Like

Thanks for the report about 48 items. That looks like the same issue that we hit with our count query: https://tickets.metabrainz.org/browse/AB-294?focusedCommentId=42623&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-42623
The number of MBIDs in the query parameter is about the same in that comment than what you reported.

We’re always interested in more developers in AcousticBrainz. Come and find us in IRC, or in Jira if you want to discuss some of our tickets. Specifically regarding search, we’ve got over 10 million recordings in the AB database, so finding something scalable is important. Most of our experience in MetaBrainz is with solr, if that’s something that you’re able to contribute to we’d appreciate it!

2 Likes

Ah !
Is this same format as the old jan 2015 dump ?

no, this is just a CSV file of a few selected features:

1 Like

3 posts were split to a new topic: Reasons for why there hasn’t been a full database dump in years