A community for electronic music production, modular synthesis, sdiy and more. Log inSign up with Discord, Facebook, Google, Twitter
dylan avatar

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 433 Nov 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?

Nov 2016
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.

Nov 2016
What do you think? Sign up with Discord, Facebook, Google, Twitter to leave a comment.