Skip to content
 
 

Repository files navigation

MiniMozart 🎼✍️

An RNN deep learning powered tool for writing melodies with the help of Mozart.

Presentation

Watch us give a short presentation about our project on YouTube [38:55]

Streamlit App

Hear example melodies and write your own using the model api

Try it! -MiniMozart

Skills I used/learned

🎹 Cleaned, transformed, and augmented 52 pieces of messy music data to 20,000 9-note sequences of pitch and duration for dataset

🎵 Used Keras to train Recurrent Neural Network models with LSTM and Dropout layers, trained with Early Stopping

🎸 Quickly self taught specialised music packages and software using available documentation

🎶 Built Docker virtual machines with specified environments and installed software dependencies

🎻 Built a complex frontend website with Streamlit, using statefulness and API connections to run smoothly

🎺 Hosted the model API and Streamlit in a Docker virtual machine on Google Cloud Platform with custom settings

Data creation

Data created from MIDI files acquired from:

Preparing the data for the model:

  • melody extracted from the MIDI files
  • saved values for pitch and duration for each note in the melody
  • melody transposed to C major / A Minor
  • removed uncommon rhythms and tuplets
  • created 8-note-long sequences for X and the 9th note for y

Model building

We created a multi-output deep learning model using Tensor Flow. We used an LSTM for the first layer, before splitting into pitch and duration paths. Each path had an LSTM layer, a dense layer, and a softmax output layer with dropout layers in between each.

API

The API has two main functions:

  • initialize: return an opening 8 note sequence at random from one of Mozart's piano sonatas.
  • predict: using our model's predictions, suggest three notes (pitch / duration combinations) that are likely to come next in the sequence (according to Mozart)

Authors

About

Deep learning RNN project that creates a melody one note at a time with Mozart's help

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages