STACY KEACH, who has played Hamlet three times in his career while preferring Falstaff, or better yet Cyrano do Bergerac, now faces a year-long run as the title character of a lighter-than-air musical -- "Barnum," which opens at the Kennedy Center Saturday.

The role of Phineas T. Barnum calls for high-energy nightly bouncemanship, along with a certain skill on the high wire and not a little vaudevillian singing and dancing. It is a long way from Shakespeare or the Yale School of Drama (where Keach once taught a course on the scholar as critic), and that is just the idea.

Barnum is intended as a cure for a professional phobia Keach seems to have contracted after years of good reviews in the sterling repertory: Fear That Audiences Will Take You Seriously and Stay Away in Droves.

"I used to get that classical actor stuff all the time," he said, grinning as if in relief. "'Oh that Keach, he's a real classical actor. Don't cast him for this, don't cast him for that, and we wouldn't ever want him in a comedy.' But I think Barnum will help a lot with that."

"Of course, everybody has their problems," he added. "Henry Winkler is a great friend of mine. He says that once you establish a really popular character like the Fonz, you go out of your way to prove you can do classical things, too."

He is an attentive luncheon companion, energetic and forward-leaning. His clothes, a random assemblage of blacks, seem more theatrical than the man they clothe. His hair is -- somewhat in disarray. There is the mustache, and the well-known harelip beneath. He is about six feet tall, but with tiny feet, which are clad this day in Capezios, for he has been working out on the tightrope. He is bright-eyed, interested, fidgety, anxious to be likes.

He wants to talk about "Barnum." How he's been scared to death to sing. How he's learned to walk on the wire by the trial-and-error method, which is more a trial than a method. How the "Barnum" script is designed to accommodate a fall. How the juggling was fairly easy to learn and how, yes, he is quite ware that the role of Barnum is -- how do you say -- pure entertainment?

"Well, sure, the book is thin," is how he put it. "'Light on subtext,'" he added, laughing as a man who has been O'Neilled and Pirandelloed within an inch of his professional life.

Keach's acting credits run to four double-spaced pages. Before his professional debut as Marcellus in "Hamlet" with the New York Shakespeare Company in 1964, he ran through 19 productions that took him from the University of California (Outstanding Graduate in Drama 1963) to Tufts to the Oregon Shakespeare Festival to Yale. He was a Fulbright Scholar in London. By 1967 he'd won an Obie for "MacBird" on off-Broadway. A year later he made his movie debut, in "The Heart Is a Lonely Hunter" and went on the "Brewster McCloud" and "The New Centurions" (1971), to the punchy fighter Billy Tully in John Huston's "Fat City" (1972), "Gray Lady Down" (1976) and "The Long Riders" (1979). He was Capt. Ball in CBS' "A Rumor of War." Now, the Shakespeare all but leached away, he'll be opening soon in Cheech and Chong's latest, "Nice Dreams," with a reprise of his Sgt. Stedanko role from "Up in Smoke." Stedanko is a crew-cut, polyester-clad narcotics officer and stooge. s

"I love Sgt. Stedanko," Keach said."It's comedy, and comedy is what I want to do."

With all those stage credits, what is he best known for? "Well, I guess for 'The New Centurions,'" he said. "And -- this may surprise you, but it makes my point -- for 'Caribe.'" "Caribe" was a short-lived Quinn-Martin series that ran on ABC in 1974. Keach played the part of Officer Ben Logan.

"I was dead broke," he explained, "completely busted. When I took the job, all my friends stopped calling me. They thought I'd sold out. 'Caribe' was a traditional cop show, like 'Kojak' or 'Baretta.' Instead of a lollipop or a bird, the gimmick was that Ben Logan played with a puzzle all the time.

"Actually, it was pretty good. I had a black partner, which was good. It was all shot in the Caribbean, and when we say all the real-life stories going on down there we said, 'Hey, let's get some of this into the scripts. Send some writers down.' But no, that wouldn't do for the escapist market."

"Caribe" lasted one season, and failed to have the magic effect of popularizing Keach's image. But it's "Caribe" that gets him recognized on the street, not Shakespeare.

"The fact is," he said unapologetically, "that in America being a great Hamlet is not as important as being a great Barney Miller."

"Barnum," Keach goes on, is sure to be popular. Jim Dale, who will continue as the star of the Broadway company, has been widely noticed in the role. "'Barnum' could kick off a whole new thing for my career," Keach said. "It's pure energy. The character is like a rainmaker, you know? He's an Elmer Gantry."

"But Barnum, you know,is really something an American actor can get into. It all hinges on one word -- humbug. It's a literary conceit, and a literary conceit is very difficult to convey to an audience. For example, Barnum's wife considers humbug to be merely lies. But he says: No! Humbug is a dream! Thomas Jefferson was humbug with a vision. But Barnum can also see the other side of his own argument. At one point he's interruped, and he calls out, 'Don't bother me now; I'm lying to my wife.'"

Mention "The Long Riders" and Stacy Keach's eyes light up. The film of 1979, which played Home Box Office last month, was his first venture into production. It retells the bloody story of the Jesse James Gang with style, and was received by many critics as a modern classic of the cowboy genre. Its cast relies almost exclusively on four sets of brothers: James and Stacy Keach, Randy and Dennis Quaid, Nichoas and Christopher Guest, and Carradines Keith, David and Robert. It is perhaps a measure of Keach's filial amiability that James Keach got to play Jesse.

"You know we worked for seven years to get that movie out?" he said. "We had the brothers picked for four years, and then we finally got the script accepted and got Walter Hill to direct. A lot was changed along the way, and I haven't seen the money yet, either."

Keach, of course, has points on the gross. That means he gets a percentage of the movie's profits, after expenses. The studio traditionally keeps the books on such matters.

"Well, I'd like to do my own audit, of course, but it's $600 a day, and would probably cost $25,000 to check their bookkeeping. Anyway, we have a sequel coming up. About 25 percent of the movie was left over, and I hope we can use a lot of it. As for a script, no problem -- we can just use the original script."

Occasionally, while speaking about popular entertainment, Keach slips into introspection. He speaks of film actors as often "nothing more than behavioral models" for directors, who choose them as they please. Of how film is "ultimately a feeling on the part of the director, a reproduction in pictures of a feeling he has." Of how, in the relationship between the ego and the idea, the ego must survive the destruction of its own bad ideas, yet still retain control of the good ones.

"Tragedy is when talented people become indifferent," Keach said offhandedly. "I'll tell you something else they don't teach at Yale Drama School, but I tell it to kids all the time. And that is that at the moment of your greatest success, your biggest hit, your highest attainment, you're facing a valley. It's that valley you've got to survive. It's surviving those valleys taht makes the career."

But Keach is not interested in being serious. The heck with it. Today he is to be married to Jill Donohue, a designer whose father was the actor Jack Donohue. "Cheech and Chong's Nice Dreams" will be opening next week, bringing his Sgt. Stedanko back to your neighborhood movie theater. Also to be released soon are "Butterfly," a drama about incest that also features Orson Welles, and an Australian picture called "Road Games," which he did with Jamie Lee Curtis. He has just closed "Barnum" in New Orleans, and after the run here the show will take him to Chicago, Los Angeles, Dallas, Detroit.

"I bet I'll fall off the wire in Washington," he said. "I'll try three and not make it. And you know, I have to take a bow on the wire, too. But that's the fun for me as an actor -- getting to do things you haven't done before."