One of the surprises on the Oscar music shortlist was Daniel Hart’s score for “The Green Knight,” which is awash with medieval musical touches appropriate for a 15th-century tale of King Arthur’s court.

The Los Angeles-based Hart, a violinist who was once a member of St. Vincent’s band, has scored all of David Lowery’s films, including “Pete’s Dragon” and “A Ghost Story.” But “The Green Knight” posed unique challenges, not the least of which was the idea of writing songs in the ancient Middle English language.

“I didn’t know anything about medieval music, really,” Hart says. But he grew up singing liturgical music in his parents’ Dallas-area Episcopal church choirs, much of which is rooted in ancient English music, so he had a starting point.

Research into Middle English poetry, the source of most of his lyrics, followed, and songs including “O Nyghtegale,” “Be Merry, Swete Lorde” and “Aiganz O Kulzphazur,” lend an air of musical authenticity to the saga of Gawain (Dev Patel) and his quest to find the mysterious Green Knight far from Camelot.

Other choices included the use of a quartet of recorders, a seven-voice choir of sopranos and altos, and an ancient stringed instrument called the nyckelharpa, which Hart had specially built and learned to play (“it sounds like a rustic viola,” he says). Hart also played all the violins and violas in the score, and augmented those with a six-member London cello ensemble.

Much of this was recorded prior to the pandemic, but when the March 2020 lockdown forced a postponement of the film’s release date, director Lowery began recutting his film, leading to multiple revisions in the score — mostly accomplished in Hart’s studio and with the help of other musicians and singers recording remotely.

Gawain earned “a very playful, slightly off-kilter melody that reprises several times in the first section of the film,” but that immature-Gawain theme disappears as he departs on his adventure-filled quest and grows up over the coming months. A theme for his lover Essel (Alicia Vikander) and one for King Arthur (Sean Harris) and the sword Excalibur are also heard.

Surprisingly, he also added the sounds of the Prophet Rev2 synthesizer, mostly for “creating atmosphere” in the spirit of Wendy Carlos’ ominous opening music for Stanley Kubrick’s “The Shining.”

It was a long process, starting with his first song in August 2018 and finishing final revisions in October 2020. Hart, who has never won a major industry award, was surprised to find himself on Oscar’s shortlist of 15 finalists for nomination.

His first thought upon receiving the news? “That list isn’t very short,” he cracks.