-
Notifications
You must be signed in to change notification settings - Fork 1
Markov
Markov Chains are by far the easiest way to allow for machine learning in music generation
algorithms. In the learning directory, you can find the database that has been used for the
default machine learning and a bash script midi2xml.sh that will turn any MIDI file into
a MusicXML file, as long as MuseScore is installed.
Because of the massive overhead of all these files, only the compressed version of the database can be found in this repository.
The database contains over 6000 files and was created from the LOP database.
To generate the trained chains, you must execute autoplayer with the -m or --markov
flag.
autoplayer -m ./learning/musicxml pitch.csv rhythm.csv chord.csv
In the above command, you can see that this flag takes four arguments:
- Directory to train on
- Markov chain filename for the pitches
- Markov chain filename for the rhythms
- Markov chain filename for the chord note counts
All three chains are generated at the same time, making sure you don't have to learn three times, but only once.
If the files for the chains already exist, it is impossible to append the new data, since we can have a matrix with a different size. (Could be solved in an expansion by reading the other matrix and merging them). If they don't exist, new files are generated.