It's not a new phenomenon, of course; before Michael Jackson re-wrote the record books, the Saturday Night Fever soundtrack was the biggest- selling album of all time, and even through the Eighties - something of a fallow period for film music - the Dirty Dancing soundtrack managed to hang around the charts for more than four years.
Indeed, the long-playing album as we know it was actually devised as a means of capitalising upon the appeal of stage musicals and their movie adaptations. The early album charts were dominated by soundtracks such as that for South Pacific, which was the number one album for the entire 52 weeks of 1959. Part of the format's appeal, for record companies, is its sheer resilience: the soundtrack to The Sound of Music, for instance, spent a staggering 382 weeks in the album charts, first reaching number one in June 1965, and last appearing at that position in November 1968 - an unparalleled feat of pop-cultural endurance.
In the late Sixties, however, the soundtrack was deemed to have been killed off by the rise of rock music: the only significant soundtrack sellers were those linked to contemporary youth culture trends, such as Easy Rider and The Graduate, which became totems of rebellion for a generation.
The Graduate was an especially unusual case, in that the director, Mike Nichols, originally commissioned Paul Simon to write new material for the film, but while he was waiting for it, shot scenes using other Simon and Garfunkel tracks as mood music. When Simon delivered only the one song - "Mrs Robinson" - on time, Nichols and CBS decided they couldn't wait for the rest and went ahead and used the old material instead. Despite offering poor value, the subsequent LP outsold Simon and Garfunkel's own album, Bookends, which the duo quite rightly regarded as their masterpiece. Those few Paul Simon songs on The Graduate soundtrack became so imbued with the cultural weight of Dustin Hoffman's breakthrough performance that millions ignored the superior contemporary product in their favour.
These days, youth trends barely have time to acquire their first martyr before films like Reality Bites and SFW are released, complete with their requisite "Generation X" soundtracks. Sometimes, trends change so fast that musical horses have to be swapped midstream. Tris Penna, director of A&R at EMI's Premiere Division, has been involved recently with the soundtrack to the forthcoming Trainspotting, and helped shift the album from its original glam/punk orientation to a more contemporary one.
"Directors want to use their favourite pieces of music, songs that were evocative for them," he explains. "A year ago, the producers had a sound bed for the film that included tracks by Heaven 17, Blondie and Culture Club. In the book, the character's obsessed with David Bowie, but in the film it's Iggy Pop, so we suggested using punk bands like Wire and Buzzcocks, and if we could get them, Lou Reed and Iggy."
The intervening year, however, saw the increasing popularity of Britpop and rave music, and changes were made that cemented the film more firmly in the contemporary cultural scene. New tracks were commissioned from Pulp, Blur and Primal Scream, the Blondie track "Atomic" was re-recorded by the indie band Sleeper, and dance music featured more strongly than in the original conception. "The film goes from Edinburgh in the early Eighties to London in the early Nineties," says Penna, "so you go from having these smackheads into Bowie and Iggy, then they hit the club scene in London, which is why there are tracks by Leftfield and Underworld - the soundtrack should be the soundtrack that's happening in the characters' lives."
Though it's doubtful whether the Trainspotting soundtrack will be quite as huge a success as those to rap movies like Above the Rim, Friday and Dangerous Minds, it attempts to echo the impact of those albums, on which rap brigands such as Dr Dre, Ice Cube and Coolio furnish the authentic street sound of Nineties America - and do it significantly better than the films for which the soundtracks were recorded.
That too is nothing new: one of the most enduring soundtracks of the Eighties, the one that Tom Waits and Crystal Gayle recorded for Francis Coppola's One from the Heart, is just about the only coherent thing about the movie, and certainly the only element worth Coppola's reckless investment. If he had to do it today, however, it would cost him far more - though not, oddly, as much as if he were to use old pop songs. Once, period pop was viewed as a cheap alternative to having a bespoke score tailored for your movie. Not any more.
"An established piece of music is usually more expensive than a newly commissioned piece," says Roger Birnbaum, president of Caravan Pictures. "The fee for an established track can range from $25,000 to over $100,000. If you want to use a Beatles or Rolling Stones or Frank Sinatra song, for example, they charge you a lot of money. I usually say to the directors of my movies, when they're starting, 'By the way, if you want source material in this film, don't think of any Beatles songs, because I'm not paying for them!' "
"The price of everything has gone up - the artists' fees, the licences, everything has gone way up," explains Kathy Nelson, now president of music at Disney, but until recently the head of MCA's Soundtracks Division. "You can spend a million dollars putting a soundtrack together now, the kind that has between 10 and 14 songs. If it's just a score album, it's significantly less because you just pay the composer's fees and recording costs. The songs Scorsese used in Mean Streets would be unapproachable now, if you had to worry about a budget."
With huge-selling albums such as those for Beverly Hills Cop I & II, Nelson revolutionised the commercial potential of the medium, while her more critically successful soundtracks for Repo Man, Something Wild and Reservoir Dogs did much to establish the artistic reputation of contemporary pop compilations. With the multi-platinum Pulp Fiction soundtrack, she managed to satisfy both commercial and artistic demands, though she affords the boy-wonder Tarantino most of the credit.
"Quentin designs his music into the film," she acknowledges. "The music, for Quentin, is the same as a character in the movie - the whole show is designed. There are times when he may not know a specific song, and he'll ask if anybody has any ideas, but ultimately Quentin will decide what he's using."
In general, the film company is always responsible for more of the work on a soundtrack than the record company, because it's simpler for them to make the necessary deals for both film and soundtrack rights at the same time. The promotional duties, however, are shared between the two media, according to Roger Birnbaum.
"It's always negotiable, and a lot of times it's at cross-purposes," he says. "The record company only wants the record to work, and the film company is only truly interested in the film." Further conflicts arise when a track features another record company's artist: "A record company is not likely to let you take their artist and release a single on another label. So they say, 'You can use it in the soundtrack, but you can't have single rights.' Of course, usually you don't know what music you want until the picture is assembled. Then the window for getting the music is very small, so you're always playing catch-up in these situations."
This is the part of the business that impacts the most upon the composer, if one has been commissioned. "It's always the last thing to be done, and they always want it the day before yesterday," says Danny Elfman, best known for The Simpsons theme and his scores for Tim Burton's movies. Another composer, Warren Zevon, speaks of the pressure of constantly working through the night to meet daily deadlines: "It essentially removes all the fear from composing because you don't have time to doubt yourself - you've got to write this scene and get on to the next, and by six in the morning you'd better be on to Scene M32 because the messenger is coming at seven."
Not surprisingly, it can be a soul-destroying process. "You have to come to terms with the disposability factor," says Zevon, "because they'll throw out everything you wrote for an episode and use some dumb cue you wrote for a previous episode over and over again, because they liked it. And it's always the most mediocre over the most interesting, because 'interesting' is not what they need. I probably do 10 times as much work as I should, because I write symphonic poems when they need one low note."
Not that Warren should worry about his work going to waste, if the current trend for secondary and even tertiary soundtracks continues. Most big films these days feature at least two separate soundtracks (pop and score), and it's not rare to read the rubric "Music from and inspired by the film..." on a soundtrack sleeve, suggesting that the compilers are trying to get a second bite at the same cherry.
"Where that has happened, it's usually because the film changes at a late stage, and all of a sudden the scene the song was designed for isn't there any more, but it's too late to start dropping stuff," says Kathy Nelson. "There have been a few times where I've had to put soundtracks out featuring songs that weren't in the movie, but it was never intentional.
"I like to maintain that a soundtrack is a souvenir of the movie. What you're doing is designing a companion piece - it's not that I have a problem with that concept, it's just a bit misleading to call it a soundtrack."
The best-selling soundtrack albums of all time in the UK
The Sound of Music (1965)
This Rodgers and Hammerstein musical rode the album charts for 382 weeks, making a star of Julie Andrews on the way. (A woman in Cardiff is in the Guinness Book of Records for having seen the film 940 times.)
Saturday Night Fever (1977)
Tight white suits and squeaky Bee Gees lift John Travolta from his working- class rut.
This time Travolta's a high-kicking greaser drifting through high school, snapping his fingers at Olivia Newton John. "Hopelessly Devoted to You" copped an Oscar nomination for Best Song. Newton John is still waiting for Tarantino to resurrect her career.
Dirty Dancing (1987)
Jennifer Grey has a torrid affair with Patrick Swayze's hot-blooded dancing instructor to a chorus of dancefloor hits.
South Pacific (1958)
Ain't nothing like Mitzi Gaynor who belts out the hits while everyone else mimes their way through the Second World War on a South Sea island. Spent 286 weeks in the album chart.
The Bodyguard (1992)
A pop video interrupted by a movie, said one critic. Both Kevin's hair and daft plot came in for a drubbing, but Whitney's voice ensured the soundtrack music would run and run and run and run and run.