Deep learning RNN project that creates a melody one note at a time with Mozart's help.
Visit the MiniMozart website here
Watch a presentation that introduces MiniMozart
See the website github repo to see more info about the website
Data created from MIDI files acquired from:
- the Classical Music MIDI dataset from Kaggle
- the Music 21 library's MIDI corpus
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
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.
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)
Go to https://github.com/sevans47/MiniMozart
to see the project, manage issues,
setup you ssh public key, ...
Create a python3 virtualenv and activate it:
sudo apt-get install virtualenv python-pip python-dev
deactivate; virtualenv -ppython3 ~/venv ; source ~/venv/bin/activate
Clone the project and install it:
git clone [email protected]:sevans47/MiniMozart.git
cd MiniMozart
pip install -r requirements.txt
make clean install test # install and test
git remote add origin [email protected]:sevans47/MiniMozart.git
git push -u origin master
git push -u origin --tags