One hundred years ago, 21,000 British soldiers, including 7,000 Scots, were killed in the Battle of Loos on the Western Front and to mark the occasion, a new piece of music is to be premiered at Glasgow University.

The composer, Drew Mulholland, hopes the first performance of the piece, From a Fallow Field, will act as a thoughtful reminder of the horror of Loos, which involved battalions from every Scottish regiment. But it will also be a tribute to his grandfather Brian Gallacher, who was injured in the battle.

Mr Mulholland, composer-in-residence at the university's School of Geographical and Earth Sciences and department of Physics and Astronomy, said it was a picture of his grandfather in uniform that was part of the inspiration for the piece, which is a duet for cello.

"My grandad had signed up to serve with the Argylls and was posted to the Western Front," said Mr Mulholland. "As his beliefs forbade him to bear arms, he opted to be a medic and during the battle was shot and lost two fingers from his left hand, ending his passion for playing both the violin and the bagpipes."

Mr Mulholland says he still feels a strong emotional connection to his grandfather through an early memory of him. "I was only three and I was sitting on the edge of his bed and we were laughing our heads off. I remember the room and sitting on his bed but what I didn't realise was that it was his death bed. The other thing which can't be proven is he died of emphysema possibly linked to gas."

Mr Mulholland does not know it for sure but it is entirely possible that his granddad was gassed – Loos, which started on September 25, is famous for being one of the first battles of the First World War in which gas was used by the British. However, a sudden change in wind direction meant some of the gas was blown back over British lines.

The battle is also famous for the extensive involvement of Scottish troops. Around 30,000 took part, including many volunteers from Glasgow University who will also be remembered at the service on Friday. In all, 39 members of the university community died during the battle, 22 of them on September 25.

Mr Mullholland says he wanted From a Fallow Field to reflect some of the sounds and rhythms of the battle (at one point the cellos echo the drone of the bagpipes) but also express his horror and bewilderment at the slaughter of the First World War.

"I think everyone was caught off guard," he said. "In 1914, there were cavalry charges and pretty soon after that, there was trench warfare. There was also someone in a lab making gas knowing exactly what it was meant to do."