Markov Chain Melody Generator
Project information
- Dates: Spring 2021
- Skillset: Java
Github repo
Having taken a music class and discrete maths/probability class, I wanted to combine what I had learned
and implement a program that scans an inputted MIDI melody, generates a Markov model, and
composes a melody based on the Markov model. Using Java and Midi, I was able to successfully create a
program that would generate a melody based on an inputted melody.
I was able to write a paper about the results of the Markov Model,
asking people to guess if a melody was written by the program depending on the order of the markov
model (ie. 3rd order versus 5th order markov chain). While not always successful, I found that a
a 5th order markov chain was able to generate a melody that was able to fool some participants into
thinking that it was written by a person.