Patients with pain or depression could be prescribed specific kinds of music to help alleviate their symptoms as a result of new research.

Scientists at Glasgow Caledonian University are using sound engineering and psychology to see how music can convey emotion and regulate mood.

The researchers hope to discover how music therapy can be tailored to individual patients to tackle conditions such as depressive illnesses.

They will analyse melodic range, lyrics, rhythm and pitch in different compositions.

Dr Don Knox, an audio engineer and leader of the project, said: “The impact of a piece of music on a person goes so much further than thinking that a fast tempo can lift a mood and a slow one can bring it down.”

He added: “Music expresses emotion as a result of many factors. These include the tone, structure and other technical characteristics of a piece. Lyrics can have a big impact too.

“But so can purely subjective factors: where or when you first heard it, whether you associate it with happy or sad events and so on. Our project is the first step towards taking all of these considerations – and the way they interact with each other – on board.”

The team has already carried out detailed audio analysis of digital recordings of music identified as expressing a range of emotions by a panel of volunteers.

They hope to develop a mathematical model that explains music's ability to communicate different emotions, and develop a computer program that could identify the best music to help patients.

Dr Knox added: “By making it possible to search for music and organise collections according to emotional content, such programs could fundamentally change the way we interact with music.

“Some online music stores already tag music according to whether a piece is ‘happy’ or ‘sad’. Our project is refining this approach and giving it a firm scientific foundation, unlocking all kinds of possibilities and opportunities as a result”.

More than one in seven people suffer a bout of severe depression at some point in their lives, according to the NHS.

The three-year project, supported with funding from the Engineering and Physical Sciences Research Council, is due for completion later this year.