PUTTING together a [WORD OMITTED FROM TEXT] jazz festival is not exactly cakewalk.

It almost takes a magician to devise a compatible line-up of artists, juggle the schedules of performers and settle on a workable festival budget. And even after that, you still have to hope for the best.

That is why the Wolf Trapp jazz committee tapped former Modern Jazz Quartet member John Lewis as artistic director for this week's four-day International Jazz Festival, starting Tuesday and running through Sunday with a break on Friday, July 4.

Lewis knows the difficulties, and he took the job reluctantly. "I didn't want to do this," he says. "I'm a musician, a player. I'm doing it because I've got friends on the committee."

Two other persons were in the final consideration for artistic director, according to Wolf Trap Executive Director Craig Hankenson. But, he says, "We wanted John because of his experience with festivals in Europe and America." Lewis, 60, has been artistic director of the Monterey Jazz Festival for 22 of its 23 successful years.

Lewis says organizing the Wolf Trap festival, budgeted at $200,000, is more challenging than Monterey. "I don't have to work as hard out there," he says, "because there are experienced people doing things out there. This is all new at Wolf Trap, but I've been surprised by the drive behind the festival."

Says Hankenson: "Last year's festival was very commercial. So this year we wanted something special."

The committee also selected coordinator J. Foster, who has the job of supervising the logistics of the event. While Lewis selects the performers and fashions a festival theme, Foster must deal with the nuts and bolts of negotiating with performers, arranging for their transportation and finding them places to stay. Foster produced the Washington International Jazz Festival in 1962. Most recently, he was director of the Los Angeles County Music and Performing Arts Commission between 1974 and 1980.

Last-minute cancellations have caused headaches for both Foster and Lewis. Dancer Gregory Hines bowed out because he got a chance to replace Richard Pryor in a movie. The American Dance Theatre also canceled after running into a conflict with a Japanese engagement.

Hines was replaced by Honi Coles. Lewis and pianist Hank Jones will replace the dance group on the Sunday night program.

Another problem was finding available performers at the busiest time of the year -- the summer festival season -- for jazz musicians. Many artists were booked months in advance for other fetes. "I wanted Weather Report," Lewis says. "But they were already booked to go to Japan."

Nonetheless, Lewis has organized a panorama of superb performers (several from overseas) which touches on most major jazz developments -- big bands, small groups, modern and traditional, fusion and symphonic.

"The festival committee wanted the event to be international," Lewis says.

"We should try and reflect, if possible, other music that's been influenced by jazz. We're trying for that in the first night." So, on Tuesday night, Sarah vaughn and Polish pianist Adam Makowicz will be featured with the National Symphony Orchestra. She'll sing popular standards, and he will perform Gershwin's "Rhapsody in Blue."

Other featured performers will include Dizzy Gillespie, Stephane Grappelli, Buddy Rich and his Orchestra, Billy Eckstine, Count Basie and his Orchestra and avant-gardists Cecil Taylor and Ornette Coleman. Coming from abroad will be Swedish soprano Alice Babs, Japanese vibraharpist Takashi Ooi, French pianist Martial Solal and American expatriate Kenny Clarke. Also appearing will be local performers Bill Harris and Buck Hill.

Wolf Trap is running the whole show and controls all rights. A small video firm had hoped to tape parts of the festival but failed to obtain funding. So, for the time being, there are no plans to record the event. If the performers play to capacity audiences every night, that means a total attendance of almost 20,000. "We don't know what to expect," Foster says.

Besides the nightly programs, there'll be two simultaneous afternoon jam sessions on Saturday and Sunday between 2:30 and 5:30. The personnel at each location will change each hour. The model for this idea was the Nice Jazz Festival, where three different seven-hour jam sessions are held over a 10-day period.

Says Lewis: "Jam session in this context doesn't mean anyone can come up and play." Instead, he is talking about those few musicians still alive who "can play with almost anybody. There are not too many of those left. The music has become so specialized that there's no longer a common literature among all the musicians."

The performers he's recruited for these sessions include Harry "Sweets" Edison, Billy Taylor, Clark Terry, Richard Davis, Shelly Manne and Eddie "Lockjaw" Davis.

But the event Lewis calls "my baby" is the Gillespie retrospective, in which Medium Rare, the New England Conservatory band, will perform pieces originally played by the 1946-47 Gillespie Orchestra. Soloists will include Gillespie, saxophonists Sonny Stitt and Jackie McLean and trombonist Slide Hampton.

Lewis, bassist Ray Brown and drummer Clarke, who comprised the rhythm section in the original band, will perform.

"For me," Lewis recalls in his well-measured cadence, "the band paralleled what Charlie Parker and Dizzy were doing with the small group -- the virtuoso things. It is the only new thing that has happened in big jazz ensembles since Ellington, Fletcher Hendersen, Jimmie Lunceford and Basie.

"At the time that Dizzy started that band in 1946, there weren't very many musicians who were really technically or stylistically equipped that they could do that. They were doing something new then. Now, however, those contributions have become kind of common property of all musicians. Everybody is influenced by what they did."

The Gillespie retrospective will feature performances of four old arrangements of pieces like "Things to Come" and "Round Midnight," both of which sounded futuristic in the 1940s, and Slide Hampton's new arrangements of "Anthropology," "Shaw 'Nuff" and "I Can't Get Started."

Lewis thinks the night will be "unusually strong, even overpowering" because the program will also feature Babs, once described by Ellington as "a performer beyond measure. She can sing anything she sees or hears -- opera, Bach or jazz."

Though the festival features a broad range of styles and performers, from Jabbo Smith, who was prominent in the 1920s, to Coleman and Taylor, who came of age in the 1960s, it includes no representative of the latest developments in jazz -- from among artists like Anthony Braxton, David Murrary, James Newton, Chico Freeman, Anthony Davis, Muhal Richard Abrams.

Says Lewis: "I don't hear anybody [in that group] who is doing masterpiece work, which you can communicate to mass numbers of people. Also, I have to think about holding that audience there -- now that I'm getting nervous.

"I've listened [to the younger musicians]. I haven't heard anything -- just something new. Most of those things are not being incorporated into the language.

"It would be unfair to [younger musicians] to put them in a big, gigantic festival like this. You should put them somewhere where they'll be guaranteed that the atmosphere will be sympathetic." s

Reminded that he was possibly denying a forum to new musical developments in the same way that other people denied the Gillespie Orchestra almost 35 years ago, he said, "We were denied -- and deservedly so. We went out to play and didn't have any people. We did 90 one-nighters for dances. We didn't want to play dances. But there wasn't any other place to play then.

"We found a forum when we went to Europe in 1947. And then it was a whole other thing. We had 7,000 or 14,000 people at a time, whereas before we had 10 people, six people."

During its 22-year, splendid existence, Lewis was pianist and musical director of the Modern Jazz Quartet, the quintessential jazz chamber group in the 1950s and 1960s. After the breakup of the quartet in 1974, Lewis has been performing occasionally but has spent most of this time teaching. He taught at Harvard the summer of 1974, and for the last five years has been at City College in New York, teaching improvisation, small-ensemble jazz playing, a piano seminar and a jazz survey course.

Lewis says he had no models to use for his teaching. So he learned by trial and error. The most difficult aspect of jazz he says he's had to teach is the most important -- how to improvise on chord changes.

As artist-in-residence at City College, he is encouraged to perform as much as he can. So Lewis says he's about to step up his performing schedule. At Wolf Trap, he'll appear in a duet format with Hank Jones, whom he calls "a master jazz pianist. To me he's the best."

Lewis and his wife Mirjana live in Manhattan with their children, Sascha, 15, and Nina, 12. Mirjana teaches harpsichord privately now, but performed professionally before their children were born.