When Brad Pitt’s Plan B Entertainment co-president Jeremy Kleiner approached Nicholas Britell with a promising script, the composer was eager to read it. He had, after all, contributed to the production company’s “The Big Short” and “12 Years a Slave.”

What he read blew him away.

“ ‘Moonlight’ was so incredibly beautiful,” says Britell. “I was completely overwhelmed.”

The film, released by distributor A24, presents a story of a sexually conflicted black man from a rough Miami neighborhood who grows from childhood to adulthood as he struggles with self-discovery.

During their first meeting, “Moonlight” writer/director Barry Jenkins and Britell spent hours discussing film, music, and life.

Britell began the process of scoring “Moonlight” by sending Jenkins an eclectic playlist of music ranging from the Isley Brothers to Mozart, thus highlighting his first takeaway from the script.

“It felt like poetry,” says Britell. “I began thinking, ‘What is the sound of poetry; how would you evoke that musically?’”

Britell gravitated toward the tender nature of piano and violin. A former classical pianist, he performed on the instrument himself, accompanied by violinist Tim Fain, with whom he collaborated on “12 Years a Slave.”

The two experimented with techniques to capture delicate, softer sounds, often playing very close to the mike to create the desired quality.

Noting the script’s Florida setting and Jenkins’ love of Southern hip-hop, Britell found a unique means of incorporating the genre into the classical sounds. For certain sections of the score, he utilized a technique called “chopped and screwed” — slowing the tempo between 60-70 quarter-note beats that, when repeated in a measure, creates a “choppy” effect.

Britell took his recordings, manipulated them with music software, played with octaves and tone, and then layered the revisions to achieve the desired sound.

Alternating between minimal instrumentation and the sounds of a full chamber orchestra, the score came together. Jenkins made periodic visits to Britell’s studio during the process, sitting with the composer and reacting to the score’s emotional impact.

Ultimately, via its own musical divergences, the score delivered a sense of the conflicted character at the center of the film.