The title of this project is Generation of Music Using Long Short-Term Memory Recurrent Neural networks. The goal of the project was to create a neural network model that when fed musical compositions as training data could provide a means of generating new notes these notes would then be structured into a new musical composition generated by our neural network.
It Contains the following features.
-
The machine learning model.
-
The training data for this model.
-
A means of programmatically preparing MIDI files to be usable by our machine learning model.
-
Training our neural network model on this training data.
-
predicting new notes using the trained neural network
-
compiling these generated notes into a musical composition.
-
A user friendly GUI to select parameters to manipulate this musical composition
-
A means of playing back the generated Composition and saving it to your machine.
For further details see the disertation within this repository.
The first step is to install the base annoconda python data science toolkit version 3.7 this can be found at https://www.anaconda.com/distribution/#download-section
Once installed you will need to create a python annoconda enviroment. this can be done with the following command ''' conda create --name myenv '''
The Next step is to install the libraries used by this program these can be installed using the command line arguments bellow from within your newly created annocona enivroment.
- Music21
pip install music21
- TensorFlow
pip install --upgrade tensorflow
- Keras
pip install numpy scipy
pip install scikit-learn
pip install pillow
pip install h5py
pip install keras
- pygame
pip install --upgrade pygame
Once you have installed the required dependacies navigate to within you clone of this repository navigate to the src folder. and run the comand bellow to execute the program.
python main.py
Once the program is running you will see a simple user interface with 4 comboboxes these give you the ability to select what key and tempo you wish the generated composition to be in. once selected press the generate button to generate a new composition. this takes roughly 30-45 seconds depending on the speed of your machine. you will then have the option to play this new composition or save it to your machine.