“In Colour” celebrates the dance floor, but its mood is often one of withdrawal. Photograph by Nathanael Turner

In 1997, the artist Mark Leckey returned to England after a few years in America, during which he couldn’t stop thinking about England. Leckey, who was in his mid-thirties, was nostalgic for the carefree tribalism of his youth, which was spent with friends at soccer matches and dance clubs. He devoted the next two years to making something that would express this sense of yearning—and also, ideally, exorcise it. The result, a spellbinding fifteen-minute video collage titled “Fiorucci Made Me Hardcore,” consists of found footage loosely documenting the history of British dance culture, from the discos and all-night northern-soul parties of the seventies to the illegal warehouse raves and decadent night clubs of the eighties and nineties. The fact that the dancing and the audio are rarely synchronized only heightens the sense of invincible euphoria, as young people strut and twirl, sometimes in silence, always immune from judgment. Leckey had experienced only the tail end of the history that “Fiorucci” depicted, some of which was quite ugly. One sequence portrays the menacing subculture of soccer hooligans; the video’s title refers to an Italian clothing brand favored by many of them. But, in the years since, the video has become emblematic of a romantic, generation-spanning nostalgia for British night life.

This fascination with the past—particularly a past that one hasn’t experienced—has become a central theme in the work of Jamie Smith, the twenty-six-year-old producer and d.j. who goes by the name Jamie xx. Smith first rose to prominence, around 2009, as a member of the xx, a London-based band that includes the singer and guitarist Romy Madley Croft and the singer and bassist Oliver Sim. The three friends met in primary school, and they honed their sound by quietly rehearsing at night, in their bedrooms, conscious of the fact that their families were trying to sleep. (A fourth member, Baria Qureshi, was asked to leave the band early on.) Fittingly, the xx’s two albums are intimate and gorgeous, driven by dreamy, whispery duets and Madley Croft’s spangled, searching guitar lines. The group’s best work can feel like monumental pop songs rendered in miniature. Their self-titled début album won the 2010 Mercury Prize.

The xx’s success has meant spending long stretches on the road, which brings us back to “Fiorucci.” During the yearlong tour to support the band’s 2012 album, “Coexist,” Smith began feeling homesick, so he searched the Internet for music and videos that would transport him back to London. His solo work drifts toward the dancey side of things, and is a raucous, physical complement to the xx’s care and restraint. He has become a sought-after d.j. and producer, collaborating with Adele, Alicia Keys, Drake, and other pop stars. But the scope and the ambition of his work changed last summer, with the release of “All Under One Roof Raving,” a song whose structure and style were a way for Smith to reconnect with his British roots. It had a pensive, unfinished quality, built on an airy steel-drum melody and vocal samples of fans talking about British rave culture, with tap-dancing drums that seemed to fade in and out of the mix at whim. It sounded less like an all-night dance party than like a ghostly radio documentary.

There comes a moment in many artists’ careers when they stumble on the secret weapon that is the past. For some, this might mean using samples of old music or immersing themselves in the obscure traditions that anticipate or underlie today’s music. Smith celebrated the release of “All Under” by d.j.’ing a decades-spanning and occasionally moving set of British dance music for the Web site Boiler Room. What made “All Under” bewitching, though, was not its indebtedness to yesterday’s sounds but its desire to recover yesterday’s sense of wonder. Rather than sample old bass lines or drum patterns, Smith sampled snippets of dialogue from the videos and documentaries that he had watched while homesick, drawing particular inspiration, he explained on his label’s YouTube page, from “Fiorucci.”

Besides the steel drums, “All Under” ’s dominant feature is the chorus of voices from the past. They add shading to Smith’s fantasies surrounding nineties dance culture, and also to his sense of home, or, at least, the version of home that emerges as homesickness veers toward a kind of pick-and-choose patriotism. There’s a line taken from a VHS tape commemorating a 1994 rave, as the d.j. Mickey Finn takes the stage and an m.c. stirs the crowd to raise their lighters: “All the way from London town!” In a defiant proclamation from Leckey’s film, an unnamed m.c. reminds the crowd, “We do not need anybody! We are independent!”

I’ve spent many hours watching old music documentaries on YouTube. What’s absorbing is rarely the music; rather, it’s the way that music created a sense of community, charging the imaginations of fans and artists in 1989 or 1994 or 2003. Watching this wobbly, distorted footage years later only heightens its poignancy, as though someone were trying to silence these transmissions from a revolutionary past.

I recognized the sample that provides the title of “All Under” as part of something that the d.j. Kenny Ken said in “All Junglists: A London Somet’ing Dis,” a 1994 documentary about the ruggedly hyperactive jungle music scene. He saw jungle as an embodiment of the dance floor’s democratic ethos: “Certain men, a few years ago, they wouldn’t dream of talking to a white person and the same the other way around. But now we’re all under one roof, raving, laughing, and joking together.” Such a future never arrived, but Smith’s music embraces that sense of hope and exuberance. “All Under” expressed a desire not to slavishly reproduce the past but to explore what that past once promised, as well as the possibilities long since forfeited.

Next month, Smith will release his début solo album, “In Colour.” It is his homage to club culture—or a version of it that you might imagine if you’ve arrived a few years late, after the pirate radio stations have been shuttered and the legendary after-hours spot has been converted into condos. Many songs stand out on their own, such as “Sleep Sound,” with its spacey doo-wop, and “I Know There’s Gonna Be (Good Times),” a gleeful, summery R. & B. tune featuring the rapper Young Thug and the singer Popcaan. But what makes “In Colour” captivating is its sense of innocent discovery; it’s nostalgic but never world-weary, reverent toward the past but hopeful that something new can be built out of its raw materials. Consider “Gosh,” an astonishing track that starts off as a menacing speed rush, Smith’s drum line conjuring a crew of kids sprinting through the night, their bomber jackets and denim rustling in unison. Eventually, a synthesizer cuts through the fray, which recalls the melody of the 1991 rave anthem “Belfast,” by Orbital, lifting the mood from dark to light. As with “All Under,” there’s a voice from the past: “Oh my gosh,” a gruff m.c. chants over and over, the sample taken from “One in the Jungle,” a short-lived, mid-nineties BBC radio show featuring mixes from the nation’s most revered jungle d.j.s, many of whom had been broadcasting illegally on pirate stations. It was meant to be a crossover moment for London’s underground dance music, but it’s fitting, given Smith’s obsession with paths not chosen, that this episode never aired.