According to Steve Martin, comedy is not pretty. Sometimes it's not even funny. What is funny is how many performers have released comedy albums lately. In the past few months there have been records demonstrating a wide range of styles and comic philosophies and offering some cogent perceptions.

To say that comedy simply makes people laugh is to gloss over the essence of the art. Our humor is a large part of the social conscience and our laughter is born of fear and truth, two inevitabilities that otherwise might prove impossible to handle.

Comedians point out our insecurities and allow us relief with the knowledge we are not alone in life's leaky boat. The humor expressed in recent comedy records also serves a historical purpose in providing a contrast to earlier releases that often sought only to make us laugh at someone else's mother-in-law.

Probably the most representative package is "25 Years of Recorded Comedy" (Warner Brothers, 3BX 3131), a triple-record anthology featuring some of comedys greatest hits. Included are the classics (Carl Reiner/Mel Brooks; Nichols and May), the short-termers (Allen and Rossi; Allan Sherman), the old-timers (Shelley Berman; Bill Dana), and the crazies (Monty Python; Stan Freberg).

What "25 Years . . ." purports to do is bring together some of the funniest moments on record. It succeeds, but there is much more here than just an index of funny people.

Listening to Bill Dana's Jose Jimenez points up how far ethnic humor has extended its boundaries since we laughed at Dana's accent in 1961. Within the same jacket is Richard Pryor satirizing his own blackness (and thus, blackness in general) and Cheech and Chong doing their rock 'n' roll Chicano jive talk circa 1973. And Cheech and Chong already sound dated.

Political humor, now accepted as the norm (even Jody Powell does oneliners at press conferences), comes crashing back to basics in "Economy Lunch." An excerpt from Vaughn Meader's "First Family" album, the 1962 hit was then considered the ultimate blasphemy.

What is alarming is that the near-perfect impersonations still hurt; the routine has never regained its humor 15 years after John Kennedy's death. Meader has virtually disappeared (he reserfaced briefly last year with a Jimmy Carter family album), but his importance in breaking some comedic taboos should not be overlooked. He made it possible for people like David Frye, represented here by "Prologue/The Dick Nixon Show," and for others' more pointed tracts.

Three highlights are the bits by Stan Freberg, Monty Python and the Firesign Theater, primarily because all three acts always created truly aural comedy. Freberg's humor is geared to records and Firesign's work is even more technically sophisticated. Monty Python's "Argument Clinic" is zanier but gives the same attention to the possibilities of comedic sound as the others.

"25 Years . . ." also includes excerpt from "Pardon My Blooper" and Eddie Lawrence's famous "The Old Philosopher" (". . . is tha what's troublin' you, Bunkie?") besides two pieces that deserve special attention.

The first, Lenny Bruce's "Religions, Inc.," gives evidence that Bruce was probably the best of the unfunny comedians. Bruce uses a confrontation method of humor, a bitter-is-better labeling of middle-class paranoia, which still sounds angry and terse.There are a few laughs here, but they are a nervous reaction, an edgy acknowledgement of a provocative mind. It is not hard tracing the Brucian approach to Richard Pryor's "Greatest Hits" (Warner Brothers, BSK 3057) and Lily Tomlin's "On Stage" (Arista, 4142), while Steve Martin's "Let's Get Small" (Warner Brothers, BSK 3090) is so commercially popular partly because it sticks to a more conventional (read "safe") presentation.

The other mini-milestone is "Deteriorata" from the first National Lampoon album. National Lampoon established that sick humor may not be pretty, but is often very funny.

From the National Lampoon magazine came "Deteriorate" and then more records and several touring companies that begat Chevy Chase and John Belushi, which begat more troupes (like the one that appeared recently at the Cellar Door), which just begat a new album: "That's Not Funny, That's Sick!" (Label 21, IMP-2001).

None of the players who performed in Washington Appears on the record (though some of the bits do) but "Saturday Night's" Bill Murray is one of three featured writers and voices. "That's Not Funny . . ." has all the ingredients necessary for a cult classic. Much of it is so filthy that no radio station can play more than a few scattered lines. Its commercial potential was considered so risky that no record company would distribute it until the American arm of import specialist Jem agreed to put it out under the Lampoon's own label. Last, but far from least, some of the record is hysterical.

A good percentage is so outrageous that even the most liberal listener sometimes feels guilty about holding his sides. Lampoon's confession-booth priest and phone-in radio announcer say everything you always wanted them to say but were afraid to ask for. In short, bad taste proves too funny to be dismissed as fringe. In fact, the pattern of artistic development is that the fringe moves toward the mainstream while a new avant-grade emerges. The problem with "That's Not Funny . . ." is that it's so base that there doesn't seem much room left for future avant-garde shock.

All good comedy offers a sociology lesson as well as some genuine laughs. Even those who like their humor a bit more predictable can tune in Bill Cosby's "Bill's Best Friend" (Capitol, ST-11731) or "The Family That Plays Together Gets On Each Other's Nerves" (Warner Brothers, BSK 3082) by Erma Bombeck (the author). No one, though, should have an excuse not to smile.

Take these albums. Please.