Music from Text

There are a lot of games that have music-like vocalizations from characters in place of speech. I am exploring what could be possible using the MIDI system plus a handy script I found to create a Typewriter effect in the UI. In the end I had to write my own code to make it play nice with the MIDI library but the link above would work for most typical situations I think.

How it works?

As the typewriter is typing out the text, each time it starts a new word, it picks a random note from a provided range to start a chord from. Then it increases using a 4, 3, 5 semi-tone pattern to create the major chord, repeating this pattern if there are more than 3 letters in the word. When it finds a space, it picks a new random starting note.

What’s Next?

I would like to experiment with different instruments as well as different expressions such as volume and pitch bending to create emphasis and inflection in the generated vocalizations.

Leave a Reply

Your email address will not be published. Required fields are marked *