Skip to content

aditya02shah/MusicGeneration

Repository files navigation

Music Generation Model

This repository contains a music generation model that generates original music compositions using deep learning techniques and TensorFlow

Dataset

The music generation model is trained on the ABC notation dataset provided in the MIT Deep Learning Library(MDL).

The dataset contains 817 songs in text format. These songs will be used to train the model to generate new music.

Introduction

ABC files contain information about the notes, timing, and velocity of each sound, making them well-suited for music generation using deep learning techniques.

By training the model on a dataset of existing songs, the model can learn patterns and structures in music and generate new melodies, harmonies, and rhythms.

LSTM model can generate music that is both pleasing to the ear and follows a coherent musical structure.

Model Architecture

The model architecture is based on a recurrent neural network (RNN) with LSTM cells. The LSTM cells allow the model to capture long-term dependencies and generate coherent and melodic musical sequences.

Generation

To generate new music using the trained model, run the generate.py script.
Specify the desired length of the generated sequence and the output file path. The script will utilize the trained model to create an original composition.

Results

Some sample compositions generated by the model have been included in the results directory.

Dockerization

To utilize the Dockerized project,

  1. Install Docker on your system,if not already installed.

  2. Clone or download this repository to your local machine.

  3. Open a terminal and navigate to the project directory.

  4. Build the Docker image using the provided Dockerfile:
    docker build -t music-generation-app

  5. Once the image is built, you can create and run a Docker container from it:
    docker run -d -p 8080:80 music-generation-app

  6. .Access the music generation application by opening your web browser and visiting http:https://localhost:8080.

You can also pull a pre-built Docker image directly from Docker Hub: Music-Generation-Model

Deployment

The model has also been deployed on Railway.

To generate music in textual format,you can use the following command: https://musicgeneration-production.up.railway.app/api/generatetext?start_string={}.

Feel free to replace the start_string parameter with your desired input.

Example:
https://musicgeneration-production.up.railway.app/api/generatetext?start_string=a

About

Generates Musical Compositions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages