A great novel has an ambience unto itself -- but what if you could translate that ambience into a different medium? Music, for example?
That's the idea behind TransProse, a project that examines works of literature and transposes them into music. It's the work of New York-based programmer, artist and musician Hannah Davis, and Saif Mohammed, a research officer at the National Research Council Canada (NRC) whose interest lies in natural language processing.
The project doesn't translate the works directly into music. Instead, it determines the mood of the piece. To do this, it uses the NRC word-emotion association lexicon, a list of 14,000 words associated with eight basic emotions, anger, fear, anticipation, trust, surprise, sadness, joy and disgust; and two sentiments, positive and negative.
"Often different emotions are expressed through different words," Mohammed explained in his research paper on compiling the lexicon. "For example, delightful and yummy indicate the emotion of joy, gloomy and cry are indicative of sadness, shout and boiling are indicative of anger, and so on."
When a novel is fed into TransProse, the program reads the text, searching for these words. It breaks the novel down into four chronological parts (beginning, early middle, late middle and end), and uses the most common emotional words to determine the overall emotional tone of the book; for example, Joseph Conrad's Heart of Darkness has a primary emotion of fear and a secondary emotion of sadness, while Antoine de Saint-Exupéry's The Little Prince is rooted in trust and joy respectively.
The tone and density of emotional words in a text is then used to determine how the musical piece is strung together: tempo, key, notes, octaves and so forth. Positive books are played in a major key, for example, while negative ones are in minor. Happy books are higher in octave, while sad books are deep and rumbling; and a larger number of emotional words means a larger number of notes.
"The current version of TransProse is just the beginning of our investigation, and we don't claim to be making beautiful music yet," the TransProse website reads. "This iteration is a starting point to see if we could programmatically translate the basic emotions of a novel into a musical piece that holds the same basic emotional feeling."
Based on what they have so far, we think the project is pretty successful. Have a listen to some examples below; check out the TransProse website. You can also read more about the technical details of the project in the paper, available to download from arXiv.