EM411.com is a community for electronic music producers, modular fanatics and fans of synths, drum machines, software and more. Combine your social networks in one place for painless cross-posting and more followers.
Join us
Programming
I made this little Markov chain MIDI file generator using Clojure a couple years ago. It's pretty rudimentary, but it was a fun little project to work on: Github

I've been wanting to revive this project and possibly explore generating musical data with neural nets or even some kind of genetic algorithms.

Does anyone else have any experience with this stuff?

software programming diy
1 2 280 November 2016

Comments

bogdan avatar
Nice. I'm often intrigued by the thought of programmatically-generated audio but never actually do it. Do you have any samples online of what this sounds like?
dylan avatar
I posted a small piece generated from Bach's Goldberg variations to my SoundCloud account a while back but have since removed it to make way for other tracks (I'm too cheap to buy a paid account, ha). Since it's on Github you're of course free to clone it and run some MIDI files through it, though if you do end up using it I apologize in advance for the horrendous GUI.

In general, I found that a 2nd-order Markov Chain performs reasonably well when the input has a well-defined melodic and harmonic structure and a sufficiently large corpus of musical data to draw upon. For music that is more improvisational in nature (e.g. Liszt fantasies), the results are not all that useful, but still occasionally interesting. Using a third or fourth order Markov Chain might yield better results since the current state transition (pitch) now depends on the previous three or four states.

The other thing I couldn't really get "right" was altering the rhythmic component. I think that was probably a combination of poorly implemented MIDI note on/off event timing but it could also be that Markov processes aren't well suited for the particular corpus of data I was working with.

Sign up or log in to comment