GithubHelp home page GithubHelp logo

music-classification-acousticbrainz's Introduction

Music Classification with AcousticBrainz

This is a exploration task of genres and subgenres by music descriptors. After taking care of some aspects about the data, one of the four datasets is selected to perform this analysis.

Project notes

1. Taking the four genre datasets and computing the intersection of all of them, based on the recording ID. Music features are used for this intersection.¶

First I have defined some structures and dictionaries to keep all the data well indexed and accessible. Then there are two functions: “load_datasets” which loads all the datasets defined in the “datasets” dictionary, In the first run it only loads the id’s because first we only need to compute the intersection so there is no need to load all the data.

2. Selecting one dataset to use out of the four (AllMusic, Discogs, Last.fm, or Tagtraum, we will be using Tagtraum in this case). Preparing the corresponding subset of the genre and subgenre annotations and the features.

Once we have the intersected id’s, I have chosen “Tagtraum” and now we load all the dataset properties, no only the id’s, calling the funcion “load_dataset_recordings”. Now all the recordings are stored into the dictionary so we can easily access them through the dictionary with “datasets[“tagtraum”] [“recordings”]”. In that step, we only keep the id’s that have been present in the intersection in the previous step.

Afterwards, we load the dataset with selected features and do an embedding to have all the information in the “datasets[“tagtraum”] [“recordings”]” dictionary.

3. Selecting a set of 20 subgenres to work with.

In this section first I thought about take the most important subgenres, but then I realized that the majority of them will be related with rock so I chose some subgenres of my own interest manually in order to have some diversity in the analysis and the ending results. In that step, we only keep the recordings that belongs to any of the selected subgenres. I've tried to select a few subgenres per genre to cover different types of music in the analysis.

4. Comparing the selected subgenres in terms of the distribution of their music features.

Here I have just tried to display a comparative table with the average of all the features for all the genres. I also have a comparative graph that show better this subgenre-feature relationship.

thumbnail

5. Making comparative plots of the distributions of the feature values for each subgenre.

In this secton we have box plots, not computed with the average like in the previous graph, but with all the feature values of all the recordings for every sub genre. I won’t show here all the plots, as they are many and this will get unnecessarily long, but I will post one about the bpm across all the subgenres that I’ve particularly liked.

6. Making comparative plots analyzing high-level (classifier based) music features.

Here the same, the code and the “Output Plots” folder are plenty of plots. There are plots showing the correlations of music mood estimations (happy, sad, relaxed, aggressive, party) to subgenres and others showing the correlations of vocal/instrumental, male/female voice, danceability classifier estimations to subgenres. The high level features sometimes nail the emotions, but sometimes not, here is one that I think it’s quite decent about danceability, here the numbers are very tiny, please see them all in the folders.

Setup and run

Please follow the instructions below to set up the required software in your computer and be able to run the notebooks.

1) Install Docker

It is recommended to read the documentation about Docker and docker-compose.

Windows

https://docs.docker.com/docker-for-windows/install/

Mac

https://docs.docker.com/docker-for-mac/install/

Ubuntu

https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-docker-ce

2) Install docker-compose

Follow instructions. Depending on your operartive system, this step won't be necessary because docker-compose will already have been installed in step 1).

3) Run the notebooks

Run the following command to startup the notebooks server:

docker-compose up

Then access http://localhost:8888 on your browser and when asked for a password use mir.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.