LOS ANGELES (Hollywood Reporter) - Elmer Bernstein, whose eclectic film music ranged from the rousing theme of "The Magnificent Seven" to the lighthearted score for "Thoroughly Modern Millie," for which he won an Oscar, died Wednesday at his home in Ojai, Calif. He was 82.

The composer died after a lengthy illness – the exact cause of death has not been determined – with his wife, Eve, and his two daughters, Elizabeth and Emilie, by his side, a spokesperson said.

Bernstein worked steadily in films and television since the early '50s, writing more than 200 major film and television scores, encompassing a range of genres.

"Never has anyone reinvented themselves so many times," said Richard Kraft, Bernstein's former agent and longtime friend. "And he didn't just compose one film in each genre, he did a few. He would become the go-to guy for completely different genres, and he kept that going for 50 years. From the first Oscar (nomination) to the last is almost a five-decade span."

Most recently, Bernstein's "Fanfare for the Hollywood Bowl" was performed by conductor John Mauceri and the Hollywood Bowl Orchestra in June to celebrate the inaugural season of the Bowl's new stage.

He wrote his last major film score, a lush evocation of '50s melodrama, for Todd Hayne's 2002 drama "Far From Heaven," for which Bernstein received the last of his 14 Academy Award nominations.

"His last project was a documentary on Cecil B. DeMille for TCM (Turner Classic Movies)," said Jeff Bond, senior editor of Film Score Monthly. "It was a great score that let him revisit his 'Ten Commandments' style and adapt some early silent film scores."

A memorable film score depends on a memorable melody, Bernstein insisted, reminiscing last year at a luncheon of the American Society of Music Arrangers and Composers. Calling melody "the emotional core of a film," Bernstein said "a good line will always win."

Bernstein introduced jazz elements into American film scoring with 1955's "The Man With the Golden Arm," Otto Preminger's groundbreaking drama about heroin addiction, and went further in that direction with 1957's "Sweet Smell of Success," which captured the moody tempos of Broadway by night, and 1962's "Walk on the Wild Side," scored to the rhythms of a New Orleans bordello.

But almost simultaneously, his work also ranged from sweeping epics like 1956's "The Ten Commandments," with all its biblical sound and fury, to intimate Americana like 1962's "To Kill a Mockingbird," which introduced its themes with just a piano and solo flute.

After turning out his indelible theme for 1960's "The Magnificent Seven" – it is quoted in Michael Moore's documentary "Fahrenheit 9/11" and, inevitably, evokes a laugh of recognition from audiences – Bernstein frequently turned to Western fare in the '60s. He scored John Wayne's last seven films, including "True Grit" and "The Shootist."

During the '70s and '80s, he was frequently sought out by a new generation of filmmakers including John Landis and Ivan Reitman who had been raised on his films and who invited him to score such comedies as "National Lampoon's Animal House," "Airplane!" "Stripes" and "Ghostbusters."

Bernstein began a long-running collaboration with director Martin Scorsese when he composed the score for Stephen Frears' 1990 feature "The Grifters," which Scorsese produced. Scorsese and Bernstein worked together on "Cape Fear," "The Age of Innocence" and "Bringing Out the Dead."

"He liked taking risks with new directors," Kraft said. "He knew what made movies work. He brought new filmmakers his expertise, but he was not stodgy in his expertise. The knowledge and experience he brought to other people and their films can never be replicated."

Bernstein was born April 4, 1922, in New York. By age 12, he had earned a scholarship in piano, given by Juilliard teacher Henriette Michelson, who guided him throughout his career as a pianist.

He was invited to demonstrate improvisations for composer Aaron Copland, who was impressed by the young musician and recommended him to Israel Citkowitz, who became his teacher. Bernstein later credited Citkowitz for his musical training.

Bernstein began his career as a concert pianist and, during World War II, arranged folk music and wrote dramatic scores for the Army Air Corps Radio Shows. In 1949, two shows that Bernstein did for United Nations Radio brought him to the attention of Sidney Buchman, then-vp of Columbia Pictures, who offered him work writing music for 1951's "Saturday's Hero" and 1952's "Boots Malone."

Even before it truly began, Bernstein's career was almost derailed by the blacklisting of the '50s. Having been sympathetic to left-wing causes, he found work hard to come by – he considered himself "graylisted" – and had to settle for such low-budget science-fiction films as "Cat Women of the Moon" and "Robot Monster," earning just $800 for the latter.

But DeMille's "Ten Commandments" proved a turning point in his life. Originally hired to write just the film's dance music, Bernstein was soon asked to write the score for the entire picture.

In addition to his wife and daughters, Bernstein also is survived by his sons Peter and Gregory and five grandchildren.

Memorial plans have not yet been decided.