项目作者: crypto-code

项目描述 :
Use TensorFlow to Generate Music with a Restricted Boltzmann Machine.
高级语言: Python
项目地址: git://github.com/crypto-code/RNN-Music-Composer.git
创建时间: 2019-11-02T08:27:56Z
项目社区:https://github.com/crypto-code/RNN-Music-Composer

开源协议:MIT License

下载


RBM 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

  1. python gen_music.py

The run usually takes 5 minutes in a modern PC.

Changeable Parameters

  • To change input midi files, modify line 28:

    1. songs = get_songs('elvis') #Change this to your folder name
  • To change song length generated, modify line 39:

    1. 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:

    1. num_epochs = 1000 # The number of training epochs that we are going to run.
  • To change save location, modify line 135:

    1. midi_manipulation.noteStateMatrixToMidi(S, "out/generated_chord_{}".format(i))

G00D LUCK

For doubts email me at:
atinsaki@gmail.com