If there were an award for music supervisor of the year, Jordan Peele himself would already strongly be in the running. The filmmaker took on the role himself for his new horror-thriller, “Us,” although there’s no such credit in the end titles, since the writer-director-producer didn’t necessarily need to become any more of a multi-hyphenate than he already is. If, in years or decades to come, you can’t listen to a certain Beach Boys song without flinching, or a particular N.W.A number without laughing, Peele is the man to credit or blame.

[Spoiler alert: While the following article doesn’t get deep into plot points, discussing music choices does involve revealing a couple of the movie’s best jokes, so if you’re especially averse to humor spoilers, wait until you’ve seen “Us” to read further .]

“Us” makes prominent use of the mid-‘90s hip-hop hit “I Got 5 On It” — as heard in the trailer — in both song form and an eerie instrumental score reprise, as well as key cuts from the present and distant past by Janelle Monae and Minnie Riperton. But the choices that are going to remain most indelible in everyone’s minds are the back-to-back juxtaposition of the Beach Boys’ “Good Vibrations” and N.W.A’s “F— Tha Police,” two songs that have never probably never been segued together before in human history, as the mini-playlist that soundtracks the movie’s most gruesome sequence.

One of these two tracks was written into the script and one was an ingenious post-production addition, and you might be surprised to learn which of those was which.

“Jordan is very smart and savvy about music and knows exactly what he wants,” says Mike Knobloch, president of film music for Universal Pictures. “From very early on when he wrote the script and going back to the earliest days of the production, I cannot remember a time when ‘Good Vibrations’ was not the song that was going to go in that sequence. Sometimes there would be conversations about whether there should be a consideration of alternate options for any spot in the movie. But of all the song spots, ‘Good Vibrations’ was the one that was the most locked in. Between the attitude of the song playing against type for the visual, there were clearly very deliberate intentions from Jordan’s perspective about why that was a great creative choice for that sequence.”

“F— Tha Police” was a different story, where trial and error produced the right result. The gag (again, slight spoiler alert) is that a character in distress calls upon an electronic device — here called not Siri or Alexa but Ophelia — to dial the police. It’s electronically misheard as a request to play the N.W.A song. But the police almost did show up in this scene, after all… as in the Police.

“Obviously there’s an initial joke, but then it’s a pretty significant use of that song,” Knobloch points out. “It goes on for a while. Something like a minute and a half or two minutes could be an eternity when you’re talking about a needle drop in a film. So you have creatively all the considerations of: Is it the right energy? Does it feel right against the sequence? Does it propel the story? And that is a spot where other things were tried that could make the joke with ‘Call the police’ and the technology erroneously playing a song that was either having to do with the police or by the Police. For the first significant portion of post-production, there was something else in that spot that worked really well, but tempo-wise it was a bit mellower, and I don’t know if it was as fun of a song.” (He declines to name the initial pick but, reading between lines, it’s easy to imagine they might have tried having a character draw a final breath to the tune of a song about every breath.)

“There were research screenings along the way where Jordan got to try cutting one in versus the other,” says the Universal film music chief. “And I think it became very clear at a critical point in the process that N.W.A was a much more satisfying choice for himself and for audiences that were seeing the movie.” The N.W.A song, he says, “doesn’t overstay its welcome, and it ends up being a really satisfying underscore to that sequence.”

You probably wouldn’t imagine the surviving members of N.W.A clutching any pearls when it comes to movie violence, and, indeed, “obviously they didn’t have an issue with the material,” Knobloch says. “We definitely at the studio had the benefit of being the studio that made ‘Straight Outta Compton,’ so we have experience with licensing N.W.A songs and we knew how to go about doing it.”

But was there any hesitation on the part of those granting rights for “Good Vibrations,” which comes a little closer to the use of the song “Singin’ in the Rain” in “A Clockwork Orange,” as something possibly chosen for having previously been associated with whatever is the polar opposite of sadism?

“That was a pretty straightforward case of asking permission with the usual template of information, where they said yes and set a price and it all just kind of worked out,” Knobloch says. “Every dialogue about every clearance is always different. Some people are concerned about the money, and some people are concerned about the context and the use and integrity. We went through something on a movie recently where the performances was by a legacy artist and her estate had very particular restrictions about the song can’t be playing if there’s blood or any visual that corresponds with the song that was too graphic. And sometimes you grant certain approval rights, so once the scene is finished, we’ll go back and show it to them. But with ‘Good Vibrations,’ this was not one of those instances.”

Nor can he point to a single hang-up having to do with the music rights for “Us,” which is rare, except maybe in cases of star directors riding a cultural crest. “We hadn’t have to overturn any denials of our requests, which was really fortunate. When you have a filmmaker like Jordan and it’s his follow-up film after ‘Get Out,’ you’re setting the table for a shorthand that communicates a high-integrity filmmaker and high-integrity use in a film, so it doesn’t take a lot of explaining or pleading.”

There’s a double use of “I Got 5 On It,” the 1995 hit by Luniz, although the instance of it recurring late in the film may only be audible to particularly attentive ears. Knobloch says the time that transpired between the trailer being released with the song in it and the finishing of Michael Abels’ score allowed for that echo.

“That song came full circle,” says Knobloch. “It started with Jordan using it in the driving scene with the family on their way to their vacation. Then when the marketing department were working on the first trailer, the vendor had the idea to take that song, which was temp-ed into the movie at that time, and slow it down and use it as kind of a creepy riff in the trailer” in what eventually came to be known as the “Tethered Mix.” “The trailer dropping on Christmas Day really made an impact, so much so that the reaction to the song then influenced subsequent creative decisions on the film, and even influenced Jordan and Michael Abels taking the ‘5 On It’ riff and interpolating it into a couple of key score cues late in the film. I don’t know that Jordan and Michael would have gone that route, had the use of the song in the trailer not been so successful.”

The creep factor goes down significantly with the song that goes from the final sequence into the end credits, Minnie Riperton’s “Les Fleurs.” The song comes from the late R&B singer’s then-flop of a 1970 debut album, although it’s come to be regarded as a psychedelic-soul classic. Her biggest hit from years later, “Lovin’ You,” has been licensed plenty over the years, but it’s hard to find many other film uses of “Les Fleurs,” although Paul Thomas Anderson (who is married to Riperton’s daughter, Maya Rudolph) picked it up a few years ago for “Inherent Vice.”

“It’s almost a palate cleanser,” says Knobloch. It is clearly not an obvious choice, if you’re going down the playlist of songs that you would think would have a significant role in this movie. But even though it’s not exactly a happy ending, it is a wink and it lets you off the hook and it allows you to exhale, even if, played against the visual, you’re not quite all the way out of the woods. So it really checks a lot of boxes in a very satisfying way. That’s one where it’s less about the lyric or anything on the nose like that and just a vibe and an attitude that is a little ambiguous but just really works nicely in that spot at the end of the film. Jordan found that and put it in early on, and although we definitely kicked the tires of that idea and made sure we weren’t leaving anything on the table, anything else that we talked about or tried did not hold a candle to how well Minnie Riperton worked, in putting a really pretty song against a not totally neat and tidy ending.”

Playing music against visual type was something that figured into Abels’ score, at times, too. While the children’s choir and “Michael channeling his inner Bernard Herrmann” might sound like staples of suspenseful scoring, Knobloch particularly loves the cue that arrives when “Elisabeth Moss’ tethered counterpart is looking in the mirror and putting on her makeup, and there is a very beautiful piece of music that just amps up the creepiness of that visual in a way that is hard to describe” — yet another of the doppelganger tale’s instances of good-sounding bad vibrations.