Skip to content

Use TensorFlow to Generate Music with a Restricted Boltzmann Machine.

License

Notifications You must be signed in to change notification settings

crypto-code/RBM-Music-Composer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RNN Music Composer

Use TensorFlow to Generate Music with a Restricted Boltzmann Machine.

Restricted Boltzman Machine

A Restricted Boltzmann Machine (RBM) is a generative stochastic Neural Network that can learn a probability distribution over its set of inputs. This setup can be used to predict the next note in a sequence given the previous note.

For more info go here

Dependencies

  • Tensorflow
  • pandas
  • numpy
  • msgpack-python
  • glob2
  • tqdm
  • python-midi

Basic Usage

To train the model and create music, simply clone this directory and run

python gen_music.py

The run usually takes 5 minutes in a modern PC.

Changeable Parameters

  • To change input midi files, modify line 28:
songs = get_songs('elvis')  #Change this to your folder name
  • To change song length generated, modify line 39:
num_timesteps = 150  # number of timesteps that we will create, (change this to change the time of music generated)
  • To change number of epochs, modify line 43:
num_epochs = 1000  # The number of training epochs that we are going to run.
  • To change save location, modify line 135:
midi_manipulation.noteStateMatrixToMidi(S, "out/generated_chord_{}".format(i))

G00D LUCK

For doubts email me at: atinsaki@gmail.com

About

Use TensorFlow to Generate Music with a Restricted Boltzmann Machine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages