Louis Armstrong, left, and Joe Muranyi jam at their first rehearsal together in 1967. (Jack Bradley/Louis Armstrong House Museum)

Joe Muranyi, who was bandleader Louis Armstrong’s last clarinetist and became a leading ambassador in the effort to preserve the traditional jazz sound on records and in concert, died April 20 at a hospital in New York. He was 84.

He had congestive heart failure and bladder cancer, said his wife, Jorun Hansen.

Mr. Muranyi, a vivacious player and raconteur, spent more than five decades as a fixture in New York’s Dixieland and vintage-swing scene.

He liked to recount that Armstrong, upon meeting him in 1967, couldn’t pronounce his Hungarian surname. Mr. Muranyi suggested that Armstrong say it like the 1920s blues singer Ma Rainey. “He broke up laughing, he never forgot it,” Mr. Murayni told Armstrong biographer Ricky Riccardi. “A lot of cats in the business call me, ‘Hey, Ma Rainey!’ ”

As a young man, Mr. Muranyi studied with such modern improvisers as pianist Lennie Tristano, but he remained joyfully defiant in his musical tastes. His passion was squarely on the exuberant and melodic traditional jazz pioneered by Armstrong, even as it gradually lost popular ground to rock-and-roll and the thrilling jolt of bebop jazz, favored by such musicians as Dizzy Gillespie and Charlie Parker.

By his teens, in the 1940s, Mr. Muranyi was sitting in at Jimmy Ryan’s New York nightclub with the New Orleans trumpeter Bunk Johnson. He subsequently worked with some of the finest traditional jazz musicians of the era, including Jimmy McPartland, Max Kaminsky, Henry “Red” Allen, Yank Lawson and Bobby Hackett.

Terry Teachout, the jazz scholar and critic, called Mr. Murayni “an absolutely first-rate clarinetist. . . . He was, in the very best sense of the word, a journeyman, a professional who played this familiar style with great passion and seriousness. He developed a long liquid tone and beautiful phrasing.”

Mr. Murayni recorded in the 1950s with groups such as the Red Onion Jazz Band and then joined the Village Stompers, whose 1963 banjo-heavy instrumental “Washington Square” became an unlikely top-10 Billboard hit.

Mr. Muranyi was most remembered for his association with the Louis Armstrong All-Stars band. He joined the band in 1967, after the death of Armstrong’s clarinetist, Buster Bailey. He had beenrecommended by Armstrong’s manager, Joe Glaser, an admirer of the Village Stompers.

Armstrong, the trumpeter and gravelly voiced singer, whose early fire and expressiveness made him one of the most influential musicians of the 20th century, was in poor health by the late 1960s but was still touring rigorously.

Mr. Muranyi, who considered Armstrong his “absolute idol,” was intimidated. Armstrong was an institution and also disconcertingly mercurial — jocular and mellow one moment, inexplicably volatile the next. His insights and eyewitness accounts of Armstrong, at his best and worst, later proved useful to Armstrong biographers, such as Riccardi and Teachout.

The clarinetist said he mostly avoided the bandleader’s rages by his eager attitude and by his spry playing of even the most shopworn Armstrong repertoire. He was a self-described “moldy fig,” a traditional jazz purist and kindred spirit.

He remained in the All-Stars until Armstrong’s death in 1971, at 69. He remained an active freelancer until retiring in 2010, often playing at Armstrong tributes.

Joseph Paul Muranyi was born Jan. 14, 1928, in Martins Ferry, Ohio, and grew up in New York. After serving in an Air Force band, he attended the Manhattan School of Music and Columbia University.

His marriages to Hannah Brahinsky and Donna Slocum ended in divorce. Besides Jorun Hansen, whom he married in 1996, survivors include two children from his second marriage, Paul Muranyi of New York and Adrienne Fuss of Larchmont, N.Y.; and two grandsons.

After Armstrong’s death, Mr. Muranyi performed with trumpeter Roy Eldridge at Jimmy Ryan’s and also with the World’s Greatest Jazz Band.

In the mid-1980s, Mr. Muranyi helped form the Classic Jazz Quartet with guitarist Marty ­Grosz, trumpeter Richard Sudhalter and pianist Dick Wellstood. New Yorker jazz critic Whitney Balliett once called it “fresh, tight, swinging and witty” and “a summation and a reworking of the best small-band jazz from the twenties to the early fifties.”

Mr. Muranyi told Balliett that Grosz initially “came up with a name — the Bourgeois Scum — but we settled on the Classic Jazz Quartet.”