Sociologists can argue, and will, about the value and validity of "Middletown," the six-part public TV documentary premiering tonight, but its worth as television seems well beyond all doubt. It is a tremendous and important accomplishment, but it also looks to be a stirring, even magnificent, viewing experience, a vigil at the crossroads that is not only great television, and great Americana, but great drama--so great as to make many works of fiction with similar themes and settings look trifling and transparent.

"Middletown" grew out of the pioneering studies of Muncie, Ind., in the '20s and late '30s by sociologists Robert and Helen Lynd; their quest to isolate and examine a "typical" American city probably inspired the fictional fantasy "Magic Town," an MGM satire about a burg whose residents go bonkers when they are pronounced the ultimate in average by a conniving pollster.

How Muncie will deal with the attention and notoriety that will rain down on it again after the TV "Middletown" remains to be seen, although the first program in the series, "The Campaign," at 9 tonight on Channel 26 and other public TV stations, is by and large a benign vignette. That hardly makes it innocuous, however, although Peter Davis, who produced and conceived the entire series, and Tom Cohen, director of the 90-minute premiere, may themselves have underestimated the power and the charms of this chronicle when they started the film in 1979.

On the surface, they were faced with a seemingly mundane campaign for mayor of a middle-sized American city. There were no issues to speak of--at least, neither of the candidates spoke of them. But the story unfolds seductively; it becomes a real-life "Last Hurrah," a comment on American grass-roots political change that is disheartening but fascinating, and a profoundly affecting study of the people involved. Best of all, the filmmakers do what the best documentary filmmakers have always done; they tell the story so well that it seems to be telling itself, and so filmically that no linear representation of it can do it justice. There is no narration (the standard for all six programs in the series) and there is no overt prodding.

Citizens of a national capital might be inclined to sneer or snicker at a film about midwestern politicos, but all those three-piece suits on Capitol Hill could do worse than to pull themselves away from their mirrors and polls and get a good look at the real world out there (See--human beings in a natural habitat!). Network journalists could learn a thing or two about relaying information through actual use of the tools of their trade: the camera and the microphone and the edit.

We meet the candidates right off: James Carey, the Democrat, a bustling, bulbous old-time glad-hander who, in the pursuit of votes, kisses men, women and children--almost anything that moves; and Alan Wilson, the button-down Republican, a slicker, slimmer, far more presentable figure who appears to stand for some sort of reform. At least he wasn't brought up on charges, twice, for mischief in office (malfeasance, bribery) as Carey was when he served as sheriff, though he was acquitted both times.

The candidates work the city, at one point racing down the street in beds pushed by supporters. Carey visits the city's slummish "Shed Town," where residents complain of rats from nearby construction. Wilson, coached and coaxed by advisers, makes radio commercials ("You're really getting undertakerish with this thing," warns an aide) and peddles his brochures in tidy white neighborhoods. Carey and his current wife show up for services at a black fundamentalist church, where the minister says of him, "Truly, this man loves everyone."

At first, one is drawn to Wilson; he's so streamlined and no-nonsense, and here's this outlandish character Carey barnstorming around like something out of Al Capp. Subtly, one's perceptions change. Carey speaks to a high school civics class and is asked about his colorful political history--the charges brought against him in 1959 and 1962. After recounting his version of what happened, he adds, his eyes getting moist, that "in 1962, my wife took her life." It's a decisive moment, although the sad little cynics of the class later scoff at him, mistaking his show of emotion as "a big front."

It's at this point one may find oneself becoming a Carey supporter for life, and not just because the students are such foul little heathen, either. Carey as an American archetype takes on resonances that become all but deafening--so, in a less encouraging way, does his opponent. Wilson haggles with his advisers as the election draws near (they tell him what he said wrong, and he says, "That's what I was told to say before"); on election day itself, Carey's car runs out of gas on the way to the polls. He and Wilson share a brief cold meeting at one precinct, and Wilson later scowls to a supporter that he finds Carey's habit of kissing constituents to be "nauseous."

It would be cruel to reveal how this terrific political thriller ends. What makes it particularly gripping is that it keeps eliciting unexpected responses with the kind of manipulation that isn't insulting. One small confession may be in order here, however, in support of my own reaction to this program: It brought back to me incomparably happy memories of city politics in my own home town, and of the best man I ever knew, my father.

If "Middletown" begins on a bittersweet--yet somehow lovingly affirmative--note, it ends very bleakly, in six weeks, with "Seventeen," an unremittingly grim two-hour look at the love lives and hate lives of working-class teen-agers at a Muncie high school. "Seventeen" is not only grim, it's become something of a hot potato. Lawrence K. Grossman, president of PBS, flew into a rage after producer Davis, Grossman alleges, showed the film in advance to a corporate underwriter, Xerox; the company, supposedly apoplectic at the abundance of filthy language in the show, announced it was dis-associating itself from the series, though its $600,000 is already in the kitty and nonrefundable. Basically, disassociating means Xerox won't run any big newspaper ads urging folks to tune in.

Grossman also wanted deleted a 4-minute, 7-second scene near the end of "Seventeen" in which a teen-age boy, sitting on a car, brags in explicit detail about some of his sexual conquests. As a compromise, PBS will make an edited "Seventeen" its official feed of the show, but will also make the unedited version available to stations that wish to run it. The program is so permeated with foul talk--these are teen-agers, after all, and grubby ones at that--that Grossman's furor does seem misplaced and potentially damaging to the project.

Davis said yesterday from New York that Grossman has been acting irresponsibly. "No one could have been more surprised than I when he began his sanctimonious fusillade against the film and against me, personally," Davis said. He called Grossman "wrong on every count," said the two have yet to speak to one another, and denied he had screened the completed film for Xerox, as Grossman charged. Davis said Xerox officials had asked if there was rough language in any of the other films as there is in "Campaign" (only a smattering, nothing to get excited about), and at that point Davis warned them about the authentic but potentially offensive glossary of profane and scatalogical expressions in "Seventeen."

This skirmish over mere words should not be allowed to detract from the worth and impact of the "Middletown" project. Davis, whose documentary credentials include "The Selling of the Pentagon" while at CBS and the passionate but didactic "Hearts and Minds" as an independent producer, has done a spectacular job with "Middletown," as have such associates as Cohen, who in addition to directing "Campaign," produced and directed the fourth installment, "Family Business," which will be seen April 14 and which should make a national hero out of Howie Snider, a retired marine colonel who is trying his darndest to operate a Shakey's Pizza parlor, with the help of his wife and eight kids, in Muncie.

What an accomplishment "Middletown" is, and how emphatically it denies that the documentary is a dying form. Only the dull documentary is dying. The CBS News production of "The Defense of the United States" may have been an epic documentary, but "Middletown" is a documentary epic. It raises standards by about 75 percent; the filmmaker's cameras seem to have been as unobtrusive and revealing as those of filmmaker Frederick Wiseman ("High School," "Hospital") but the films that have resulted are far more accessible and have a much more identifiable narrative shape.

Davis says he is not submitting "Middletown" as a portrait of the typical American city. "We make no such claims at all. We went to Muncie because it had been used before. But we were never after 'typical' people or 'typical' situations, though I think what we found is often representative of much of the rest of the country." What is the point of "Middletown" if Muncie is not meant to serve as a microcosm? "The point is to try to convey human experiences that will encourage people to look at their own lives in a fresh way, by seeing other people go through traumatic or pivotal moments."

Among the first sights in "Middletown"--after cellist Janos Starker's melancholy rendition of "Back Home Again in Indiana"--is a Coca-Cola sign that says, "Welcome to Muncie! It's the Real Thing!" Welcome to "Middletown." It really is the real thing, and probably a landmark in the life of American television as well.