Aluriak / MusicGenerator

Generation of music with the help of Matlab, Markov and Python
GNU General Public License v2.0
3 stars 1 forks source link

Music Generator

Study corpus of music to find Markov chains and finally generate not-totally-random music.

output/ dir contains some output examples.

Transcription matlab package

Objectives : get states of a music, in readable format. Input : paths to wav files
Output : a file where states are described as a TSV that maps time and notes.

Generator python package

Objectives : generate music with the help of markov model.
Input : file containing TSV that maps time and notes.
Output : play music automatically generated.
Alternative output : write midi file

This is pure Python. To play sound, stdlib is used if pygame is not found. You really should use the midi output. Not tested on windows, but should work.

See Makefile for CLI example, or use python -m generator --help for doc.

See requirements.txt for non-optional packages, and optional_requirements.txt for the optional ones.

TSV-that-maps-time-and-notes format

Example:

100 45
393 78

First is the number of milliseconds before the next note, second is the midi code that is played.