War-movie scores aren’t just military drums and brass bands anymore. The music is as much about the men as about the battle. That was made clear this year with Rupert Gregson-Williams’ music for “Hacksaw Ridge” and Alan Silvestri’s score for “Allied.”

“Hacksaw Ridge” director Mel Gibson tracked down English composer Gregson-Williams after hearing his work on this summer’s “The Legend of Tarzan” and offered him the film about Desmond Doss (Andrew Garfield), the pacifist combat medic who won a Medal of Honor for saving 75 lives during the Battle of Okinawa.

“We didn’t want to make him into a conventional action hero,” says Gregson-Williams. Instead, based on Doss’s religious convictions, he wrote a theme “that harks back to ancient religious harmonies… something a little psalm-like. My idea was to keep it simple, because Desmond was not complex. I wanted to give him some faith without being pious.”

For the early home scenes in the Blue Ridge Mountains, he added a subtle touch of guitar (“to make us feel more rustic in a certain time and place rather than being specific to the Appalachians”). Gibson chose, however, to play the first 12 minutes of battle scenes without any music. “It’s just the realism of war,” the composer says.

Music does play a key role throughout that second half of the film, with orchestra augmented with synthesizers. “With synths, you can create other atmospheres that you’ve never heard before. Plus, as we got onto the ridge, I wanted to make us feel like we were in hell. Synths enable you to crackle and push and tighten the rope more effectively than just orchestra.”

And later on, he notes, as the music reflects the Americans being overrun by the Japanese, “we chose to lose some of the sounds of war. So the music rises above it and gets your heart pounding. It was quite interesting working with Mel on sound; he doesn’t hold back. He chose some quite powerful moments.”

There is also choir, but used sparingly, Gregson-Williams says. “I didn’t want to dose the whole thing in choir. But there was a moment up on the ridge where Desmond questions his faith; he doesn’t know whether he should abandon the ridge. He kneels down. I wanted to invoke something there.”

The composer turned to three soloists: renowned British cellist Caroline Dale, electric cellist Peter Gregson, and – surprisingly – his own voice. “We can make the electric cello sing,” he says. A trained chorister, Gregson-Williams sings himself, “in a couple of places, very high, a sort of countertenor. It gives the score a magical purity; it’s another reflection of that early-music sound,” he explains.

For “Allied,” his 16th film with director Robert Zemeckis, composer Silvestri was flown to London, the day after principal photography wrapped, to watch the first assembly with his filmmaking partner of more than three decades (encompassing “Back to the Future,” “Forrest Gump” and “Cast Away”).

Silvestri says he spent weeks searching for the right approach. For the opening, as Brad Pitt parachutes into the North African desert, he recalls Zemeckis saying “I don’t really want to give away anything we don’t have to.” So the music “doesn’t say anything about 1942, or the Germans. That’s not what the movie is about.”

That opening music has a sense of mystery: an echoing piano, a distant bassoon, a solo flute. Then as we see the desert, some unusual percussion conveys “a sense of an exotic place, a rawness,” Silvestri explains.

The composer searched for what he calls “a point of access” and found it in a line that Pitt says halfway through the film, when questions arise about his wife (Marion Cotillard): “C’est la guerre.” That inspired a delicate theme for their family.

“I started to think of that as an anthemic piece of music that somehow addresses the paradox of what we’re seeing,” Silvestri says. “You’re seeing the most beautiful event known to man taking place, this birth of a new life, in the midst of the most horrible things known to man: death, destruction, brutality.”

Interestingly, Silvestri never alludes to the period in his score and, he adds, “it wasn’t an action score on any level. Yes, it was about war, but I didn’t need to play this as a World War II movie.” So he also augmented his 80-piece orchestra with “tons of tracks of electronics all through the movie.”

The period was reflected not through the dramatic score but through newly recorded versions of classic 1940s-era songs including “The Sheik of Araby,” “You Are My Lucky Star,” “Flying Home” and especially “Sing, Sing Sing” played with gusto by a London big band.

They decided against licensing the master recordings of the original hits because of “the recording technology of the day,” Silvestri says. “Our perception of the sound of these is sometimes different than the reality.”

Silvestri’s next big assignment: the two-part “Avengers” film “Infinity War” due in 2018 and 2019.