Republican presidential nominee Donald Trump and Democratic presidential nominee Hillary Clinton speak during the second presidential debate on Oct. 9. (AP Photo/John Locher)

What the millions who tuned in for the three presidential debates between Donald Trump and Hillary Clinton heard from the candidates may not have been music to their ears. But Hannah Davis finds music where others wouldn’t think to listen.

The computer programmer developed software several years ago that turns bodies of text into musical compositions based on their mood and emotion. She’s used it to make music out of novels that range from “Alice in Wonderland” to “A Clockwork Orange” to “The Adventures of Sherlock Holmes.”

Now, Davis has trained the software, called TransProse, on the presidential debates — and found the contrast between Trump and Clinton transcends their politics. Because each candidate called upon distinctly different emotions during their debate performances, the resulting scores have divergent octaves, keys and tempos.

“The first debate was so hard to watch, and I thought it would be kind of interesting to see if I could hear the emotional undertones without having to listen to Trump interject and be abrasive,” said Davis, who plans to support Clinton on Nov. 8.

Before the choir cries partisanship, Davis said the analysis is done entirely by computer using word association databases, called the Word-Emotion Association Lexicon and the Activity Lexicon, from the National Research Council of Canada. Her software, as it was designed, does not have political leanings.

Listen to the audio for yourself and guess the candidate that matches each song.

 

1

Whose words were used to generate this tune?

Hillary Clinton

Donald Trump

2

Whose words were used to generate this tune?

Hillary Clinton

Donald Trump

3

Whose words were used to generate this tune?

Donald Trump

Hillary Clinton

4

Whose words were used to generate this tune?

Donald Trump

Hillary Clinton

5

Whose words were used to generate this tune?

Hillary Clinton

Donald Trump

6

Whose words were used to generate this tune?

Hillary Clinton

Donald Trump

Your score: 0 / 6

Trump consistently called upon trust, anticipation, anger and fear during the three debates, the software discerned. In fact, anger featured more prominently with each passing debate. As a result, the software generated music for Trump at a lower octave and in a minor key compared with Clinton, Davis said. Trump also used fewer “active” words, causing the tempo to slow.

Trust, anticipation and fear were also detected in Clinton’s speech, but she conjured another emotion that Trump did not: joy. Her relatively more “positive” tone translated into music at a higher octave and in a major key, Davis said. Because Clinton used more “active” words than Trump, the tempo of her music is also faster.

“I was surprised at how different they sounded. Usually when you get similar content you get similar songs out of them,” Davis said. “They were on the opposite ends of the scale.”

Read more from The Washington Post’s Innovations section and follow reporter Steven Overly on Twitter

This symphony had both human and computer composers

Voting for Hillary Clinton or Donald Trump? Your tweets may give away the answer

 The airplane is preparing to land. Please remove your virtual reality headset.