News, views and top stories in your inbox. Don't miss our must-read newsletter Sign up Thank you for subscribing We have more newsletters Show me See our privacy notice Invalid Email

A healthcare company has used an artificial intelligence to help create a lullaby that could aid troubled Brits in getting to sleep at night.

According to research by AXA PPP healthcare, 54% of us struggle to get 40 winks each night with a further 10% suffering from severe insomnia.

In an effort to help, the company says it has taken the humble lullaby and given it a 21st century twist.

It has produced two separate tunes, one created by renowned composer Eddie McGuire and the other by a machine that used artificial neural networks and had no input from a human at all.

The company has challenged listeners to find out which one works the best.

Video Loading Video Unavailable Click to play Tap to play The video will start in 8 Cancel Play now

McGuire's composition (above) is called "Lyrical Lullaby" and was created with leading musician and academic, Bede Williams, who is head of Instrumental Studies at the University of St Andrews.

Williams explained: "Lots of people report of a falling sensation as they fall asleep, and many lullabies mimic this by containing melodies made up of descending patterns in the notes. Lyrical Lullaby has this essential feature and many other musical devices which can induce in us a state of restfulness."

In contrast, the AI-created music (below) was simply called "Lullaby" and was trained on sheet music in computer-readable format from which it learned the elements of music, such as melody, harmony, rhythm, and structure.

Video Loading Video Unavailable Click to play Tap to play The video will start in 8 Cancel Play now

“An artificial neural network is essentially a representation of the neurons and synapses in the human brain - and, like the brain, if you show one of these networks lots of complex data, it does a great job of finding hidden patterns in that data," explained Ed Newton-Rex, the founder and CEO of Jukedeck, which produced the composition.

"We showed our networks a large body of sheet music, and, through training, it reached the point where it could take a short sequence of notes as input and predict which notes were likely to follow.

"Once a network has this ability, it essentially has the ability to compose a new piece, as it can choose notes to follow others it’s already composed."

On average, a person needs about nine hours of sleep to be fully rested - although that amount can differ from person to person. But the increasing speed and connectedness of technology means many people are finding it harder and harder to switch off.

(Image: Getty)

“Lulling is certainly not a new technique, and any parent will have some understanding of the mesmerising effect singing a lullaby can have to help a baby or child drift off to sleep," said Dr Mark Winwood, Director of Psychological Services for AXA PPP healthcare.

"Many people struggle to drift off to sleep every night, whether this is from a sleep disorder such as insomnia or due to short term factors in an individual’s life that is impacting their ability to sleep.

“Music can be used to reduce sympathetic nervous system activity; decrease anxiety, blood pressure, heart and respiratory rate; and possibly have positive effects on sleep in regards to muscle relaxation and distraction from trivial thoughts.”

We've included both the compositions in this story so why not give it a try tonight and see which one is best for helping you to drift off.