Composer Carlos Rafael Rivera re-imagined scoring the Western for Scott Frank's Netflix miniseries.

When Carlos Rafael Rivera was an aspiring film composer and Scott Frank’s guitar teacher in 2005, the writer-director shared the Western script he was working on as a feature, and they discussed the score. “He read me a very dark scene with this evil Frank Griffin reading by the fireside, and we discussed the moment being built around C major,” he said. “And that was it.”

Later, after Rivera scored Frank’s 2014 feature “A Walk Among the Tombstones,” Rivera prepared to score that feature in the form of a seven-part Netflix mini-series, “Godless” — and decided the best score for the scene was none at all. “When that scene came up, and I was actually writing to picture, I wrote this music that had a Bernard Herrmann influence,” he said. “We ended up using no music because the performance was so good by Jeff Daniels.”

The length and scope of “Godless” was initially intimidating for the young composer. The score required a grandeur and intimacy to match its themes about redemption and survival. It pits reformed outlaw Roy Goode (Jack O’Connell) against psychopathic mentor and gang leader Griffin (Jeff Daniels), in the New Mexico town of La Belle. After a mining accident, the town is populated almost entirely by women, including ranch owner Alice Fletcher (Michelle Dockery) and Mary Agnes McNue (Merritt Wever), the mayor’s widow.

James Minchin/Netflix

Rivera quickly discovered that going the traditional route for this unconventional Western would not work. He immediately threw out the harmonica (too much Ennio Morricone baggage) and concentrated on classical guitar (which he performed) and cello (performed by Joy Adams). “I also used an organ and harmonium to set tone,” he said. “This intimate setting was the core for most of the writing, and served as contrast when orchestral forces were required.”

When it came to the main theme, Frank and Rivera were inspired by Sara Watkins’ gritty country song, “Long Hot Summer Days.” He used only the black notes on the piano. “I wanted to have something simple and pull it off without any harmonic implications,” he said. “Then it could lend itself to harmonic change within the story.”

Rivera wrote a heroic theme for Goode that’s a variation of the main theme and, because he’s also a horse whisperer, there’s the addition of shimmering strings and a sense of longing. By contrast, the villainous Griffin has an ominous theme underscored by the musical buzzing of bees, which are associated with the villain throughout the story.

Ursula Coyote/Netflix

There’s also a lovely classical guitar theme for the tender relationship between Mary Agnes and Callie Dunne (Tess Frazer), a teacher and former prostitute. It’s inspired by the memorable “Cavatina” from “The Deer Hunter” by Stanley Myers. “The lesbian relationship is unique to the western and I really took to it,” the Rivera said. “Mary Agnes is a strong woman. She wears her husband’s clothes and is tough on the surface. But when she’s with Calley, she’s vulnerable, and to me that’s what the theme represents.”

The opening episode (“An Incident at Creede”) was one of the hardest to score. It contains a train robbery by Griffin and his gang and the ensuing destruction of the town of Creede by them. “The train robbery was the first cue I wrote,” said Rivera. “I brought in Griffin’s theme and I punctuated the gang by using [a variation of the Latin hymn] “Day of Wrath” (“Dies Irae”). But there’s a break with a lot of slow-motion imagery [during the destruction of Creede]. My original music was intended to be pretty, but it punctuated the horrendous action. I tried a different approach and that didn’t work.”

Ursula Coyote/Netflix

This is where music editor Tom Kramer came to the rescue, inserting a piece of music Rivera wrote elsewhere for the slo-mo part, but then returning to his pretty cue for the aftermath, featuring a choir sung by Adams. “I had a feeling we were going to come back to it,” Rivera said.

Listen to the music of “Godless,” whose soundtrack is available digitally from BMG on July 6.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.