Ragtime is a 1981 American film based on the historical novel Ragtime (1975) by E. L. Doctorow. The action takes place in and around New York City, New Rochelle, and Atlantic City in the first decade of the 1900s, and includes fictionalized references to actual people and events of the time. The film was directed by Milo Forman. The music was the first full feature score composed by Randy Newman. This was the final feature film for both James Cagney and Pat O'Brien; Cagney was ailing during the shoot. Although ambiguous about the year of action within the storyline, architect and socialite Stanford White was actually shot in 1906 and the trial(s) of Harry K. Thaw for the murder took place in 1907 and again in 1908. Thaw's wife, Evelyn Nesbit had a previous intimate relationship with White while she was a teenager. The film was nominated for Academy Award for Best Adapted Screenplay, but lost to On Golden Pond.