Giter Site home page Giter Site logo

bdshrk / neuraldrummer Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 10.01 MB

A neural network for generating drum tracks for songs using Python and TensorFlow.

License: MIT License

Python 86.16% Jupyter Notebook 13.84%
computational-creativity creativity deep-learning drum-machine drumkit drums machine-learning neural-network python tensorflow

neuraldrummer's Introduction

NeuralDrummer

A neural network for generating drum tracks for songs.

Practical project for the COMP6590: Computational Creativity module.

Usage

The code can be run from the Jupyter notebook file main.ipynb.

You will need TensorFlow installed in your Python environment and also PrettyMIDI, Mido, numpy, and matplotlib. Please use requirements.txt or the following command:

pip install pretty_midi mido numpy tensorflow matplotlib

Each cell in the notebook should be executed consecutively with the exception of the nn.train() and nn.plot() cells (which are for training the network if you wish.) The model saves its weights to the /saved/ directory and can be loaded in the cell nn.load().

Feel free to modify the INPUT_PATH in the final cell to point to a MIDI file of your choosing. You can also modify the cut-off parameter of the tokeniser.add_drum_track() within the same cell to adjust the sensitivity of the result. You should find the output as a file named combined.mid.

In order for the model to learn, you will require a collection of MIDI files containing drum tracks. During development, I used the "Lakh MIDI Dataset Clean", available here. Once the MIDI files have been pre-processed, the original files are no longer needed. The result of the pre-processing is stored in a file named saved.txt.

Note: You will need a fair amount of memory to load the neural network and the inputs from the saved file.

neuraldrummer's People

Stargazers

 avatar

Watchers

 avatar  avatar

neuraldrummer's Issues

[REQ] add a (GH-compliant) license file

Hi there, 1st of all thanks for your awesome work !

Since we've "doxed" it in our HyMPS project (under the AUDIO \ AI-based projects page \ Drums subsection), can you please add a "GH-compliant" license file ?

Expliciting licensing terms is extremely important to let other devs (and not only) understand how to reuse/adapt/modify your code in other open projects and vice-versa.

Although it may sounds like a minor aspect, license file omission obviously causes an inconsistent generation of the relative badge too:


(generative URL: https://flat.badgen.net/github/license/bdshrk/neuraldrummer/?label=LICENSE)

Anyway you can easily choose a "correct" one through the GH's license wizard tool.

Last but not least, let us know how - in your opinion - we could improve categorization/sorting of collected projects in order to push their evolution by favouring collaborations between developers (and not only).

Thanks in advance.

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.