From the Economist:
In the sequel, “For a Few Dollars More” (1965), sound became even more integral, as a musical pocketwatch played a key role in the plot. Mr Morricone’s score carefully segued between diegetic music—which exists in the world of the film—and non-diegetic music, which comments on the narrative and the psychological interiority of the characters. By this stage in their collaboration, Mr Morricone was writing the music in advance of filming. Leone would edit the footage to fit the music and not, as was conventionally the case, the other way around. While making “The Good, the Bad and the Ugly” (1966), Leone would play the music on set for the actors to help them get into character. (Each of the titular parts shared the same theme but it is played on a different instrument: the flute for the “Good”, the ocarina for the “Bad” and the human voice for the “Ugly”.)
By “Once Upon a Time in the West” (1968), the director had gone further, playing the music as the cameras rolled so that he could line up his shots accordingly. The most striking part of the movie’s soundscape comes during the opening title sequence. Three cowboys await the arrival of the protagonist—a man known only as Harmonica (Charles Bronson)—at a railway station; Mr Morricone created atmosphere using the sound of a fly buzzing, water dripping and a sign creaking. This was his genius. He combined the catchiness of a pop melodist with the daring experimentalism that made him a core member of the Gruppo di Improvvisazione di Nuova Consonanza, a collective of avant-garde composers.