Three years ago, trumpeter Derrick Gardner was playing a gig with veteran Michigan State University drummer Randy Gelispie. When they got to the “chase,” where trumpeter and drummer trade improvised licks, Gardner got a surprise.

“I played my eight-measure phrase, then Randy came in and did this rhythm I’d never heard before in my life,” Gardner said.

Gelispie nonchalantly told Gardner he’d played it years before in a sanctified church.

“I wish I could name that rhythm, it was so unique,” Gardner marveled.

The file of jazz goodies in Gardner’s head isn’t slim, but two of jazz’s most rhythm-a-licious hits are on top: pianist Ahmad Jamal’s deep bumpgroove on “Poinciana” and the sizzling swingon-bossa sandwich Art Blakey pressed together for “Pensativa.”

To Gardner’s ear, Gelispie’s tossed-off lick was “as different and significant” as those.

“I had to do something to solidify it,” he said.

So Gardner wrote a whole tune around that lick and called it “Soulful Brother Gelispie.”

Friday night Gardner will debut the tune, with Gelispie sitting in on drums.

Gardner and his longtime sextet, the Jazz Prophets, have made it their business to carry on the hard-bop jazz tradition, and Gelispie is the local embodiment.

When Gardner first hit the New York jazz scene in the early 1980s, he wanted more than anything to play with Blakey’s Jazz Messengers, but Blakey died before it could happen. No wonder Gardner values Gelispie as a link to the heyday of jazz.

“I don’t mess with people in his generation,” Gardner said. “I’m very cautious. They’ll pull something out of their bag they did 50, 60 years ago.” (Gardner is 45 and Gelispie is — well, he played with Wes Montgomery in the 1960s. You do the math.)

Gardner feels the same way about his dad, trumpeter/arranger Burgess Gardner. “He was there, on the scene, in its heyday. He has forgotten more stuff than I know.”

Gardner named his combo the Jazz Prophets in honor of Blakey’s Messengers, the flagship engine of straight-ahead bop in the 1950s and 1960s. The Prophets, together since 1988, share Blakey’s joyful fire and smoking three-horn front line.

“We both have the same creed,” Gardner said. “We’re keeping the music alive.”