All Projects → mcleavey → Musical Neural Net

mcleavey / Musical Neural Net

Train an LSTM to generate piano or violin/piano music.

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Musical Neural Net

Lstm Music Genre Classification
Music genre classification with LSTM Recurrent Neural Nets in Keras & PyTorch
Stars: ✭ 166 (-65.27%)
Mutual labels:  lstm, music
Stylenet
A cute multi-layer LSTM that can perform like a human 🎶
Stars: ✭ 187 (-60.88%)
Mutual labels:  lstm, music
Deepjazz
Deep learning driven jazz generation using Keras & Theano!
Stars: ✭ 2,766 (+478.66%)
Mutual labels:  lstm, music
Pylast
A Python interface to Last.fm and Libre.fm
Stars: ✭ 432 (-9.62%)
Mutual labels:  music
Skplayer
🎵 A simple & beautiful HTML5 music player
Stars: ✭ 437 (-8.58%)
Mutual labels:  music
Cryptocurrencyprediction
Predict Cryptocurrency Price with Deep Learning
Stars: ✭ 453 (-5.23%)
Mutual labels:  lstm
Fredboat
A Discord music bot sharing 1 million servers with 20 million users
Stars: ✭ 471 (-1.46%)
Mutual labels:  music
Chinese poem generator
唐诗、宋词生成器,有详细说明
Stars: ✭ 428 (-10.46%)
Mutual labels:  lstm
Musicapi
Centralized package to get data from qq, xiami, netease music
Stars: ✭ 463 (-3.14%)
Mutual labels:  music
Soundsync
Virtual cables between any audio source and any speaker in your home
Stars: ✭ 453 (-5.23%)
Mutual labels:  music
Romplayer
AudioKit Sample Player (ROM Player) - EXS24, Sound Font, Wave Player
Stars: ✭ 445 (-6.9%)
Mutual labels:  music
Audiomentations
A Python library for audio data augmentation. Inspired by albumentations. Useful for machine learning.
Stars: ✭ 439 (-8.16%)
Mutual labels:  music
Youka Desktop
The Best Karaoke Maker
Stars: ✭ 458 (-4.18%)
Mutual labels:  music
Tensorflow Lstm Regression
Sequence prediction using recurrent neural networks(LSTM) with TensorFlow
Stars: ✭ 433 (-9.41%)
Mutual labels:  lstm
Cnn lstm ctc ocr
Tensorflow-based CNN+LSTM trained with CTC-loss for OCR
Stars: ✭ 464 (-2.93%)
Mutual labels:  lstm
Jmc
jmc - a new macOS media organizer
Stars: ✭ 432 (-9.62%)
Mutual labels:  music
Pithos
A Pandora Radio Client
Stars: ✭ 461 (-3.56%)
Mutual labels:  music
Raveberry
A multi-user music server with a focus on participation
Stars: ✭ 442 (-7.53%)
Mutual labels:  music
Jukebox
Code for the paper "Jukebox: A Generative Model for Music"
Stars: ✭ 4,863 (+917.36%)
Mutual labels:  music
Pytorch Ntm
Neural Turing Machines (NTM) - PyTorch Implementation
Stars: ✭ 453 (-5.23%)
Mutual labels:  lstm

Clara: A Neural Net Music Generator

Take the AI vs Human Quiz.

Train an AWD-LSTM to generate piano or violin/piano music
Project overview is here.
Detailed paper is here.

Requirements:

Note: From inside the musical-neural-net home directory, run:
ln -s ./replace/this/with/your/path/to/fastai/library fastai 

to create a symbolic link to the fastai library. Alternately, this blog has a clear description of how to get an AWS machine up and running with FastAI already good to go.

You will also likely need to use sudo apt install to get fluidsynth, mpg321, and twolame.

Basic:

Run the Jupyter Notebook BasicIntro.ipynb or follow the individual instructions here. To create generations with a pretrained notewise model, using only the default settings, run:
python make_test_train.py --example
python generate.py -model notewise_generator -output notewise_generation_samples

The output samples will be in data/output/notewise_generation_samples, or open Playlist.ipynb to listen to the output samples. I recommend the free program MuseScore to translate the midi files into sheet music.

Note, you must first make sure the requirements (above) are installed.

Data:

If you use your own midi files, they should go in data/composers/midi/piano_solo or data/composers/midi/chamber (the project expects to see a folder of midi files for each composer, ie: data/composers/midi/piano_solo/bach/example_piece.mid).

Run:

python midi-to-encoding.py

to translate midi files to text files in the various notewise and chordwise options.

My dataset is available here (you can download any or all):
Put these in data/composers/notewise:

Put these in data/composers/chordwise: (Run tar -zxvf thisfilename.tar.gz to expand each one.)

Training and Generation:

  • make_test_train.py - create the training and testing datasets (adjust notewise/chordwise, optionally create only a small sample size)
  • train.py - train an AWD-LSTM (adjust model parameters, dropout, and training regime)
  • generate.py - generate new samples (adjust generation size)
Each script has default settings which should be reasonable, but use --help to see the different options and parameters which can be modified.

If you use the data files I've linked above, those are quite large, and will take a long time to train. If you are looking to experiment with different training networks, I'd highly recommend at first using --sample .1 (10% of the data) with make_test_train.py, so that you have a much smaller dataset to play with and can iterate faster.

Playlist.ipynb is a simple Jupyter Notebook which creates a nicely formatted playlist for listening to all the generations.

Music Critic:

  • make_critic_data.py - create the training and test datasests (requires a trained generation model to create the fake data)
  • critic.py - trains a classifier to predict if a sample is human-composed or LSTM-composed

Composer Classifier:

  • make_composer_data.py - create the training and test datasests (all from human composed pieces)
  • composer_classifier.py - trains a classifier to predict which human composed the piece

Pretrained Models:

Sample pretrained models are included in this repository. They were trained using the default settings (all composers, notewise using a sample frequency 12, chordwise using a sample frequency 4).
  • notewise_generator
  • chordwise_generator
  • chamber_generator (uses notewise encoding)
  • notewise_critic
  • notewise_composer_classifier

For example, use:

python generator.py -model notewise_generator -output notewise_generation_samples --random_freq 0.8 --trunc 3

to generate musical samples.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].