TransProse Turns Literature Into Music
Rich Hua stashed this in Just Plain Cool
The program determines moods:
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.
TransProse website: http://musicfromtext.com/