It’s a cold morning and as you head out for a run you flick desperately through your iPhone’s playlists, looking for a song that’ll get your heart pumping in a hurry. Such searches may soon be over, thanks to a system that automates the union of music and exercise with a set of earphones that listen to your heart rate and select tunes that push your pulse into the optimum range for the kind of workout you want. A team of researchers led by Shahriar Nirjon at the University of Virginia in Charlottesville embedded a microphone into a set of headphones that listens to the throb of arteries in your ear. That data, as well as activity levels gathered using an accelerometer, is sent over the internet to a recommendation engine which chooses the next song based on the user’s current and desired heart rate. It’s not just for pumping people up, though - the system can also be programmed to play music that calms a person by bringing their heart rate down. As it is used, the system learns what types of music work for influencing a user’s heart rate, based on the changes it sees after it recommends songs. Environmental factors are also taken into account in the learning algorithm, meaning that songs that calm a person down when they are sitting still might be different to what works when they’re just finished a run.