It’s not often that the villain’s theme is transformed into the hero’s music in a comic book movie. But that’s what happens in “Shang-Chi and the Legend of the Ten Rings,” and there’s solid reasoning behind it.

Composer Joel P West spent two full years thinking about, writing and recording the score for the latest Marvel movie. He and director Destin Daniel Cretton have done five features together, and he says: “Our music conversation is an off-and-on thing that happens during the screenwriting process, all the way through to the end of the edit, as I have ideas and as he has time. It’s an ebb-and-flow of talking about it and developing it over every chapter of the filmmaking process.”

In “Shang-Chi,” the ruthless, powerful bad guy Wenwu (Tony Leung) is the father of Shang-Chi (Simu Liu), who has spent most of his life trying to escape his troubled past. But the son inevitably inherits traits from both father and mother (Ying Li, played by Fala Chen), and “Ten Rings” is, as West points out, very much a family story in which Shang-Chi comes to terms with it all (and saves the world along the way).

“His dad’s themes are big and emotional and dominating,” West says, and part of the fun of the score was eventually turning “this ominous, dark music into Shang-Chi’s hero melody with big, fun brass and booming drums, powerful and masculine and celebratory.”

While Cretton’s background is Japanese-Okinawan, and he grew up in Hawaii, West has no Asian ancestry. So he spent months researching the vast treasury of Chinese music. Yet, he says, “the core of the music hopefully lies within emotional family themes that aren’t distinctly Asian but, at times, have pieces of that ethos or sprinkles of these beautiful sounds that come from traditional Chinese instruments.”

West did employ the pentatonic scale, fundamental to Chinese music, and engaged the UK Chinese Ensemble for authentic sounds: the stringed erhu and pipa, the xiao and dizi flutes, the hammered-dulcimer-like yangqin and the zither-like guzheng. “Those instruments are largely connected to Shang-Chi’s mom and the mystical realm that she’s from,” says West, “so we treated them more as ethereal layers, to hint at this other place.”

Making a particularly strong contribution are the tanggu drums, especially in the martial arts scenes. “You’re often hearing six to 12 drums at the same time, performing in a circle,” West notes. Hints of other Chinese percussion — paigu and bangu drums, lion cymbals and opera gongs — are also heard.

But a 70-piece London orchestra, recorded over 10 days at Abbey Road, is the basis for much of the 105-minute score. It is, “by leaps and bounds,” West concedes, his biggest score ever. “There’s around 15 minutes of music in ‘Short Term 12,’ our first feature together. I’m not sure there’s 15 minutes of silence in this movie.”