Skip to content

InanisV/Generate-music-from-MIDI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

Project Composer

Composer is a music generation application hosted on an iOS mobile device. The purpose of the app is to generate music from a provided input and generate harmonization for a given melody.

The Idea

The aim of the project is to take the input of any music source and create something completely new. For example, Composer could sample an eight-second Musical Instrument Digital Interface (MIDI) file clip and come up with the rest, forming a new song right away. This new song would consist of harmonies that accompany the music piece as well.

Generation Workflow Design

Screenshot 2021-04-20 at 12 31 22 AM

Server Workflow Design

Screenshot 2021-04-20 at 12 31 31 AM

iOS Mobile Workflow Design

Screenshot 2021-04-20 at 12 31 41 AM

Deploying the backend on AWS

User should already have an account on AWS console, and have already created an AWS EC2 instance with the Deep Learning AMI (which has the necessary PyTorch libraries etc).

app.py, credentials.py should be in the same directory as the other python training scripts (e.g. lstm_train.py)

Dependencies required: gunicorn3, Flask

  1. Start the EC2 instance from AWS console.

  2. SSH into EC2 instance through Ubuntu (for example). More details can be found on the AWS website.

  3. Update nginx configuration by first entering cd /etc/nginx/sites-enabled then copy the flaskapp file to the current working directory. Update server_name variable to the public IPv4 DNS of the EC2 instance (can be found on AWS console). Enter sudo service nginx restart in the shell after updating server_name variable.

  4. cd to application folder (where app.py is located)

  5. Activate pytorch_p36 environment on the remote server by running source activate pytorch_p36

  6. Update app.py and credentials.py with personal AWS services information.

  7. Run the application with sudo gunicorn3 app:app. Can execute with set timeout option using -t 120 if necessary.

Future Plans (V2.0)

iOS Mobile App

Expand song corpus

Add Piano Feature

Build server-based backend

Port model training to cloud

LSTM model Design

Improve sound quality

About

Use LSTM to generate music from MIDI file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published