Two pianists who are co-headliners for St. Paul's annual Twin Cities Jazz Festival present a compelling contrast on why the music is such a rewarding art form.

When Joey Alexander starts to play, it feels like a magic trick. That's partly due to the torrent of phrases unleashed from his fingers, brimming with harmonic sophistication, energizing rhythm and precise intonation. Alexander also is 12 years old — he'll become a teenager two days after his Thursday night performance in Mears Park.

Where Alexander is the prodigy — dazzling audiences from TED talks to the Grammys, while hitting the top of the Billboard jazz charts — Friday headliner Ellis Marsalis is the venerable sage, the 81-year-old patriarch of jazz's most renowned family.

Marsalis began as a stalwart of progressive jazz in New Orleans, where he was one of the first local musicians to depart from Dixieland and embrace bebop. As far back as 1956, he recorded with Ornette Coleman. But he has become more renowned as a teacher.

As the first director of the jazz studies program at the New Orleans Center for Creative Arts, Marsalis was instrumental in the development of Harry Connick Jr. and dozens of others. Top alumni include four of sons — Branford, Jason, Delfeayo (who will perform at TCJF) and especially Wynton, who as the artistic director of Jazz at Lincoln Center has become the world's foremost ambassador of the music.

It so happens that Alexander received his breakthrough courtesy of Wynton, who booked the then-10-year-old for Lincoln Center's prestigious annual gala in 2014.

"I have never met Ellis Marsalis. I am really looking forward to it," Alexander said by phone. "Wynton Marsalis is one of my biggest mentors, inspiration and influence — I have learned so much from him."

Alexander's raw talent was unlocked as he listened to his father's records and began playing along with Duke Ellington, Thelonious Monk and Bill Evans. He has claimed that the day Herbie Hancock expressed faith in his ability, "I decided to dedicate my childhood to jazz."

Wynton Marsalis saw videos of his performances during jam sessions in Jakarta and invited him to New York, later calling Alexander "my hero" on Twitter. It is a chrysalis-to-butterfly story that never gets old: a burgeoning artist with phenomenal talent blossoms with dedicated scholarship that is further catalyzed by important mentors.

For Alexander, his initial quantum leaps forward were a result of physical growth that enabled him to reach the piano pedals and spread his hands to form chords. Now his growth spurts will be ones of emotion and nuance, born of experience.

Alexander expressed a need to "learn the feeling" of the music he is playing. His biggest emotional connection seems to be for the ebullience of Louis Armstrong. He talks about "being patient" and "not playing too much" as areas of his craft he is striving to improve. As the cliché goes, he is wise enough to know what he doesn't know.

At the other end of the spectrum is Ellis Marsalis, the sire and mentor to Alexander's mentor, whose challenge is to invest the right bits and pieces of his extraordinary wisdom into each succeeding song or solo.

"At a certain point in your life you begin to refine what you already know how to do," he said by phone from his home in New Orleans. "I would tell my students that talent is only there to get you started, like the battery in a car. Without a generator, you're not going to go very far."

Some of that is attention to detail: "I remember going back and listening to a recording I made of a Bud Powell song called 'Hallucinations,' five years earlier and realizing I'd played some wrong notes."

But that generator of artistry also involves the need to forge your own path. "If you are studying and playing European art music, those compositions have been laid out for hundreds of years," he said, referencing Bach, Beethoven and Mozart. "You go to school and learn to be at the top of your game because the music is already there.

"In jazz there are very few absolutes; it is a constant evolution of experimentation, where the quality of what you play depends on where you are willing to go."

That is the challenge and path awaiting Alexander. For Ellis Marsalis, it is finding new trails on the path. At TCJF, he will play songs of his beloved Monk — a Bach or Mozart of jazz — as well as originals from his recent recording, completed just last week and ready to be added to his august legacy.

Britt Robson is a Twin Cities-based writer.