Git Product home page Git Product logo

euphonia's Introduction

Euphonia

This is a repository designed to facilitate using deep neural networks to predict the structure of and generate music.

Dependencies:

  • the latest versions of Keras (pip install git+https://github.com/fchollet/keras), and Theano.
  • MIDI file parsing code (pip install git+https://github.com/vishnubob/python-midi)

Setup:

Run music/music_crawler.py to download a lot of MIDI files from www.piano-midi.de to the music/ directory. Then you can train and run various models on music data.

Usage:

representations.py houses the MIDI music representation code. This code allows you to represent MIDI files in a variety of different "formats", which are 2D matrices. These matrices can be modified and saved back to MIDI files. For example, StateMatrix converts MIDI files to a 2D Numpy array format somewhat like this Youtube video (https://www.youtube.com/watch?v=xh3FMTff5nY). Examples of these representations are stored in the results/ folder. This data can then be used to train ML models.

generators.py houses general code for generating batches of "data" that is fed to a Keras model.

models.py houses abstract code for Keras models that learn from/train on data from a generator.

See pitch_guess_model.py and state_prediction_model.py for an example of how it all fits together! pitch_guess model tries to predict the pitch of the next note given the sequence of pitches of the previous 50 pitches, and it achieves a bit of success (an example generated piece is in the results folder), although it still sounds pretty terrible. state_prediction_model.py tries to ambitiously predict the entire state beat by beat, and fails miserably ;)

The most useful part of this code is probably representations.py, as it puts MIDI files in an ML-friendly format.

euphonia's People

Contributors

nikcheerla avatar

Stargazers

 avatar

Watchers

Akhil Palla avatar Mahesh Murag avatar  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.