Herbie Hancock headlined this weekend’s Capital Jazz Festival at Merriweather Post Pavilion. (Photo by Bernard Flagg )

Bass guitarist Marcus Miller earned that title by a working a double shift. After anchoring a vibrant, funk-driven set by DMS, a new all-star group that teams him with George Duke and David Sanborn, Miller shrewdly underpinned Hancock’s sweeping finale.

Hancock chatted rather aimlessly before settling into a performance that covered a lot of ground, from early piano influences to his latest CD, “ The Imagine Project .” The album features multicultural contributions from numerous pop, rock and world-beat artists, so it’s easy to understand why Hancock chose to tour with versatile singer Kristina Train.

But for all of her gifts, Train doesn’t possess a distinctive vocal personality. When she sang against a recorded backdrop of African beats, layered vocal choruses and other tracks from the CD, Train handled her assignment with ease. Yet it was the computer-generated elements that ultimately made the performances ear-catching and memorable. Train’s most soulful contribution came when she picked up a violin and elegantly shaded Hancock’s interpretation of “’Round Midnight.”

At 71, Hancock looks remarkably youthful, and he hasn’t lost his enthusiasm for performing his hits in concert. He recharged “Watermelon Man” with bolts of electronic funk and brought a fresh, percussive vitality to “Cantaloupe Island.” Playing acoustic piano and both stationary and portable synthesizers, the keyboardist was clearly inspired by Miller’s temblor-triggering sound and drummer Vinnie Colaiuta’s muscular virtuosity. A propulsion machine, Colaiuta turned on a dime when contrasting his pummeling attack with relaxed shuffle grooves and proved equally adept at lightly accenting Hancock’s acoustic impressionism.

When it came to shamelessly hamming it up, keyboardist Duke needed no encouragement during the opening set — certainly not while playing the role of an anguished lover, kneeling between piano and synthesizers, resting his aching head in one hand. The crowd ate it up, but the concert’s highlights weren’t comically melodramatic.

For starters, saxophonist Sanborn was in prime form. His keening, R&B-bred alto cut through the ballad “Lisa” and several up-tempo tunes like an acetylene torch. Duke sometimes strapped on a portable synthesizer that enabled him to bend and sustain notes in guitarlike fashion, the better to engage his bandmates in spirited cutting contests and piercing call-and-response exchanges.

During “Brazilian Love Song,” Duke flirted with a pop-jazz lull, but mostly he and fellow vets Sanborn and Miller led their quintet through a colorful, rhythmically kinetic performance, with Miller’s “Maputo,” a Mozambique-inspired excursion, among the evening’s biggest treats. Miller was joking, of course, when he said that composing the go-go anthem “Da Butt” marked the “pinnacle” of his artistic achievements. Yet, thanks to a surprise appearance by E.U.’s Sugar Bear, the song proved the perfect choice to cap the set on a boisterous, crowd-delighting note.