Marvin Hamlisch and Scott Joplin The Sting

The ragtime score of The Sting is the most commercially successful use of pre-existing music in American film history. Marvin Hamlisch's adaptations of Scott Joplin's piano rags -- composed between 1899 and 1909, seven decades before the film -- reached No. 3 on the Billboard pop chart, generated a top-selling soundtrack album, and catalyzed a nationwide ragtime revival. The music is also an anachronism: the film is set in 1936, by which time ragtime had been eclipsed by jazz. The anachronism is deliberate, and it works because the music's jaunty, mechanical precision mirrors the con's.

Hill heard his son playing Joplin and built the score around it

The ragtime score was George Roy Hill's idea, born from a domestic accident. Hill had become "hooked on ragtime from hearing his son and nephew play rags by Scott Joplin on the piano," and as he developed the film, "a connection formed in his mind that these rags would be an ideal accompaniment to the movie, with their assured sense of humor." Hill was "especially keen on utilizing the sense of humor" in Joplin's compositions -- the winking self-awareness that matched the con men's attitude toward their own craft. (galaxymusicnotes)

Hamlisch resisted the assignment, then recognized the film's quality

Hamlisch was a composer of original music and initially saw adaptation as a lesser assignment. But after viewing a first cut, his resistance dissolved.

"I quickly realized that this was one of the best pictures I had seen in years... George Roy Hill had directed it faultlessly." — Marvin Hamlisch, TCM (2010)

Hamlisch acknowledged the limits of his own expertise. He knew there were "other musicians who knew the music of Scott Joplin far more intimately" than he did, "men who had popularized Joplin's famous piano rags." His contribution was not scholarly fidelity but cinematic instinct: knowing which rag fit which scene and how to orchestrate piano music for a film soundtrack. (clickamericana)

"George Roy Hill was what every director should be for a composer... That's a rare collaborator." — Marvin Hamlisch, TCM (2010)

The Joplin pieces used in the film

The soundtrack draws from six Joplin compositions:

Piece Composed Use in Film
"The Entertainer" 1902 Main theme; opening and closing
"Solace" 1909 Romantic and reflective scenes
"The Easy Winners" 1901 Con preparation sequences
"Gladiolus Rag" / "Pine Apple Rag" 1907 / 1908 Medley during montages
"The Rag-time Dance" 1906 Crew assembly and rehearsal
"Cascades" 1904 Used in film but not on soundtrack album

Gil Rodin served as executive producer of the soundtrack album. The track sequencing on the album followed a different order than the film for aesthetic purposes. (galaxymusicnotes)

"The Entertainer" became a cultural phenomenon independent of the film

Hamlisch's adaptation of "The Entertainer" reached No. 3 on the Billboard pop chart in 1974 and spent a week at No. 1 on the easy listening chart. The soundtrack album was a top seller. Hamlisch won both the Academy Award for Best Original Song Score and Adaptation and a Grammy for Best Pop Instrumental Performance. (wikipedia)

The Variety review offered a minority dissent, finding the score "too thin" -- a judgment the soundtrack's commercial triumph would render academic. (variety)

The soundtrack catalyzed a broader ragtime revival

Scholar Edward A. Berlin identifies the Sting soundtrack, alongside Joshua Rifkin's million-selling 1970 Nonesuch album of Joplin recordings, as the catalyst for the 1970s ragtime revival. The revival encompassed the New York Public Library's archival releases, the first full staging of Joplin's opera Treemonisha, and performances by the New England Conservatory under Gunther Schuller. Berlin called Joplin's work "the classical phenomenon of the decade." The irony is thick: a composer who died impoverished in 1917 became a household name fifty-six years later because a film about con men needed period flavor. (wikipedia)

Sources