I begin typing up my story about Codebreaker, a new composition commissioned by Hertfordshire Chorus about the life of brilliant mathematician Alan Turing, and then stop, fingers resting on my keys.

I am overcome by a wave of sadness for the man who famously worked at Bletchley Park during World War Two cracking messages from the Germans using the Enigma machine and was also the father of modern computing.

Without him I may not even have a computer to type his story on.

Just ten years after he broke a code which saved the battle of the Atlantic, he was being arrested for homosexuality, then illegal, his security clearance was revoked and he made the horrendous choice to be chemically castrated as an alternative to prison.

The Maida Vale-born genius was only 41 when he committed suicide two years later by eating an apple covered in cyanide.

He left no note and Codebreaker composer James McCarthy says: “He didn’t leave much behind at all, so a lot of how he was feeling has been guesswork. I’m sure audiences won’t agree with everything I have done, but I used my instinct.

“It’s about his emotional life and how the war affected him, and being persecuted.“ The 34-year-old immersed himself in Turing’s life to write the piece, even cycling the routes the mathematician ran through London and says: “It’s an amazing life. I think a lot of people will be surprised by the stuff he did apart from the work at Bletchley.

“He founded artificial intelligence as a concept and was an Olympic quality runner. And his tragic death made him an important figure in the lesbian gay bisexaul and transgender (LGBT) community.“

He based Codebreaker around a letter written by Oscar Wilde when he was imprisoned in Reading and poems written by Wilfred Owen and Sara Teasdale.

“It starts with him falling in love with Christopher Morcom who he met at school,“ says James. “I think that was really important for the rest of his life even though Morcom died at 18, because he wrote to Morcom’s mother saying he hoped he could fulfil his potential for him and that’s what drove him to succeed.

“So it’s a love story and at the end I give them a reunion. I just couldn’t leave him in that horrible place where he died, so I gave him a bit of paradise.“

Chorus musical director David Temple says back in 2012 when he asked James to write the piece, Turing’s achievements were vastly under-recognised.

It was only when British Prime Minister Gordon Brown had made an official public apology on behalf of the British government on September 10, 2009, for “the appalling way“ Turing was treated that his legacy came more fully into the public eye.

Since then there have been celebrations to mark 100 years of his birth on June 23, 1912, The Queen gave him a posthumous pardon on December 24, 2013 and a film, The Imitation Game, starring Benedict Cumberbatch as Turing, is due out this year.

“It’s a rather pleasant co-incidence,“ says David, “and strange how he has become so topical.“

On April 26, 150 members of Hertfordshire Chorus, together with a 65-strong orchestra and soprano soloist Naomi Harvey, will perform the world premiere of Codebreaker at the Barbican.

Details: hertfordshirechorus.org.uk, barbican.org.uk

Read our review of Codebreaker here