What it Does
Text-to-Music does exactly as the name suggests, converting raw text files to a randomized, generated MIDI file.
How We Built It
In its current state, the bot uses custom algorithms to sweep through text and clean up all unwanted tags and characters. With the remaining text, the string was broken into a character array and each unique character was assigned a random note to play. These notes are drawn from a randomized key signature to make the resulting MIDI a little more coherent.
The resulting character-note mapping is the converted into useful formatting to be read by MIDI files, and the new music file is generated! The resulting MIDIs are then imported to an external program that handles these filetypes, immediately exported as a new MIDI to handle issues with metadata tags. The exported file is then uploaded into IBM's Watson Beat, where it generates a large dump of generated music tracks based on our original file.
Tracks generated from Watson were then manually added to an external program and combined into one file to finally produce the music we set our to create.
Challenges We Ran Into
While figuring out how to constrain the resulting MIDI into just a randomized key signature required much more effort than anticipated, the greatest challenge we faced was with setting up the environment for Watson Beat to run. This had to be run specifically in a Linux environment and was sensitive to metadata tags that we were unable to identify. This current issue makes the issue of streamlining the entire process of this project into one callable method much more complex and out of the scope of this hackathon.
What's Next?
Making the project more streamlined from start to finish would be the next greatest task, and looking forwards beyond that we would like to add greater customizability to the mood and general feel of the resulting music from Watson.
Interesting Applications
While starting into the face of our file few test runs, we thought of an interesting application for our work. If you set a fixed seed for the random number generation, the resulting MIDI files generated from a series of text could hold encrypted information. Each character of the message is mapped to a randomized and unique frequency, and the process of converting into this format can be reverse engineered. That being said, placing the seed for randomization as the tempo of the MIDI file could result in an inconspicuous way to share a message with the desired recipient all while listening to some great tunes.
Built With
- bash
- ibm-watson
- jupyter-notebook

Log in or sign up for Devpost to join the conversation.