Generating Melodies With Markov Chains In Ruby
16-Jul-2020 1329
A Markov Chain is essentially a finite state machine that we can get to generate output based on probability from previous input. It’s probably one of simplest generative systems. It’s especially fun to use for things like generating sentences that sound semi-coherent from gigantic inputs like a Shakespeare play.Let’s get an array of notes from a MIDI file with midilib.
Generating Melodies With Markov Chains In Ruby #ruby #rubydeveloper #rubyonrails #Generating #Melodies #Markov #Chains https://rubyonrails.ba/link/generating-melodies-with-markov-chains-in-ruby