https://github.com/robsdedude/melody-composer
Using higher Order Markov Modells and Clustering to compose melodies similar to a training data set
https://github.com/robsdedude/melody-composer
ai artificial-intelligence clustering compose-melodies computational-creativity content-generation
Last synced: 15 days ago
JSON representation
Using higher Order Markov Modells and Clustering to compose melodies similar to a training data set
- Host: GitHub
- URL: https://github.com/robsdedude/melody-composer
- Owner: robsdedude
- License: other
- Created: 2016-10-21T15:13:04.000Z (over 8 years ago)
- Default Branch: public
- Last Pushed: 2017-05-17T16:26:36.000Z (about 8 years ago)
- Last Synced: 2025-05-07T19:09:09.752Z (15 days ago)
- Topics: ai, artificial-intelligence, clustering, compose-melodies, computational-creativity, content-generation
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
This program is part of my bachelor thesis which can be found on
[arXiv](https://arxiv.org/pdf/1612.09212.pdf). It's a machine learning algorithm
that generates monophonic melodies similar to those of a phrase annotated
data-set. In- and output are midi files (i.e. machine readable music).Setup
=====
Use virtualenv
--------------virtualenv venv
source venv/bin/activate
export LC_ALL=C
pip install -r requirements.txtTroubleshooting
---------------
On Ubuntu based systems it can happen, that there are header files missing. Do:
`sudo apt-get install liblapack-dev libblas-dev`
It can also happen, that you need to install a fortran compiler. Do:
`sudo install gfortran`
After fixing these things re-run `pip install -r requirements.txt` each time.Trainings Data
-------------
Download the [MTC-FS data set](http://www.liederenbank.nl/mtc/collections.php)
and unzip it into the folder `MTC-FS-1.0`Then run the preporcessing
mkdir -p MTC-FS-1.0/good_midi # create folder to put pre-processed midi files in
source venv/bin/activate # activate virtualenv
python preprocess.py # run preprocessing
deactivate # deactivate virtualenvRun the program
===============
Start the virtual environment with
`source venv/bin/activate`
To general start the program go to this directory and run
`python main.py`
More information: `python2 main.py --help`Other things
============
To see how the clustering is working have a look at main() in contour.py