Git Product home page Git Product logo

emb96's Introduction

EMB96: Endless Music Box 96

EMB96 is an AI (Artificial Intelligence) trained to generate midi.

Sound Representation

Each midi file is represented as a 16 piano-roll composed of 96 notes and 96 values. Why 96:

  • 8 octaves
  • devides almost every scale

Model

The model is a simple VAE (variationnal Auto Encoder) trained to reconstruct a dataset of midi files. The networks tries to encode the data into a 128 vector $z$ (variable from latent space) and then decodes this vector to reconstruct the original data. It has been trained using a mixture of the KLD (kl divergence) fot the sparsity of the latent space and the binary cross entropy loss for the reconstruction part.

How to use it

Build dataset

First of all you need midi files. You can use your own files or you could choose to use the same dataset we used as an example.

First, place you data into a single directory. To donwload the example dataset:

cd src
python3 main.py --dataset_dir <dataset dir path> --donwload

Then you need to convert these midi files as images to feed the network:

cd src
python3 main.py --dataset_dir <dataset dir path> --build_dir <build dir path> --build

Train model

Accessible for non gpu users, you just have to use the option --cpu

You can train the model just by calling the following command:

cd src
python3 main.py --build_dir <build dir path> --train

If you want to change the training parameters you can. You can access the hole list of parameters using the following:

cd src
python3 main.py --help

Test the model

Accessible for non gpu users, you just have to use the option --cpu

If you want to try the model:

cd src
python3 main.py --checkpoint <checkpoint path> --n_examples <number of generated midi files> --output_dir <output directory> --test

emb96's People

Contributors

yliess86 avatar

Stargazers

DDH avatar

Watchers

James Cloos avatar DUHART Clément 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.