Lionel Hampton, whose hard-driving bands have excited dancers and theatergoers for more than 30 years, says he retains his enormous energy by being around music."

"Music motivates me," Hampton, 64, said yesterday, discussing his opening night performance at Blues Alley. "As long as I'm around good music and good musicians, I want to play."

Hampton apparently felt like playing on Tuesday night, when he demonstrated mucho of the fierce enthusiasm he's shown through the years. The standing-room-only audience caught fire and broke into a chorus of hand-clapping and sining in call-and-response fashion.

On some selections, Hampton moved quickly from vibraphone to piano (which he plays in "triggerfinger" style, using his two forefingers as if they were mallets) to drums. And he sand.

All the while, Hampton moved around his face lit up in a broad smile, occasionally licking his lips in enjoyment.

Hampton is heading a 10-piece group these days, a notch or two below the 17-or 18-piece outfits he led in the '40s and '50s. The ensemble plays pieces associated with Hampton - "Hamp's Boogie Woogie," "How High the Moon," "Midnight Sun" and, of course, the Hampton themem, "Flying Home."

Hampton's vibes playings was characterized by an infectious pulsation and graceful sense of melody, particularly in his wonderful renditions of "Avalon" and "I'm Confeesin' That I Love You."

Many in the audience attended because of vocalist Sandy Patton, who went from musical engagements around Washington at clubs like Mr. Henry's to become the Hampton band singer in February 1976. She concentrates on recent pop material such as "Feelings" and "A House Is Not a Home," both of which she sang the other night with passionate lyricism.

Sitting in with the group on "Flying Home" was organist-pianist Bill Doggett, a Hampton alumnus. The band played an arrangement, using some of the old riffs from the '40s, trumpets screaming and saxophones reeling off oiled passages. The audience responded with a standing ovation.

Much of Hampton's energy currently is being expended on a recording project he calls "Who's Who in Jazz." In it he records many jazz notables in optimum surroundings. He has cut a big band album featuring arrangements by Frank Wess and Frank Foster.

Other people he has recorded to plans to record include Dizzy Gillespie, Charles Minghus, Earl Hines and Teddy Wilson.ANd he has tapes of himself performing with the late Coleman Hawkins.

"I want to be sure that these musicians are recorded properly," he said. "And I want to be sure the blacks in music handle some of their won business. I want it to be known that we don't always have to depend on whites."

The series of albums will be issued on his Glad-Hamp label. The first release of the material is scheduled for December.

Hampton will be at Blues Alley through Sunday.