IF WE READ the signals right, the Fourth of July celebration which the Smithsonian Institution is catering for the public this weekend may be a step or two ahead of the times. The festivities have a grand dance component, consisting of performances, but of social dancing. Live bands are on hand and dance instructors as well, for a three-day drag emphasizing audience participation, and working backward from the dances of the '40s to those of the last decade of the 19the century. The bash began last night, and continues through tonight and Monday evenings.

It may be a harbinger of a return to the cheek-to-cheek era. A fad for "tea dances" has cropped up in a number of cities almost simultaneously. New Orleans appears to be in the midst of a Fox Trot revival. Ballroom dancing in general has been on the upswing in the past several years, and even classical ballet is paying renewed attention to the Waltz, as recent works by Jerome Robbins, Eliot Field and now George Balanchine have shown.

This new turn of events can be looked upon as a backward swing of the pendulum from the extremes of the rock phenomenon. It's of a piece with the conservative drift of the times, the new penchant for "normalcy" and established forms.

In some resspects, what happened to social dancing in the '60s appears to have been the terminal point in an evolution of social forms as old as Western civilization. Social dancing in ancient and medieval times was predominantly a choral or group affair. Numbers of people moved together in rows or circles or chains, and the formations mirrored the bonds of community, commonly shared feelings being expressed by all in the same way at the same time.

With the increasing assertion of the importance of the individual during the Renaissance, choral dances gave way to couple dances, which have remained ever since the characteristic mode of social dance in Western societies. At first, the couples dances within strictly regulated group patterns, with few distinctions between male and female stepps. As society loosened the bonds of authority and granted more liberty to states and citizens, dancing gained freedom upon freedom.

The process was accelerated in the 20th century by the influence of non-Western dance idioms, particularly those assimilated from blck Africa, the Caribbean and Latin America. A new concept of rhythm and a thoroughly liberated torso transformed the look and feel of popular dancing from the days of the Tango to those of the Charleston and the Cha-Cha.

The radical '60s, however, carried the development tot a nihilistic brink. With the Twist and later dances spawned by the age of rock, a strange isolationism set in. Couples danced together, but no longer in close embrace, or indeed in any kind of bodily contact. In what Tom Wolfe aptly called the "Me Generation," each of the partners was tuned in separately to his or her own wavelength, and the principle of individualism had reached the end of the line.Meanwhile, the dancing itself had discarded almost every vestige of formal restraint. "By the time we got to Woodstock," as Rolling Stone's manual "Dancing Madness" put it, "dancing was a formless expressions of ecstacy instead of a structured sequence of steps."

It is this form that the present dance generation seems to be in retreat. It started in the discotheques a few years ago with the advent of the Hustle, and a flock of other new "touch dances" including the Bump and Salsa. "The Social Dance Position may have been before your time" explains "Dancing Madness" in its Hustle instructions, to readers for whom the Fox Trot may be prehistoric legend. "The man and woman (or any modern combination) face each other, the woman's left land resting on the man's upper arm, the man's right hand on her wrist . . . " Old fashioned togetherness is back in.

As a barometer of cultural tendencies, social dancing has passed through innumerable crises down through the ages. In the wake of the horrific devastation of the Black Death in Europe of the 14th and 15the centuries, there were myriad outbreaks of "dance mania" involving hundreds of participants swarming the streets in mass convulsions more violent by far than the funkiest of rockfests. The reports tell of grostesque raving and grimacing, wild screaming and leaping people foaming at the mouth and thrashing for hours until they droppepd from exhaution.

Every new shift of dance custom, too, was apt to be regarded as a threat to civilization. We've come to think of the Viennese Waltz as the epitome of romantic grace and sentimentality. It's sobering to recall that when it was new, it was condemned as lascivious perversion, and officially banned by church and state. Upon its appearance in English royal circles in 1816, the Times of London had this to say:

"We remarkekd with pain that the indecent foreign dance called the 'Waltz' was introduced (we believe for the first time at the English court on Friday last. This is a circumstance which ought not to be passed over in silence. National morals depend on national habits: and it is quite sufficient to cast one's eyes on the voluptuous inter-wining of limbs, and close compressure on the bodies, in their dance, to see that it is indeed far removed from the modest reserve which has hitherto been considered distinctive of English females. So long as this obscene display was confined to prostitutes and adultresses we did not think it deserving of notice, but now that it is attempted to be forced on the respectable classes of society for the evil example of their superiors, we feel it is duty to warn every parent against exposing his daughter to so fatal's a contagion."

It's an odd paradox that despite the sexual connotations of the movement and music in rock dancing, the insulation of the partners suggested a kind of autoerotic somnambulism, in which every distinction of gender was erased. This was unisex dancing, and it was something truly new in history.

It was new, but its day has passed, and the dancing enthusiasts of the '70s seem to be yearning for something more.

It is just this impulse that the Smithsonian's Fourth of July fete is calculated to serve. Last night, the theme was the Big Band sound, and Walter Salb's Time Was Orchestra played hit numbers of the '30s and '40s, while the art of interbugging was demonstrated and taught. Tonight, from 6:30 to 8:30 on the East Terrace adjoining the Museum of History and Technology, Art Calevas and his band will play music from the period 1910 to 1930, and Larry Weiner will demonstrate the Charlestonz, along with Balkan, Greek and Middle Eastern folk dances brought to these shores by the immigrants of that era. Finally, on the Fourth itself, at the same time and place, William Neelands will teach all comers such Victorian ballroom favorites as the 3-step, the Waltz, the Mazurka, the Schottesche and the Polka, with Charlie Cliff and his Orchestra providing the music. It's all free. Onward to a glorious past.