Music, more than any art, is a beautiful mix of science and emotion. It follows a set of patterns almost mathematically to extract feelings from its audience. Machines that make music focus on these patterns, but give little consideration to the emotional response of their audience. Scientists have developed a new machine-learning device that detects the emotional state of its listeners to produce new songs that elicit new feelings.