KentuckyFC writes: The recent development of vast databases that link words to the emotions they conjure up is changing the way researchers study text. Sentiment analysis, for example, is increasingly used to gauge the mood of society on topics ranging from politics to movies. Now researchers have used the same technique to measure the "emotional temperature" throughout a novel and then to automatically compose music that reflects the content. The key advance in this work is the development of rules that map the emotional changes into musical qualities such as tempo, key pitch and so on. The team has fed a number of well known books through the algorithm, which they call TransProse. These include lighter texts such as Peter Pan and much darker novels such as The Road and Heart of Darkness. And the music isn't bad (to my untrained ear). The teams say the new algorithm could lead to audio-visual e-books that generate music that reflects the mood on open pages. And it may even be possible to use the algorithm in reverse to recommend known songs that reflect the mood in a book.