Code Monkey home page Code Monkey logo

musicalfeaturesprediction's Introduction

Musical Features Prediction Using Machine Learning Algorithms

Kiana Montazeri1, Farnaz Ghashami1, Shideh Shams Amiri1.

1Drexel University, Philadelphia, PA

Free Music Archive is a website which provides us with very diverse and thorough range of information regarding audio music files across all genres and types. This data is pre-processed by Michaël Defferrard et al. to a metadata file which contains four datasets with information about:

  • The index is the ID of the song, taken from the website, used as the name of the audio file.

  • Per-track, per-album and per-artist metadata from the Free Music Archive website.

These datasets can be used to evaluate many tasks such as prediction of musical features such as mood or instruments used in the song, etc. These datasets are pre-processed by the same group that was previously mentioned. We are converting the data to a suitable format for our purpose. We use visualization tools to explore the datasets and in the end we will build an analytical model for the musical files using machine learning algorithm.

Analyzing audio is of interest to not only musicians, but people who want to study relations with higher-level representations in musical pieces. We are planning to use these datasets:

More information on the datasets is available:

at https://github.com/mdeff/fma.

Data

All metadata and features for all tracks are distributed in [fma_metadata.zip] (342 MiB). The below tables can be used with pandas or any other data analysis tool.

  • tracks.csv: per track metadata such as ID, title, artist, genres, tags and play counts, for all 106,574 tracks.
  • genres.csv: all 163 genre IDs with their name and parent (used to infer the genre hierarchy and top-level genres).
  • features.csv: common features extracted with librosa.
  • echonest.csv: audio features provided by Echonest for a subset of 13,129 tracks.

Code

The following notebooks and scripts, stored in this repository, have been developed for this project.

  1. Music: The main code and general information can be found here. The map of the notebooks is described in this file as well.

Genre Prediction:

  1. ArtistsInput: Develops a model for predicting the top genre based on track information provided in tracks.csv.
  2. GenrePrediction: Develops two models for predicting the top genre based on audio features provided in features.csv and applies the model to couple of randomly selected songs of our choosing to predict the closest genre.
  3. RNN_Classification: Develops a model using Recurrent Neural Networks by feastures provided in tracks.csv and echonest.csv.

Artist's Popularity Prediction:

  1. ArtistPopularity: Develops a linear regression model for predicting artist's general popularity based on audio and social features of the track.

Implementing Genre Prediction

Genre prediction model can be used on any .mp3 formatted audio file. In order to apply the model to the audio file, please run Application notebook with the correct file path. (The error faced is due to using the code for only one song at a time and can be ignored.) After execution of this code, a .csv data file will be produced in data directory and can be used for applying the model.

Requirements

In order to use the notebooks of this project, you will need the following:

matplotlib seaborn scikit-learn requests pydot tqdm
python-dotenv yellowbrick pytorch pandas librosa numpy

For more information please email: [email protected]

musicalfeaturesprediction's People

Contributors

kianamon avatar

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.