RICHARD MALTBY Jr. can't be blamed for the sorry state of the Broadway musical these last 20 years. Although he and composer David Shire were writing musicals through much of that period, none made it to Broadway. So Maltby's conscience is clear.

But thanks to "Ain't Mishehavin'" and the era-striding genius of Fats Waller, Maltby is not likely to escape so easily when it comes time to assess the next 20 years of the Broadway musical. He's going to be in it up to his ear lobes.

He was paid $300 for his services as director, additional lyricist and midwife when "Ain't Mishehavin'" was first concocted a year and a half ago at the Manhattan Theater Club. He spent the money on costumes for the show, which was performed, he says, "on a stage the size of your desk."

Three months later, "Ain't Misbehavin'" opened on Broadway, in time to win a Tony Award for Best Musical of the 1977-78 season. Now the "first national company" is collecting nearly $150,000 a week at the Warner Theater here in Washington (where the engagement has been extended through Aug. 4 to keep the dollars flowing). The original company remains in New York, also doing six-figure business. The London company, fittingly, is in London. The second national company is in Miami. A third national company will open in Los Angeles in September.

After years of trying to be original, Maltby finally has struck it rich as an adaptor of somebody else's material - whcih means, according to the strange but immutable laws of show business, that he now will have a far easier time marketing his own work.

Does that strike him as ironic? "Sure it deos," he says, "but then life astonishes me every day. I've given up trying to understand anything."

Educated at Exeter and Yale, introduced to Broadway and cafe society by way of his father, a successful band-leader, Maltby belongs to the Cole Porter/Ivy League school of theatrical whiz kid. He lives - and lives well - on Manhattan's Upper West Side, with frequent excursions to his converted barn and 300 acres of property in Lakeville, Conn. His wife, Barbara, works as a script adviser for Robert Redford. They have two subteen-age sons.

But for all his open-collared, youthful prosperity, Maltby's career was a slippery and nerve-wrecking ascent, as he describes it, until about six years ago.

He and Shire had had the good fortune, in 1961, to go see an "unknown singer" named Barbra Streisand at New York's Bon Soir club, hoping her voice and their material might suit each other. And three albums later, a considerably less unknown Streisand started recording such Maltby-Shire numbers as "Autumn," "What About Today?" and "The Morning After."

But while the Streisand hits helped sustain a comfortable standard of living, they left Maltby deeply dissatisfied. He wanted a Broadway hit, and in half a dozen attemptes had never even come as close as a Broadway flop.

Shire, on his own, became a successful Hollywood composer, doing the scores to "All the President's Men," "The Hindenburg" and "Norma Rae," as well as some lucrative "connective music" for "Saturday Night Fever."

"He's going to make or has made $3 million for the ['Fever'] album," says Maltby.

The key move in Maltby's own professional turnaround was his decision to become a director.

He became a diretor by process of elimination. He was the one being eliminated, gradually and systematically, by the other directors hired to usher his work before the public.

"I was having a great deal of difficulty functioning as a songwriter," he says, "because I couldn't deal with directors, because I would just give up or feel so miserable fighting for what I wanted. . . . I would sit back and watch the stuff not happen on the stage. I went into analysis and crept up onto the notion that, from the start, my impulse was to be director."

It stands to reason. You pay to be analyzed, after all. You are paid to direct. In analysis, you relieve a lifetime of being pushed around. As a director, you wipe all that out in a blaze of pushing other people around. Directing could be the universal therapy. It is "I'm okay . . . Hey, you! Downstage! Take your hands out of your pockets!"

Unfortunately, there is a theoretical lid on the number of directors in any given society. No one has worked it out to a precise formula, but intuition suggests that when the ratio of directors to actors, stagehands or theatergoers rises beyond a certain level, trouble looms.

So how does one become a director? "I just announced to myself that that's what I wanted to do," explains Maltby.

He also, obviously, had influential friends who did not find the notion inherently ridiculous. One was actress Geraldine Fitzgerald, with whom he had worked on a new version of Marc Blitzstein's "Juno and the Paycock" (based on the Sean O'Casey play). Maltby went on to stage a nightclub act for Fitzgerald, and then the two decided to do "Lond Day's Journey Into Night," with Fitzgerald as Mary Tyrone, at Philadelphia's Walnut Street Theater.

"Long Day's Journey . . ." would be nobody's rational choice for a first stab at directing - even in Philadelphia. And as if the play itself were not sufficiently challenging, Maltby assembled a cast who, he says, "could barely speak to each other. They came from completely different schools of acting. They almost shouldn't have been invited to the same party, no less act in the same play.

"Actors always intimidated me," he says. "They always had problem I didn't understand. I lived in terror that any of them would find out that I had never directed before."

The strain was such that he didn't sleep for three weeks: "I'd lie in bed and watch the digital clock change."

Naturally, the production was a smash. "The show got incredible reviews and broke all their box-office records," says Maltby. "All the reviews said, 'What ensemble acting!' "

Success as a director led him, in fits and starts, back to lyric-writing. After several straight plays and assignments as an out-of-town doctor on the flop musicals "Georgy" and "The Selling of the President, "he came up with the idea of a revue composed of his and Shire's songs. The idea turned into "Starting Here, Starting Now," a hit at Arena Stage (being revived at The Belvedere in Baltimore, starting July 19).

During the run of "Starting Here, Starting Now," Maltby's friend Murray Horwitz, an actor and jazz lover, told him: "The next show you ought to do is Fats Waller."

"I said why?" recalls Maltby. "He said: 'Come down and I'll play you some stuff.' "

"I'm not particularly in favor of evenings that are tributes to songwriters or revues or nostalgia shows," says Maltby. "But somehow Waller was saying something to his audience. A whole philosphy of life: not taking things too seriously . . . laughing in adversity as well as good times and in effect saying: 'Do it! Eat the extra meal. Drink the extra bottle. Make love to the Extra woman.' And with such a sense of humor that you couldn't disagree with him. He makes you feel so good.

"The way he played the piano, he was constantly carrying on a dialogue with the audience. And our goal in the show was to try to translate that sense of humor, that philosophy of life into a theatrical event."

Waller's songs also were, says Maltby, "A direct statement to the audience, black or white, that we all share the same urges. He was the first black artist to have a national radio program, the first to leave rhythm and blues records and sell records to a white audience. He was the first black superstar. . . . I always say that his eyebrows broke the color line."

The original shoestring edition of "Ain't Misbehavin' " went into rehearsals with only the songs and a vague sense of the structure. Maltby says he had considered doing a book musical with someone actually playing Waller, "but in real life he had a poor second act." This is another way of saving that Waller drank a lot and died of pneumonia, aboard a train, at the age of 38.

So Maltby resolved instead on a revue format. Waller "was not going to be impersonated but conjured up during the course of the evening."

Maltby wrote his own lyrics ot three of Waller's instrumental pieces, and in one-case - "A Handful of Keys" - he used the song to define Waller's "stride piano" style: "First the right hand goes off with the melody I make up/And the left hand plays tricks with the rhythm/and both hands start picking it up," etc.

To show and magnetic "Jitterbug Waltz," he wrote this rapturous ballad of bleary-eyed romance:

The night is getting on,

The band is getting slow;

The crowd is almost gone,

But here we are still dancing.

Our feet can barely move.

My legs are yelling, Whoa!

But we're in such a groove

That love is still advancing.

And helped along by Arthur Faria's elegant choregraphy, Maltby staged the songs in "Ain't Misbehavin'" as miniature dramas, each with a strong mood, a conflict, a climax and a resolution.

The show as a whole has a free-flowing, random air, but it was pieced together with care, says Maltby: "I can tell you how it's structured and why it works. It's none of the audiences's business, but it keeps me honest."

Maltby has worked with all of the "Ain't Misbehavin'" road companies because, he says, "it's a very elusive show. The difference between its being wonderful and ordinary is a narrow one."

He is a tinkerer by nature, whcih shows not only in his direction and lyrics but also in his commitment to the art of puzzle-writing. Maltby composes a monthly crossword puzzle for Harpers magazine, continuing a career he commenced with New York magazine in 1971, after his friend Stephen Sondheim stopped writing their puzzle. "I became addicted to them; and when he decided to give them up, I asked if I could continue them because I hated the idea of them disappearing," Maltlby explains.

"It's something that lyricists tend to get into," he says. In both fields, "you're constantly slightly adjusting what you want to what will work."

One fondly remembered puzzle was shaped like a football field, with a seven-letter word on every 10-yard line, and the answers yielding the names of the winning and losing teams as well as the final score.

Maltby's favorite single clue was "The definitive manifestation of the human comedy is a crime," for the word "Manslaughter" (or "Man's laughter").

"They're not difficult, they're just arcane," he says. "These things are intended to make people feel inferior." They appeal to people who "know the language and happen to have a twisted mind."

His own mind, says Maltby, has been slowly untwisting since the shot of confidence he gained from "Ain't Misbehavin'."

With Shire, he is preparing to have another stab at an original musical, which Maltby also will direct (and refuses to characterize). "It's not some sort of egotistical thing that I want the whole show to be mine," he says. "It's simply that I want the line of the show to be one vision. Most shows fail, it seems to me, not because they're bad but because they're confused."

Lately, he adds, there has been a heavy burden on every show "not only to be a good show but also in some sense to be unique. There's not another show like 'Fiddle on the Roof,' like 'Company' or 'West Side Story' or 'Chorus Line.'" In the '20s, '30s and '40s, "they reproduced a form again and again."

Maltby and Shire will not try to buck the trend. "This show is intended to be unique," he says.

He gives his experience as a director credit for training him to think on his fee, and as a result "I have a good deal more confidence that it'll work out," he says, "that I don't have to know all the answers right now."

And there is a portly ghost, grinning benignly over Maltby's shoulder, who also gets a share of the credit.

"I have learned an awful lot from Fats Waller," he says. "I am an awful lot looser than I was before. I can kind of hear him saying: 'Man, don't worry about it, do it!'" CAPTION: Picture, Songwriter and director Maltby: "I learned an awful lot from Fats Waller." By Joel Richardson - The Washington Post