Shirley Caesar at the center of a performance that included Donnie McClurkin, Octavia Spencer and the Howard University Gospel Choir as part of “Taking the Stage: Changing America,” a concert taped at the Kennedy Center to mark the opening of the Smithsonian Institution’s National Museum of African American History and Culture. (Fred Watkins/ABC)

James Brown, Marian Anderson, the Duke and Lena Horne. They weren’t there physically Friday night at the Kennedy Center, but their presence was undeniable during a star-studded concert marking this weekend’s opening of the National Museum of African American History and Culture.

“I should say good evening, everyone,” said Oprah Winfrey, who donated $21 million for the museum, after President Obama and first lady Michelle Obama took their seats in the balcony of the Eisenhower Theater. “But what I’d really like to say is hallelujah.”

If the concert — recorded for future broadcast on ABC — set the tone for this weekend’s events, it did so by honoring a stunning artistic legacy without glossing over the painful road that’s been central to the African American experience.

“You don’t want to be so happy, you don’t want to be so sad but you do want to celebrate,” said Jacqueline Washington, the daughter of a pioneering federal judge, Aubrey E. Robinson Jr.

Washington sat in the last row next to her Howard University classmate Debbie Allen, the choreographer and actress. But they weren’t complaining about the view.

“Every seat is a front-row seat,” Allen said. “That’s what this is tonight. Being in the room. When we were at the inauguration of Barack Obama, it was that you were there.”

“Taking The Stage: Changing America” wasn’t just a concert. Musicians were often introduced along with photos of the museum artifacts related to their performances, including: a pair of slave shackles; Louis Armstrong’s horn; and the silk and black velvet dress Marian Anderson wore for her Easter concert in 1939, when she performed on the steps of the Lincoln Memorial after having been shut out of Constitution Hall by the Daughters of the American Revolution.

Actress Angela Bassett spoke of how segregation hurt artists such as Billie Holiday, Sarah Vaughan and Horne.

“They were born too early to be the bigger stars they might have been but it doesn’t diminish what they did and the legacy they left,” she said. “Singing, it wasn’t the same after them. Nor were the audiences that heard them.”

The message of the evening was clear — that a visit to the new museum would be a “life-changing experience,” as Kennedy Center chairman David Rubenstein put it — and the musical performances were direct and dramatic.

Mary J. Blige, recreating Anderson’s 1939 performance, was set against a massive, black and white image of the Lincoln Memorial. Gary Clark Jr., a sizzling electric player, left his Epiphone home to perform acoustic blues from a chair, his left leg thumping the rhythm. Usher punctuated a James Brown medley by leaping off a podium and landing with a split. He later praised San Francisco 49ers quarterback Colin Kaepernick, whose protests during pregame playings of the national anthem have drawn headlines. “Silence is consent,” Usher said.

Herbie Hancock played “Watermelon Man” in all of its Blue Note piano splendor before funking it up with a handheld synthesizer. Foo Fighter Dave Grohl took the stage with go-go legends Trouble Funk. There was also a comedy segment, with Dave Chappelle talking of visiting the new museum and starting in the basement galleries.

“Powerful exhibits, chains that we were shackled in that brought us all the way to America,” Chappelle said, “but every floor you go up, things get a little better. By the time I got to the top floor, I was on cloud 9. I saw the first pair of Air Jordans. I saw the Run-DMC Adidas and Bo Diddley’s sneakers.”

He paused. “Then I hit the door marked North Carolina and fell all the way to the basement.”

It was not surprising that Quincy Jones co-produced the evening, as it darted across decades and different genres effortlessly, just as he has. Though the show started about a half-hour late — the Obamas entered after the rest of the audience — it started hot, with a tribute to Harlem, “not just an address but a state of mind,” as Jones told the crowd.

Patti Austin sang, Savion Glover tapped and dancers, in white and plaid jackets or flapper dresses, paid tribute to the 1920s. Shirley Caesar got the crowd rising with a blistering performance with a gospel choir. Gladys Knight, 72, in black dress and heels, performed a magical version of “Midnight Train to Georgia.” Ne-Yo did his best Michael Jackson and John Legend took on Marvin Gaye’s “What’s Goin’ On.”

Will Smith, the one-time Fresh Prince, referenced the power of hip-hop and three giants took the stage. Accompanied by a lone percussionist, rappers Common, Doug E. Fresh and Chuck D traded rhymes, dropping the poetry of Langston Hughes, Nas, Maya Angelou, and Rakim, as well as Public Enemy’s “Fight the Power.” Then Chuck D, sneaker flaps hanging out, declared “up there is the first black president” and paused to motion to the balcony where, indeed, that president sat.

Stevie Wonder closed the show with a driving version of “Higher Ground,” joined by the entire cast. But first, choking up at his keyboard, Wonder asked for a moment of silence to talk about “the pain and promise” and “those we have lost senselessly.” He spoke with pride of the children who will get to experience the new museum before adding, bitingly, “at least those who survive.”