Lindsay Anderson had previously attempted to make a documentary about musician Alan Price and his band touring around England. However, the project had had to be abandoned due to the prohibitive cost of licensing the cover songs that the band performed. So, when Anderson and writer David Sherwin were developing the screenplay to "O Lucky Man", they decided that Price should write the score. They sent him the script, indicating where all the songs should appear. Consequently, nearly all the songs had already been written in advance of filming.