Jazz connoisseurs have been hearing that eulogy for at least half a century. They're a picky bunch, often complaining about the quality of contemporary jazz while pointing to some golden era when "real" jazz thrived.

But if jazz did indeed die, what was the cause of death, and when did it pass away?

A new book, "Jazz Festival: Jim Marshall," offers some possible answers. It features a handsome collection of black-and-white photos of jazz icons playing for and mingling with the glamorous crowds at the Monterey Jazz Festival in the early 1960s. The photos were taken by the legendary music photographer Jim Marshall, who captured those final summers when jazz was still widely popular -- and when it started to lose its commercial appeal.

The intimacy of the photographs is palpable. There's one of saxophonist John Coltrane slumped alone on a bench backstage, staring off into space as if contemplating some cosmic mystery. There's another of trumpeter Miles Davis whispering something into the ear of Steve McQueen that draws a mischievous smile from the actor. And then there's a shot of the regal composer Duke Ellington urging on a soloist; the Duke seems so close you can almost smell the pomade in his wavy hair.

Marshall's photos also freeze-frame a scene -- the stylish, hip and racially integrated crowds that were as much a part of the festival as the performers themselves. This was an era before people routinely wore flip-flops and sagging jeans in public. The festivalgoers, with their lean builds, exquisite cheekbones and fancy shades, were as sharp as the music.

Festivalgoers at the Monterey Jazz Festival in 1960.

"On any given day it was a sea of Bass Weejun loafers, natural shouldered seersucker jackets, essential Lacoste tennis shirts ... Audrey Hepburn influenced wide-brimmed straw hats and head scarves." That's how music producer Graham Marsh described the festival crowds in the book's introduction. Former President Bill Clinton and music critic Nat Hentoff also contributed essays to the book.

Yet there is an unmistakable melancholy that creeps into the photographs as the festival progresses into the mid-1960s. By 1966, rock acts like Jefferson Airplane were being put onstage. By the following year, the Monterey Pop Festival -- which introduced rock legends like Jimi Hendrix to America -- would eclipse the jazz festival. Coltrane would die, The Beatles would release "Sgt. Pepper" and Marshall would go on to become rock's most famous photographer.

Mike Bloomfield and Paul Butterfield at the Monterey Jazz Festival in 1966.

Rock had pushed jazz off the mainstage. By then, jazz leaders knew they were losing their audience, says Scott DeVeaux, an award-winning jazz historian and co-author of the book "Jazz."

"That's really the point where you can feel the panic building in the air; people were saying we've got to do something."

Was there, in fact, anything they could have done? Why was jazz eclipsed by rock and other forms of music?

There are plenty of theories. Here are three:

It lost out to the accountants

If it doesn't make dollars, it doesn't make sense. That business adage doomed jazz artists because they couldn't sell records like rock groups could, some say.

Consider one of the most popular jazz albums of all time: Dave Brubeck Quartet's "Time Out." It's musically daring, features superb musicianship and yielded a monster hit that became a jazz standard: "Take Five." It could be considered the perfect jazz record. Yet how many copies do you think were sold?

Photographer Jim Marshall

By 1963, four years after its release, "Time Out" had gone gold, selling 500,000 records. Not bad -- but rock groups came on the scene and sold records in the millions. The biggest rock groups sold so many that the industry had to create a new category -- platinum, to mark a million sales. Record executives were no longer content to keep prestigious jazz artists on their labels if they just had middling sales.

"The sales of these rock records staggered record-company executives," DeVeaux says. "These rock albums came along and blew the jazz ones away. That's when they began to say we have to look at our books again and rethink what a record company does."

It lost the booty

When jazz trumpeter Nicholas Payton wrote a famous essay about the demise of jazz, "On Why Jazz Isn't Cool Anymore," he made a curious declaration:

"I create music for the heart and the head, for the beauty and the booty."

When, however, was the last time anyone associated shaking their booty to jazz music? Probably not since the swing and big band era of the 1930s and '40s, when people actually danced to jazz.

They also sang along to jazz tunes. Vocal standards like "Summertime," "Alone Together" and "Days of Wine and Roses" were written for Broadway or Hollywood. Jazz offered accessible melodies that anyone could hum along to.

Then bebop came along after World War II and fans had trouble keeping up. Titans like trumpeter Dizzy Gillespie and saxophonist Charlie "Bird" Parker played music that was hyper-fast and fiendishly complex. The focus was on the virtuoso soloist -- not a catchy melody. People stopped singing and dancing to jazz; bebop supplanted the booty.

"Bebop found a home in the nightclub and eventually on the concert stage," DeVeaux says. "In both of these venues, there isn't room for dancing. It's understood that the music is there to be listened to."

Social media Follow @CNNPhotos on Twitter to join the conversation about photography.

Jazz also became more esoteric, its leaders becoming self-indulgent and playing primarily for themselves. If you were too square to follow, too bad. So when trumpeter Miles Davis started turning his back to the audience while performing live, it symbolized what jazz had already done -- it tuned out its audience.

"Jazz separated itself from American popular music. Big mistake. The music never recovered," Payton wrote.

"Jazz, like the Buddha, is dead."

It lost the future

Here's a depressing fact for jazz fans: One of the best-selling jazz records today was made in 1959. Davis' "Kind of Blue" still sells a thousand copies a week on vinyl.

The persistent popularity of "Kind of Blue" points to a problem with the contemporary jazz genre: Too many people buy the old records; not enough buy the new.

"Jazz ain't cool," Payton wrote. "It's cold, like necrophilia."

The numbers back Payton up. According to Nielsen's 2014 year-end report, jazz is the least listened-to music in the U.S. after children's music, the online magazine The Jazz Line reported. Online music streaming isn't helping jazz either. According to the magazine, jazz was the only genre to have its digital album sales fall between 2011 and 2012.

Harry James lights a cigarette for Miles Davis at the Monterey Jazz Festival in 1963.

Jazz is now almost being treated as a museum piece. DeVeaux, the jazz historian, says jazz is primarily preserved in educational and cultural circles like Jazz at Lincoln Center in New York City.

"It's a counterpart of classical music in the conservatory," he says. "People go to study bebop -- they don't expect to be a bop musician."

A new generation of jazz titans is emerging. The Grammy-winning pianist Robert Glasper has successfully blended jazz with R&B and hip-hop. Gregory Porter has a rich baritone that could match any jazz vocalist from any era. And the Grammy-winning jazz bassist Esperanza Spalding recently performed at the White House.

But will they ever become as venerated as Louis Armstrong, Miles Davis and Duke Ellington, all of whom performed at Monterey? If not, Marshall's shimmering photographs of those lazy summer days when the giants of jazz mingled with the crowd won't be seen as just a celebration of their music.

It'll be the epitaph for an era.