In the 1960s, Paul Revere & the Raiders were a goofy garage-rock band popular with well-behaved tweens. Calling the band square doesn’t go far enough; they were altogether edgeless. Among the Raiders’ many sins was a habit of dressing in full Revolutionary War regalia, tri-corner hats and all. In Quentin Tarantino’s ninth movie, the actress Sharon Tate (played by Margot Robbie) teases an ex about enjoying the Raiders and, moments later, there’s a shot of Charles Manson leaving the area. The music grows ominous. The message is loud and clear: The Raiders may have been cheesy, but when compared with a countercultural menace, those tri-corner hats start to look pretty good.

Since K-Billy’s Super Sounds of the ’70s closed out the opening scene of 1992’s Reservoir Dogs, music has played an outsized role in Tarantino’s films. Some songs take star turns, as with Chuck Berry’s “You Never Can Tell” at Jack Rabbit Slim’s in Pulp Fiction or the Coasters’ lapdance scene in Death Proof. But given Once Upon a Time ... in Hollywood’s Los Angeles setting and the density of its references, and given that it’s the first of Tarantino’s “history” pictures to be set in the pop music era, this soundtrack has more resonance than any before it.

Essentially a buddy comedy featuring Leonard DiCaprio as an aging actor and Brad Pitt as his stunt double who pal around on the periphery of the Manson murders of 1969, the movie is pretty, pretty, pretty (especially when cars and Brad Pitt are involved); its politics, however, are ugly, ugly, ugly: violently reactionary in their treatment of the late ’60s counterculture and its concomitant burnout. The music that connects the fictional and non-fictional worlds of the movie is a soft-serve swirl, pretty even when it’s ugly, an undeniable, oft-disquieting mixtape of golden-age rock’n’roll, radio DJ patter, and period-specific commercials.

Like the Raiders, the groups here evoke the mythic surf-rock ’60s, good timin’ before the vibes went bad. Deep Purple, the prog and metal pioneers, offer two songs from 1968, the year in which the movie begins, the year before the band went feral. One of those songs is a cover of Neil Diamond’s “Kentucky Woman,” and Diamond’s oddball “Brother Love’s Travelling Salvation Show” is on the soundtrack, too. It’s either a celebration or a parody of gospel music; evangelicals didn’t know in early 1969, and it may be that Diamond didn’t either.

The rest of the offerings are from minor groups of the mid- and late-’60s, like the Buchanan Brothers, Roy Head and the Traits, the Box Tops, and (the better-known) Mitch Ryder and the Detroit Wheels. These songs bleed tension from the film; it’s hard not to smile at the ringing harmonies on Los Bravos’ “Bring a Little Lovin’” or Dee Clark’s syrupy croon on “Hey Little Girl.” Frequently, they accompany shots of Pitt’s character, Cliff Booth, cruising around town. But it’s all unimpeachable car music, propulsive and melodic, a playlist assembled by a know-it-all who’d be unbearable were it not for the fact that he knows a lot.

When less obscure, the music is flagrant in its allusions. Simon and Garfunkel’s “Mrs. Robinson” shows up briefly (The Graduate was released in December ’67) to whisper of transgression. “Paxton Quigley’s Had the Course,” by the British duo Chad and Jeremy, is a song with a rock’n’roll introduction that, two minutes in, shifts to a gorgeous keyboard interlude. It’s a formal playfulness worthy of the Beatles and it’s exciting to hear minor moptops playing similar games.

There are other familiar songs here, handholds to guide the listener through the obscurities. A cover of Joni Mitchell’s “The Circle Game” by Buffy Sainte-Marie accompanies a scene of Sharon Tate driving through Hollywood. Mitchell’s original is nostalgic, but Sainte-Marie trills of daffy innocence, forever-youth unmarred by darkness. The carousel imagery is particularly poignant given that so much of Once Upon a Time ... in Hollywood deals with westerns and painted ponies; with color, motion, and distraction. Sainte-Marie speeds up when she sings, “We can’t return/We can only look,” as if to race right by it.

Other, less cheerful lyrics are lent emphasis by their presence in the film. “Treat Her Right” stresses chivalry only as a means to an end, while the chorus of “Son of a Lovin’ Man” makes a singalong of a genetic predisposition for lechery: “I’m the son of a lovin’ man/My daddy told me get you all the lovin’ you can.” Phrases like these are vestiges of the period, but given the way the movie valorizes old-fashioned men—drinking, watching television, hitting others in the face—they stand out all the same.

The DJ patter we hear coming out of the movie’s radios, introducing songs and leading out of commercials, seems more intentional. The ads hawk perfume and cologne and cars and tanning butter, an explosion of superficiality that, Tarantino indicates, was overripe and turning rotten. But they were so funny. So weird. So beautiful. Those are the qualities the director’s fantastical, ultra-nostalgic film means to celebrate. The dream of the ’60s is alive, eternal. We’re urged to ignore the lame cultural context of Paul Revere & the Raiders because you can have fun dancing to their song “Good Thing.” This kind of fun is what makes the movie provocative. It’s a dare: Come on, those hippies are murderers, you have to admit you’re enjoying this. And maybe you’re not. But that’s less of a risk with this soundtrack, which, despite its countless references, doesn’t want you to think too hard. It wants you to push down the pedal and drive.