At music festivals, worlds collide, albeit not always in the most productive ways.

Toward the end of the Roots Picnic on Penn's Landing on Saturday night, three hours late, the Virginia hip-hop duo the Clipse finally took to the tented side stage, where a steady stream of fervent admirers filled the room by the end of the first song. Rappers Malice and Pusha T (a.k.a. brothers Gene and Terence Thornton) reeled off songs about the perils and pleasures of the drug trade; the keys in "Keys Open Doors" were not of the notched-metal variety.

But their battle-hardened rhymes were no match for the undergraduate Afro-pop of Vampire Weekend, whose main-stage set began midway through the Clipse's performance, only a few dozen feet away. The aural bleed overwhelmed the streetwise rappers, the only circumstance in which hardened, self-styled gangstas could lose a battle to a group of buttoned-down Ivy Leaguers who travel with their own wi-fi network.

With songs like "Cape Cod Kwassa Kwassa," Vampire Weekend flaunted its musical eclecticism, crossing Zulu guitar lines and Baroque piano with lyrics like "Can you stay up to see the dawn in the colors of Benetton?" The band has taken flak for cultural appropriation. But ever since West African music and European instruments met to create the blues, cross-pollination has been the source of musical invention. The trouble with Vampire Weekend is that it insists on being congratulated for its cleverness, like eager pupils with hands stretched to the sky.

The irresistible dance-pop of the Very Best embodied cross-cultural inspiration, without the need to underline it. With a Swedish DJ, a South African rapper, and a Malawian vocalist, they mixed the exuberance of African music with thumping dance-floor beats. In "Warm Heart of Africa," the title track of last year's debut album, Esau Mwamwaya dropped references to shell-toe sneakers and ELO while asking, "Is hip-hop hereditary?"

Although the Festival Pier was still filling up during its midafternoon set, the Very Best provided the festival's keynote moment with a dazzling appropriation of the Brooklyn band Yeasayer's "Ambling Alp," recycling its tumbling rhythms as the bed for Mwamwaya's original melody, sung in his native Chichewa. By not straining to demonstrate the way two diverse musical cultures can intermingle, the Very Best made the point with greater force and more grace. You'd have had to stop dancing to consider that what you were hearing might be, in its modest way, revolutionary.

In its own set, the Roots mixed both cultures and eras. With soul singer John Legend, the Roots previewed Wake Up!, an album of vintage protest songs due out in the fall. And with Method Man, Raekwon and Ghostface Killah, the group relieved the glory days of the Wu-Tang Clan.

Legend's version of Bill Withers' "I Can't Write Left-Handed" was the passionate lament of a wounded veteran, while the intoxicating braggadocio of Raekwon's "Incarcerated Scarfaces" boasted that he "move rhymes like retail." On its own, the Roots embellished "Thought @ Work" with the driving riff from the Beatles' "Hey Bulldog," alongside the title track from the forthcoming album, How I Got Over. As the only hip-hop group whose fans cheer the appearance of a sousaphone, the Roots had the territory all to itself, and with the Roots Picnic, the group spread a blanket big enough for everyone to grab a seat.