Ernie Royal, a trumpet player who was featured in a number of major jazz bands and who also played in the pit bands for several Broadway musicals, died of cancer Wednesday at Mount Sinai Hospital. Mr. Royal, who was 61 years old, lived in Teaneck, N.J.

He was playing with a well-known West Coast band led by Les Hite when he was 16 years old, and by the time he was 19 he was with Lionel Hampton. Later he played with Count Basie, Woody Herman, Charlie Barnet, Duke Ellington and Stan Kenton.

Mr. Royal, who was born in Los Angeles, settled in New York in 1953 and four years later joined the music staff of the American Broadcasting Company, where he remained for 15 years. Since then he had freelanced.

He is survived by his wife, Floria; a son, Ernest Jr., of New York; three grandchildren, and a brother, Marshall Royal, of Los Angeles, a saxophonist who was with Count Basie's Orchestra for more than 20 years. A funeral service will be held today at 2:30 P.M. at St. Peter's Lutheran Church, at Lexington Avenue and 53d Street in Manhattan.