Blind pianist Justin Kauflin formed a bond with his teacher, trumpeter Clark Terry, as detailed early in “Keep On Keepin’ On.” (RADiUS-TWC)

Clark Terry is a legend. The jazz trumpeter was Quincy Jones’s teacher and one of Miles Davis’s idols. He played with Duke Ellington’s band, and Dizzy Gillespie deemed him a trumpeter nonpareil. Terry was the first black staff musician at NBC and won a lifetime achievement Grammy Award in 2010.

As he approached 90, Terry continued to share his passion for music through teaching. One of his students was the Australian Alan Hicks, who became a member of Terry’s ensemble. His teacher’s energy and influence inspired him to make the documentary “Keep On Keepin’ On,” his first.

Hicks saw cinematic possibilities in Terry’s relationship with blind pianist Justin Kauflin. The pair met when Kauflin was in college. Terry, now 93, and Kauflin, 28, shared a bond from the start with their mutual passion for music, but they grew even closer when Terry, stricken with diabetes, began losing his eyesight. Kauflin, who tried to make it in New York before retreating to his parents’ home in Virginia Beach, visits Terry in Arkansas often. The older musician is weak and on oxygen, yet he always seems to have the energy to stay up late when Kauflin is around. Terry tells stories or coaches his student, repeating “deedle dawdle doodle,” so Kauflin gets the rhythm just right. Their friendship is in­cred­ibly endearing.

The stories unfold in parallel, occasionally intertwining, and as one narrative examines a glorious past, the other focuses on an uncertain future. Kauflin’s plight is professional. He has stage fright and doesn’t feel like he’s found his own sound. Terry, meanwhile, has wounds on his legs that aren’t healing because of his diabetes, and amputation may be the only answer. In one heartbreaking scene, Terry laments to his wife that he has so much more to teach.

One of the delights of the documentary is hearing Terry tell stories. Watching the movie feels as if you’ve sat down in someone’s living room to hear tales of other legendary jazz musicians, such as Count Basie or Miles Davis. (Davis “was so thin that if he’d turned sideways, they’d have marked him absent,” Terry says.)

Watching the man’s health fail is sad, and yet there is so much joy in “Keep On Keepin’ On.” At one point, Hicks captures Terry and Kauflin during one of their late-night sessions. The blind pianist plays in dim light next to Terry’s bed where the musician lies with an oxygen tank. It’s such a beautiful, intimate moment. Although Terry may never be able to play his trumpet again, we see the legacy he leaves as Kauflin’s fingers dance across the keys and Terry hums along.

★ ★ ★

R. At AFI Silver Theatre. Contains strong language. 84 minutes.

Kauflin will perform after these screenings: Friday at 5 and 7:20 p.m.; Saturday at 2:45, 5 and
7:20 p.m.; Sunday at 12:30 and 2:45 p.m.