Digital experts have simulated the wall of sound that pipers faced when they went over the top of the trenches in the First World War.

Historian Michael Stedman worked with the Digital Design Studio at the Glasgow School of Art to recreate the sounds of battle for the BBC Scotland documentary Pipers Of The Trenches.

Amid the sounds of weaponry such as exploding shells and bullets hitting metal, the strains of the pipers' tunes can be heard, along with noises including tramping boots and men shivering.

The "remarkable" results were played to descendants of pipers who played their comrades into battles such as Vimy Ridge and the Somme.

Neil McDonald, creative director of documentaries at BBC Scotland, said: "The story of the pipers who strode unarmed into battle is fascinating and inspiring - and one we wanted to tell in the fullest way possible.

"We drew on a wealth of military history to piece together their incredible acts of bravery for their descendants who feature in the programme and for the audience.

"However, one element of the story that was missing was an authentic sound as there is no known audio from the battles which, of course, were fought in the days before location recording was achievable.

"Bringing together the expertise of Michael Stedman with leading-edge audio technology has created an experience which is compelling and moving."

Mr Stedman, who has written several books on the First World War, guided Paul Wilson, dubbing mixer at the Glasgow School of Art's digital design studio, through the timeline and details of the battles which featured in war diaries and other written accounts.

Mr Stedman has studied all the weaponry deployed at the Somme, when it was used and how it might have sounded.

He said: "There are no recordings in a mobile sense that I know of, as that really happened after the war. As a historian, I have often wondered what the battles would sound like.

"We could not reproduce the sound of the battles by copying modern weaponry.

"Modern artillery has a higher velocity which would not have an authentic sound from the time, so Paul had to do a lot of manipulation to generate a more accurate audio experience.

"One of the sounds was the explosion of a mine which contained 40,000lb of high explosives. The effect was massively concussive and the blast could be heard from across the English Channel."

Mr Wilson, whose team has worked with car designers to demonstrate how vehicles will sound on the road and has rebuilt the acoustics of Coventry Cathedral from architectural drawings, said: "It was a fascinating project.

"One of our main sources was the war diaries of officers who noted, almost to the second, what went on. We modelled much of our audio design around those."

One of the descendants, Katy Hall, from Newcastle, listened to the audio for the first day of the Somme through headphones as she stood on the site of the battle and described the sound as "awful, horrible".

Three of her ancestors were among the pipers who led the Tyneside Scottish and Tyneside Irish regiments into battle. Her great uncle Edinburgh-born Garnet Wolsley Fife was killed on that first day.

Also in the programme, Glasgow drama teacher Richie McColm travelled with Stuart Allan of the National Museum of Scotland to one of the battle sites in western Turkey to uncover the story of his great grandfather - piper Kenneth McLennan.

Mr Allan revealed that Mr McColm's ancestor, a piper in the Highland Light Infantry, was awarded a Distinguished Conduct Medal for playing as long as possible and then helping his wounded comrades back to safety after they were stranded in exposed territory.

Pipers Of The Trenches is part of the BBC's four-year First World War centenary season.

It will be broadcast on BBC2 Scotland on Monday at 9pm.