This approach of distributing possibility for possible outcome can also being used in music generation.
Markov can also learn the possibility from existing material. MIDI file can be transferred into JSON format, then can be processed and learn by Markov.