This project uses Long Short-Term Memory (LSTM) neural networks to generate music. The project consists of several key scripts for preprocessing music data, training the LSTM model, and generating new music.
preprocess.py: Contains functions and methods for preprocessing the music data.train.py: Contains the code for training the LSTM model.melodygenerator.py: Contains the code for generating new music based on the trained model.
- Python 3.x
- TensorFlow
- NumPy
- Music21
You can install the required packages using:
pip install tensorflow numpy music21To preprocess your music data, run:
python preprocess.pyThis script will convert your raw music files into a format suitable for training the LSTM model.
To train the LSTM model, run:
python train.pyThis will train the model on the preprocessed music data. Make sure you have enough computational resources as training deep learning models can be resource-intensive.
To generate new music, run:
python melodygenerator.pyThis script will use the trained LSTM model to generate new music based on a seed sequence.
Generated Melody after feeding seed

You can add your seed music data in the melodygenerator.py script. The seed music is used as the initial input to the LSTM model for generating new music.
If you'd like to contribute to this project, please fork the repository and submit a pull request. We welcome contributions in the form of bug fixes, feature additions, and improvements to existing code.
This project is licensed under the MIT License. See the LICENSE file for details.