As we look at the American presence from Tegucigalpa to Tehran and worry about the next headlines, the usual notes of national self-congratulation may be slightly muted these days. But whatever may be happening in our diplomatic, economic and military efforts, Americans have at least one reason to rejoice on this Fourth of July weekend: Our music is doing fine, at home and abroad.

The Moscow Philharmonic (of all improbable orchestras), for instance, has just recorded Aaron Copland's "Appalachian Spring" and Walter Piston's "The Incredible Flutist." American conductors, singers and rock musicians are dazzling audiences from Tokyo to Stockholm, and at home American musicians are busier and more appreciated than ever. More than one American composer has said in recent years that his music is more often performed and better understood in Europe than at home, but with the arrival of minimalism and neoromanticism, American audiences have also been warming to their own composers.

More meaningful than the power, prestige or financial success of American music is its embodiment of the national ideals that are vigorously proclaimed in July 4 rhetoric and largely ignored for the rest of the year. American music -- popular and classical -- has functioned as an ethnic melting pot, scorned class distinctions and exemplified our national hospitality to people seeking refuge from tyranny. And from this virtuous behavior, it has drawn its strength.

There is also a lot of pure creativity -- American composers such as John Cage and Philip Glass are developing new forms and techniques that find imitators all around the world. In outdoor concerts across America this weekend, the most conspicuous name may be that of John Philip Sousa, a man (a Washingtonian, by the way) who composed marches more fluently and beautifully than anyone else in history, using the traditional form as skillfully as its European inventors. But right next to Sousa on the music stands of our Independence Day bands and orchestras is Scott Joplin, who composed dozens of pieces in that same march tempo but gave the rhythm a little twist and called it ragtime. Between them, Sousa and Joplin epitomize what is distinctive in American music.

Like Sousa, our classical musicians at their best have imported traditional European forms. Sometimes, as in the highly abstract and rigorously structured music of Elliott Carter, Milton Babbitt or Charles Wuorinen, there has been nothing in the music itself to identify it as American. Other composers, like Joplin at the turn of the century, have taken forms from elsewhere and given them a distinctive flavor that is immediately recognizable as American. More often than not, that special flavor is rooted in a popular style, and the pop style usually has ethnic overtones -- today, most often, the flavor is black or Hispanic.

Sociologically, the American melting pot seems to have encountered quite a few unmeltable lumps. Musically, America has melted ethnic styles together with dazzling, sometimes bewildering thoroughness and variety.

Our music is as polyglot as the United Nations, and audiences, performers and composers alike move easily from one style to another. Ballads from Elizabethan England have been preserved in Appalachia; musical styles and techniques from Africa have been developed not only into Joplin's ragtime but into jazz, spirituals and gospel music, classical improvisations and a vast spectrum of pop styles. Music brought by new Americans from their homes in Poland, Ireland, Italy, Germany and Austria have contributed to the flavor of American music, popular and classical. The phenomenon once called "Tin Pan Alley" has grown into a continent-wide melting pot, a crossroads -- a place where many influences come together and interact, freely and creatively, producing such fascinating results as Cajun swing and third-stream music -- a merging of classical ideals with those of jazz, which is itself a meeting of African and American musical cultures.

The melting pot can be seen at work even in the work of Copland. He is easily the best-known living composer of serious music with a strong American flavor, and his folk roots seem purely middle-American. But Copland learned how to write his American kind of music from Nadia Boulanger in France and Carlos Chavez in Mexico. And when he was not producing homespun Americana in "Rodeo," "Appalachian Spring" or "Billy the Kid," he could serve up other flavors in "El Salon Mexico," the "Danzon Cubano" and a wonderfully nostalgic piano trio called "Vitebsk" that evokes his ancestral homeland in Russia.

Less well known than Copland but equally American and equally dedicated to ethnic flavors in his music is Alan Hovhaness, whose gentle, flowing, loosely structured works through the last half century may have provided one set of roots for the "new age" music that is soothing so many Yuppie sensitivities these days.

Another set of new age roots may be found in the improvisations of pianist Keith Jarrett -- music poised delicately between jazz and classical styles, and intensely American precisely because of this ambivalence. Its frequent impatience with musical class distinctions is one of the things that make American music powerful and interesting. Here as in Europe, there are purists in all styles who refuse to cross the invisible lines that set "good music" apart from all the rest. But American music has been enormously enriched by those who ignore the walls set up to divide "classical" from "popular" idioms -- men like George Gershwin, Leonard Bernstein, Charles Ives and Kurt Weill -- or Vladimir Dukelsky, composer of classical orchestral and chamber music, who also composed "I Can't Get Started With You" and "April in Paris" under the name of Vernon Duke.

"Porgy and Bess," "Rhapsody in Blue," the symphonies and chamber music of Ives and Bernstein's "West Side Story" all show the special color and vigor that can be found when popular and classical styles are merged in the hands of a skilled composer who loves both kinds of music.

Kurt Weill is a special case, because he is an American by adoption, driven to this country by the rise of Nazism in Europe. A student of Ferruccio Busoni, Weill had begun as a composer of concert pieces -- symphonies, a violin concerto, etc. -- before developing a new kind of musical theater ("The Threepenny Opera," "Mahagonny," etc.) in collaboration with Bertolt Brecht. In the United States he began a third career as a composer of Broadway musicals and movie sound tracks, helping to establish a new set of standards on Broadway.

But Weill was only one in a vast stream of European musicians whom Hitler or the Russian Revolution drove into America in the first half of this century. The names of those who settled here temporarily or permanently read almost like a Who's Who of midcentury classical music -- Stravinsky, Scho nberg, Hindemith, Milhaud, Rachmaninoff, Bloch, to name only a few. Their influence, as creative presences and sometimes as teachers, was incalculable. John Cage, for example, one of the world's most influential musical thinkers, was able to study with Scho nberg in California. Beyond the big-name composers, there are a lot of performers and teachers whose presence helped to transform the musical scene in the United States.

After a half century, more or less, the influence of this infusion of talent is still present and growing. America has become a leader of the world's music partly because, in the 1930s, it provided a refuge from persecution for some of the world's leading musicians.

There is a certain appropriateness in the relationship between action and reward in that transaction. And thinking about it may help to brighten an otherwise not so optimistic Fourth of July weekend.