NEW YORK — The first rehearsal of Fantasia Barrino’s upcoming Broadway show was, to be fair, a little rough.

No sooner had the “American Idol” and Grammy Award winner opened her mouth to sing “I Can’t Give You Anything but Love” than she was gently stopped, mid-phrase.

The man asking her to stop? Nine-time Grammy winner Wynton Marsalis.

“That was very good,” he told her. “I just want you to concentrate and do it again. Let your instincts take over.”

They were preparing for “After Midnight,” a musical celebrating Duke Ellington’s years at the famous Cotton Club nightclub. Fantasia will be the star; Marsalis the musical director.

On this day, their initial meeting for the show around a piano in a studio at the home of Jazz at Lincoln Center, their roles were different. He was the professor and she was the student.

He taught her that Billie Holiday often sang using quarter note triplets, that you can usually detect African rhythms beneath most blues songs, and that to scat correctly would take at least two years of study.

“You need to check out Dinah Washington,” the trumpeter and composer told his 29-year-old charge.

Washington, he said, had an empathetic voice that seemed to always tell the truth. “You have that same quality,” he told her. “When you listen to her, you’ll notice that.”

“Do you have any records that I could listen to?” she asked.

“Yeah, we’ll give you a whole list,” he said.

At one point, Marsalis nudged aside the rehearsal pianist at the Steinway to offer Fantasia his own half-dozen interpretations of the opening lines of “I Can’t Give You Anything but Love,” elongating some syllables, breaking up others.

An hour or so into the rehearsal, the duo moved on to their second song: “Stormy Weather,” made famous by Holiday and Lena Horne. “This is a very different kind of song,” Marsalis warned. “This is more a dramatic song.”

Fantasia, who won 2004’s “American Idol” and has put out four CDs including the new “Side Effects of You,” let her voice get breathy as she negotiated the tricky standard.

At one point during the session, the student seems to want to get something off her chest. “Can I tell you something about me?” she asked, embarrassed. “I don’t read music.”

“I know you don’t. You’re not looking at the music when you’re singing,” he said, laughing.

But Marsalis doesn’t judge. Nobody read music in New Orleans when he was being raised. “It doesn’t matter to me. I grew up with great musicians who couldn’t read,” he said.

Marsalis may have an encyclopedic knowledge of music but he’s not above mocking himself. He tells the story of trying to impress Sarah Vaughan as a 22-year-old by playing the obscure Duke Ellington song “Tonight I Shall Sleep (With a Smile on My Face).”

When he was finished, the legendary Vaughan told the young man: “That’s beautiful, baby, but it’s in the wrong key. Let me show you how it goes.”

At the session, Marsalis and Fantasia work on their approaches. When the musical opens its doors at the Brooks Atkinson Theatre on Oct. 18, there will be 17 musicians in the pit and Fantasia and co-star Dule Hill and two dozen performers will be asked to capture the sound and glamour of the Harlem Renaissance.

Two hours after it began, the initial session in mid-August ends and Fantasia leaves with homework: lists of recordings and several vocal exercises. Student and teacher hug at the end. They’ll meet again and again as she masters the material.