The history of music as an accompaniment to visual entertainment is surely a long one. Without going back to antiquity, there is all manner of theatre (musical or non-musical), variety shows and various forms of opera. In all of these forms of theatre, music can adopt a range of roles: sometimes it is an intrinsic part of the entertainment (a collection of songs or a musical), and sometimes it is providing an accompaniment to other visual or verbal forms of entertainment. As an accompaniment music can simply "be there" (in the background), but often the music is chosen with a particular purpose of enhancing the spectacle in some way (creating atmosphere) or in a more sophisticated way to create or enhance an emotional reaction among members of the audience (see the article What is Music?). This spectrum of musical involvement in the entertainment also applies to film.
When it comes to film as a projection through celluloid, the earliest examples consisted of moving pictures only and no sound. But a silent movie without a musical accompaniment seems totally empty, so music was typically provided in the theatre by a musician on piano or organ (or a group of musicians) to give emphasis to the story. At first it was up to these theatre musicians to choose or improvise the music, but there were music publishers who specialised in producing music suitable for film which these musicians could refer to. It wasn't long before film makers exerted greater control over the musical accompaniment, by specifying the music to be played, and even in some cases having it specially written for the occasion. It is interesting to note at this point that one of the great entertainers of the silent era, Charlie Chaplin, also composed the music for some of his own films such as City Lights.
The first "talkie" movie was the original Jazz Singer starring Al Jolson which created a stir on its release in 1927 with its soundtrack consisting of songs and some fragments of speech. This heralded a change in the position of musical accompaniment for film and by the early 1930s, as the talkie industry matured, the role of film composer started to emerge in earnest. A pattern quickly emerged or the "opening titles" making the equivalent of a musical overture introducing the film and its main themes, and the "closing titles" which would reinforce the mood of the film's conclusion and remind us of the main themes. Within the film, there would be opportunities to provide appropriate music between the periods of dialogue. The importance of the music to the finished product was also quickly recognised, and awards were given for this contribution including the Academy Award for Best Score.
Some early examples of film music though seem to throw themes together from many sources, including numerous borrowings from classical works by the likes of Rachmaninoff, Tchaikovsky or Rimski-Korsakov. An example of the more effective use of borrowed material is Max Steiner's score for Casablanca from 1942 which uses the French and German national anthems mixed with the theme song which Sam is asked to "play again". Dramatic, lush and romantic sounds were definitely "de rigour". To modern ears there is sometimes a tendency for the music to follow the action too closely like a cartoon, a phenomenon called "Mickey Mousing" for obvious reasons. It is no surprise that some early film composers had the reputation for being hacks, and were looked down upon by serious composers. However, there were many successes to attract trained musicians, such as the theme to Gone with the Wind, again from Max Steiner, easily recognised by millions of people today.
The war years certainly provided much opportunity for stirring patriotic films and of course music. Several accomplished composers were employed in this capacity on all sides, an example being Shostakovich who wrote for Stalinist propaganda films. Many post-war films also had a war-time setting with examples being The Dam Busters with its march by Eric Coates, 633 Squadron by Ron Goodwin and The Great Escape by Elmer Bernstein.
Musicals were also growing in popularity at this time, a medium that would encompass the output of Rogers and Hammerstein, many Walt Disney cartoons features, and film versions of musical plays culminating in such gems as West Side Story (Leonard Bernstein), Oliver! (Lionel Bart), Little Shop of Horrors (Alan Menken) and Evita (Andrew Lloyd Webber). Note also the unusual examples of films where the music comes first and the pictures are created to fit the music such as Disney's Fantasia, recently resulting in a sequel.
The thriller demanded its own unique style of music to assist with the tension building, and of course playing a part in the "false alarm" devise for shocking the audience on those occasions when the menace isn't actually there. Key in this genre must be the man who so ably supported Alfred Hitchcock in many films, Bernard Hermann, whose screaming strings in Psycho and dizzy arpeggios in Vertigo were an effective ingredient in the final mix. Two contrasting examples from the 70s are Jerry Goldsmith's The Omen with its haunting black mass, and John Carpenter's Halloween, which uses simple repetitive music most effectively.
Epic and historical dramatisations required sweeping orchestral themes to give a suitable scale and grandeur to the proceedings, such as with Miklos Rozsa's Ben-Hur and Maurice Jarre's Lawrence of Arabia. And in some ways a close relative of this style, we can't forget the unique position of the Western movie in the history of the cinema, and many will have come across albums full of your favourite Wild West theme tunes. Most of these will include The Magnificent Seven by Elmer Bernstein and The Good, the Bad and the Ugly by Ennio Morricone.
It was quickly realised that films could help to launch hit songs with their wide audience exposure, and conversely that popular songs helped to sell films. The potential for marketing opportunities was recognised, an early example (still in the Western category) being High Noon in 1952 with song, "Do not forsake me, oh my darling" by Dimitri Tiomkin and Ned Washington. Since then the Bond franchise has been generally successful in creating a hit record to accompany each film released in the series. More recent variations on this theme include Robin Hood, Prince of Thieves (Michael Kamen) and Titanic (James Horner) with their hit singles. Many films now have soundtracks consisting largely of popular (or sometimes forgotten) singles such as Pulp Fiction or Trainspotting, even in some cases helping to relaunch an artist's career as with Hot Chocolate on The Full Monty. The modern excessive version of this is the film which spawns a conventional soundtrack, an album of popular music used in the film, and potentially 2 or 3 albums of music related to or "inspired by" the movie!
A simple but effective mix of specially composed soundtrack and pop tunes can be found in the time travel flick, Back to the Future (Alan Silvestri), which used popular music to help conjure two different periods in the present and the past. Having moved into the Science Fiction and Fantasy realm, it is worth noting the dark atmospheric yet very different contributions made by Vangelis in Blade Runner and Danny Elfman in Batman.
Exceptionally, there are times when the theme music itself enters the popular culture, just like the musical equivalent of a catch-phrase. The architypal example of this is John Williams' theme from Jaws, a few bars of which is sufficient to signify a menace lurking in the depths, often with humorous intentions. Other examples include Vangelis' theme for Chariots of Fire often used to underpin supreme athletic achievements in slow motion, or the use of Bill Conti's Rocky fanfare to herald the start of a gladitorial sporting event. The Bond theme is recognisable the world over, and indeed all John Barry's Bond music is instantly associated with the character's exploits in all manner of exotic locations.
There is no doubt that John Williams' music for Star Wars made a massive impact on the scene, rekindling the demand for full-scale orchestral scores after something of a lull, and even daring to bring back the concept of different themes to differentiate between the goodies and baddies. Williams has gone on to produce many other examples of memorable music in collaboration with Steven Speilberg and other directors. Although the use of full orchestral scores may be on the wane again, they are still very popular as in the The Lord of the Rings soundtracks by Howard Shore or the soundtracks for the Matrix trilogy by Don Davis which augment traditional orchestral scoring with avant-garde techniques and mix this with techno tracks.
In several ways, film music has long been simpler than concert music - it needs to work faster over a shorter time period, it might be competing with other sounds and dialogue, and it is not there to serve an intellectual purpose but generally an immediate emotional purpose. However with the invention of Minimalist Concert Music by a variety of experimental composers (e.g. Steve Reich, John Adams, Terry Riley, La Monte Young, etc.) other composers were quick to pick up on the cinematic possibilities. Some minimalist concert composers have enjoyed success composing film soundtracks (e.g. Philip Glass and Michael Nyman) while many new and existing composers adapted their styles towards a minimalist approach (e.g. Thoman Newman, Alexandre Desplat, Clint Mansell, Carter Burwell and Hans Zimmer). These minimalist techniques include long sustained chords or drones, repeating patterns of notes, beats, chords or arpeggios, and combinations of these things. Some minimalist techniques have been largely avoided by media composers, such as those which use slow evolving changes since they are less suited to the immediacy of those media. It is now very common to find these elements appearing throughout media music - whether for film or television, for video games or supporting adverts.
Electronic instruments and computers are playing an increasing role in film music. There are many early examples such as The Day the Earth Stood Still by Bernard Herrmann in the early 1950s and Wendy Carlos's versions of Beethoven's music in A Clockwork Orange some 20 years later. Brad Fiedel created a suitably metallic accompaniment for the android character in the Terminator films, and less obviously James Horner's music for Titanic blended synthetic instruments with real ones. Many soundtracks can be created more cheaply using electronic instruments rather than acoustic ones, as with Mark Isham's highly effective score for Crash. In many ways the trend towards electronics and software parallels the use of computers to add visual effects to the movie, but in no way replaces the increasing demand for skilled composers and musicians in the film industry.