Most film scores are written by a specialist who joins the project after the cameras stop rolling. A small group of directors skips that handoff and writes the music themselves. The result is a film where image and sound come from the same mind.
The five filmmakers below are well documented examples. Each one has a long record of directing and composing for the same movies, and the credits are easy to check.
John Carpenter

Carpenter is probably the most famous case. He directed Halloween in 1978 and wrote its minimalist piano theme, which is built on an unusual rhythm. He also scored The Thing’s contemporaries such as Assault on Precinct 13, Escape from New York and Big Trouble in Little China, usually with synthesizers and often with collaborators.
His music has also found a life of its own. He released Lost Themes in 2015 and followed it with further albums, then toured as a live musician. For many fans, his name now sits as comfortably on a record sleeve as on a movie poster.
Clint Eastwood

Eastwood has been a working pianist since youth, and he has composed music for several of his own films. Mystic River, Million Dollar Baby, Changeling and Gran Torino all carry scores he wrote or co wrote. The pieces tend to be quiet, spare and guitar or piano led.
His son Kyle Eastwood, a jazz bassist, and Michael Stevens have often collaborated with him on the music. Eastwood also received a Golden Globe nomination for his Million Dollar Baby score. The approach suits his unhurried directing style.
Charlie Chaplin

Chaplin couldn’t read music, yet he composed the scores for his films. He worked with arrangers who transcribed what he hummed or played, which is how City Lights in 1931 and Modern Times in 1936 got their original music. The melody from Modern Times later became the standard Smile, with lyrics added in the 1950s.
He later returned to his older silent films and added scores to them. His music for Limelight earned an Academy Award for Best Original Score, though the prize came in 1973 after the film’s delayed Los Angeles release. It remains one of the more unusual stories in Oscar history.
Robert Rodriguez

Rodriguez is known for doing nearly everything on his productions, and music is part of that habit. He has been credited as composer on films such as El Mariachi, Desperado, Spy Kids and Sin City, often sharing the work with collaborators like John Debney and Graeme Revell. The Spy Kids series in particular carries his name on the music side.
He also plays in a band, Chingon, which has recorded music for his films. That crossover between live performance and film work makes his approach feel hands on. He treats the score as another tool in a one person production style.
Satyajit Ray

The Indian filmmaker Satyajit Ray began composing his own scores in the 1960s, starting with Kanchenjungha in 1962. Earlier films like Pather Panchali used music by Ravi Shankar, but from Teen Kanya onward Ray took over more of the work. He drew on both Indian classical traditions and Western music, which he knew well.
Later films such as Charulata, Nayak and Goopy Gyne Bagha Byne carry his compositions. He also wrote and illustrated, so music was one more part of a very complete creative practice. His example shows how a director can shape a film’s emotional tone without outside help.