It's not quite mind reading, but it's close: scientists have been able to identify songs people are listening to just by using fMRI scans of their brains, which measure blood flow and brain activity.

The research promises to help us understand both how the mind reacts to music and how future brain interfaces could be developed to help people who can't communicate in the usual way – like those with locked-in syndrome, for example.

Further down the line we could even be composing songs using our thoughts, according to the international team of researchers behind the study, though that kind of sci-fi concept is still some time away.

"Although it could be a long way to achieve these advanced reconstruction approaches, we present here as a first step in this direction an approach to identification of novel music pieces," write the researchers in their published paper.

The experiments relied on an encoding-decoding model, where a computer system monitored the brain activity patterns caused by particular songs – which parts of the mind lit up and when – and then tried to identify the right song again just from the fMRI data.

Six volunteers were played 40 pieces of music covering classical music, rock, pop, jazz, and others. Software hooked up to the fMRI scanner was trained to measure brain activity against musical features including tonality, dynamics, rhythm and timbre.

When the analysis was complete, some of the tunes were repeated, and the computer system had to guess which songs were chosen. When the computer was given a straightforward A or B choice, it picked the right one up to 85 percent of the time.

The experiment was then widened so the software system had to pick the right song out of ten possible options, using only the brain scan data of the listener to go off. This time, the computer got it right 74 percent of the time.

Among the other findings from the study was the way in which listeners didn't really show a "hemispheric preference" for musical processing – there was no bias towards the left or right-hand side of the brain.

While this isn't the first time scientists have tried to map songs against brain activity, this particular experiment does go into greater depth with a wider choice of songs and a more varied playlist than previous research did.

Further down the line, the researchers say, this kind of technique could be used to work out which hooks and melodies people like best, and why some people can really fall in love with a song while it leaves others cold.

The study is part of a wider effort to understand more about the effect music can have on us, with recent research looking at how certain music boosts productivity, and the way in which changes in brain activity can actually alter our taste in music.

Eventually, the new technique could even be applied to help people who have problems with auditory hallucinations, though we're going to need a lot more data before that can happen.

The findings have been published in Scientific Reports.