A Python-based AI application that generates music using an LSTM-based RNN model trained on music data. This project provides an end-to-end solution to compose music and play it as audio, leveraging the power of deep learning and Gradio for an interactive user experience.
- Music Generation: Uses a trained RNN model to generate music in ABC notation.
- Interactive Interface: Gradio-based interface for easy interaction.
- LSTM/GRU Support: Configurable choice of LSTM or GRU for music generation.
- Audio Conversion: Converts ABC notation into playable audio.
- Python 3.8 or later
- Required Python packages (install via
requirements.txt
):torch
gradio
numpy
abc2midi
- Clone this repository:
git clone https://github.com/nullHawk/music-generation cd music-generation
- Install dependencies:
pip install -r requirements.txt
- Place the trained model checkpoint at
checkpoint/model.pth
.
Launch the Gradio interface:
python app.py
- Open the Gradio interface in your browser.
- Click the "Generate Music" button to compose a new song.
- Listen to the generated audio directly within the interface.
- Click the Generate Music button.
- The app generates an ABC-notation music sequence using the RNN model.
- The ABC notation is converted to playable audio.
- Listen to the generated music in the interface.