The last time I was in New Orleans, I watched a funeral parade march by. About 30 musicians, serious of purpose but hardly solemn, walked down the street playing a joyous old tune to honor the newly dead. The drums and tuba kept the lively beat going, as a "second line" of stragglers and celebrants trailed behind.

I never thought it might be an early wake for the aging grande dame of a city herself. With New Orleans flooded and falling into chaos in the aftermath of Hurricane Katrina, we've belatedly come to realize what a dear and valued friend we may lose.

New Orleans, it seems, is everyone's favorite getaway town. Whether for Mardi Gras or the Jazz and Heritage Festival, the restaurants or taverns, it's where people go to find a good time. With its graceful architecture and carriage-width streets, the city still speaks in a faint, half-forgotten accent of gentility.

But the thing that gives New Orleans its enduring spirit, its distinctive attitude and bounce, is music. Not for nothing is it called the birthplace of jazz. For a full century, the whole country has danced to the Crescent City's beat, whether we realize it or not.

It's where, between 1900 and 1920, Buddy Bolden, Jelly Roll Morton, Joe "King" Oliver, Sidney Bechet and the incomparable Louis Armstrong gave definition to the music we call jazz. Other styles and musicians have raised their voices in New Orleans since then, from Professor Longhair and Dr. John to Irma Thomas, Mahalia Jackson and the Neville brothers. But the very character of the city remains inextricably linked to its heritage of jazz.

"It's a core element of the city's identity," says novelist and critic Tom Piazza, who has lived in New Orleans since 1994. "It's a part of everything in New Orleans. It's not just entertainment -- it's part of the way people conceive of life."

Yet for most Americans today, jazz may be little more than a quaint music of the past, something that was cool back in grandpa's day. Since at least the 1940s, when new forms of jazz and popular music began to emerge, people have asked whether jazz was on its deathbed. (They're still asking; a new book by British critic Stuart Nicholson is titled "Is Jazz Dead?")

The question of how jazz can survive in the city of its birth seems almost fatuous when some of its practitioners are facing life-or-death struggles. As the water drains away from New Orleans, an entire city could be reduced to a mausoleum, resembling its above-ground cemeteries.

"When we left New Orleans, we had no idea that it could possibly be forever," Robin Burgess, the wife and manager of trumpeter Terence Blanchard, wrote in an e-mail. "We believe that Terence's mother lost her home, one of his bandmembers lost his, and ours suffered damage to the roof and upstairs studio."

"For those of us who saw unspeakable things," pianist David Torkanowsky wrote in another e-mail, "it's a bit premature to reflect on the possible degradation of jazz landmarks in the face of literal human decay in the streets."

The early rock-and-roll star Fats Domino, 77, was rescued from his home in a neighborhood with some of the worst flooding. George Buck, a blind entrepreneur who owns five swing and traditional-jazz record labels, as well as countless artifacts of early jazz, left New Orleans on Thursday under protest.

The city's music clubs, including Snug Harbor, the Palm Court and Tipitina's, are -- as is everything else in New Orleans -- closed indefinitely. Preservation Hall, the shrine of old-style jazz, will probably be relatively unscathed because of its location in the French Quarter, the city's highest point. Jazz archives at Tulane University and at various museums appear to be safe. But other clubs, theaters and historical sites throughout the city, including the orphanage where Louis Armstrong learned to play the cornet, may not fare as well.

"This is one of the great cultural cities of the world," Wynton Marsalis, the trumpeter and artistic director of Jazz at Lincoln Center, says by telephone from New York. "Through the music, New Orleans spoke to the soul of the nation. That's why this is a national crisis."

A century and a half ago, New Orleans was probably the most cosmopolitan and tolerant city in America, with a mixture of races, religions, languages and cultural traditions unmatched anywhere else. It was a port city that had been settled by the French and governed by the Spanish, British and Americans.

New Orleans was a city of black and white, with every shade in between, but it also had substantial populations of Spanish, French, Irish, Italian, Jewish, Slavic, German and Greek residents. It had the rich and the poor, the pious and the profane. The city was predominantly Catholic, which meant that dancing was more acceptable than in more conservative Protestant precincts. Everywhere throughout the city, musicians were needed to play for dances and more informal kinds of entertainment.

New Orleans had countless honky-tonks, gambling houses, neighborhood dance halls and rough-edged saloons known as "buckets of blood." From 1898 to 1917, it also had a section of town called Storyville, which contained 230 legal brothels with at least 2,000 prostitutes.

The bars and bordellos never closed their doors, and anyone walking the streets in those days could hear the syncopated sounds of a new music being born. It blended the blues of former slaves, the ragtime rhythms of the 1890s and the harmonic sophistication of operas and waltzes from Europe. And it was all spiced with a local flair that pianist Jelly Roll Morton, one of the founding fathers of jazz, called the "Spanish tinge."

The city's first musical legend was probably Buddy Bolden, who led bands from the 1890s to 1907, when he was declared insane and put in an asylum until his death in 1931. His trumpet playing was said to be so powerful that he could be heard from one bank of the Mississippi to the other. From Bolden's time to ours, you can trace an unbroken line of New Orleans trumpet kings, from Freddie Keppard to "King" Oliver, Armstrong, Red Allen, Marsalis, Blanchard and Nicholas Payton.

New Orleans musicians were the first to improvise as a group, and they made another crucial innovation that cannot be overestimated. They paired the low-pitched bass and the high-pitched cymbal in rhythmic unison, a sound that underlies nearly every form of American music of the past century.

"We have a lot that we've offered this country," says Marsalis, the most renowned member of a distinguished New Orleans jazz family. "It's our art form. It's America's art form."

In 1917, at the urging of the U.S. Navy, the federal government shut down Storyville. The prostitutes were sent on their way, and the first generation of jazz musicians began to take their new sound throughout the land. Louis Armstrong, a young trumpeter who had learned his art in the city's toughest dives, was 16 years old.

"It sure was a sad scene to watch the law run all those people out of Storyville," he wrote in "Satchmo: My Life in New Orleans," his eerily prescient 1954 autobiography. "They reminded me of a gang of refugees. Some of them had spent the best part of their lives there. Others had never known any other kind of life. I have never seen such weeping and carrying-on."

Down through the years, the old streets of New Orleans have absorbed the sounds of joy and the sounds of sorrow. The echoes of the city's past, and of its music, never really die away.

"It's omnipresent, and it has seeped into the ground," says Piazza, author of the forthcoming "Understanding Jazz." "Music serves the culture of New Orleans the way familiar prayers serve religious people. There is a tonality, there is a repeated cadence, there's a thing that goes very deep into the consciousness and the soul."

It is a city that honors music not as a commodity, not as mere entertainment but as a sustaining force of life.

More than most, the people of New Orleans have long recognized, and even embraced, life's inevitable journey toward death. "Dead Man Blues" was one of Morton's first compositions. From the early 1920s until his own death in 1971, Armstrong performed the traditional blues, "St. James Infirmary":

When I die, I want you to dress me in straight-laced shoes

Box-back coat and a Stetson hat.

Put a twenty-dollar gold piece on my watch chain,

So the boys will know that I died standin' pat.

For more than 150 years, New Orleans has had the peculiar tradition of the jazz funeral, in which musicians and other honored citizens are sent to the grave with the buoyant sounds of a brass-band parade.

"You and I are both going to be on the cooling board," says Marsalis. "We accept that as a beautiful fact of life. In the meantime, let's find the groove in between."

A jazz funeral begins with a dirge played on the way to the cemetery, followed by a few sober hymns. The drummer muffles his snare drum with a handkerchief.

When the body has been placed in the ground, the drummer removes the handkerchief and plays a loud drumroll. The band falls into place and, by tradition, plays "Didn't He Ramble" to "turn the body loose" and speed the departed on his way. As the tunes grow more lively, a parade breaks out, stopping traffic as a crowd follows the music through the streets.

"In New Orleans, the funeral traditions are there to remind you that life goes on," says Piazza. "Music is a way of expressing hope, faith and remembrance of the past. It's the thing that has kept people's spirits up and reminded them it's possible to live life with grace and affirmation, even in the face of extreme adversity.

"I don't see how there could be any future for New Orleans without music."

From Jelly Roll Morton, left, to Louis Armstrong, above, to Wynton Marsalis, New Orleans has been a hotbed of jazz. Says novelist and critic Tom Piazza: "It's not just entertainment -- it's part of the way people conceive of life."