The main title is the music, often later recorded on soundtrack albums, that is heard in a film while the opening credits are rolling. It does not refer to music playing from on-screen sources such as radios, as in the original opening credits sequence in Touch of Evil.
A main title can consist of a tune sung by the leading character over the credits, such as Moon River, sung by Audrey Hepburn in Breakfast at Tiffany's, or the main orchestral theme as written by the composer, such as the famous The Pink Panther Theme. It can also be a medley of themes from the film, as in the 1959 Ben-Hur. In the film A Hard Day's Night, the title tune was heard over the opening credits showing The Beatles running from their fans. An overture may serve as a main title, as in The Sound of Music. However, there is a very strong difference in a roadshow theatrical release between an overture and a main title. The overture in such films is heard on pre-recorded tape or film, before the film even begins, while the house lights are still up and there is yet no picture on the screen. The main title begins when the film actually starts. In the case of The Sound of Music though (and also Fiddler on the Roof), no overture was heard before the lights in the theatre went down; therefore, in these cases, the main title did serve as an overture. Both films had pre-credits opening sequences; during these, the first song from the film was sung, and immediately afterwards, the main title music followed.
In movie musicals, the main title nearly always consists of one or more of the songs from the film, played by the orchestra.