MIAMI — Writing music for a film or TV show is a deeply emotional and visceral process, Paul Williams, famed songwriter and ASCAP president, said Tuesday during a Q&A at the NATPE conference.

Williams’ formative years as an actor gave him with a love of working with visual media. The in-depth interview conducted by songwriter Sam Hollander spanned the length of Williams’ career, from his early acting efforts to highs in the 1970s to the lost decade of the 1980s and his return to form in the 1990s after he became sober. Along the way he shared anecdotes about great songs (“Rainbow Connection,” “We’ve Only Just Begun,” “Love Boat Theme”) and working with industry legends (Jim Henson, Johnny Carson, Brian De Palma).

“I love writing for the visual world,” Williams said. “I love that place where you’re able to write authentically guided by a great story. Great film scoring to me is where you are in the theater watching a story and I just totally connected with what’s going on.”

Williams said songwriting was a vehicle for artists to “reach into the center of your chest and say something that is really going on with us.” When a song connects with an audience, it does so because listeners are responding to the emotional texture. He also urged songwriters to have faith in their abilities when up against time pressure to create.

“This should be a huge relief for anybody struggling with a deadline — and if you’re writing for television you know what it is to struggle with a deadline. There’s an amazing amount of relief for you just knowing [the inspiration] is up there,” he said, adding that writing for television is a “somewhat mystical” process.

Williams said the marketplace conditions for songwriters and composers of film and TV music are improving. The music business overall has suffered a down cycle, but film and TV remains a beacon for tunesmiths. More often than not, “there’s such a solid love for the music that is put in [film and TV] projects, and they pay for it properly,” he said. “On behalf of 600,000 members of ASCAP, I thank you from the bottom of my heart.”

Hollander pressed Williams on his memories of working in the 1974 cult-fave film “Phantom of the Paradise” with director Brian De Palma. Williams plays a disfigured songwriter who sells his soul to the devil in order to persuade a woman to perform his music. The movie allowed Williams to satirize pop music genres and also comment on media and cultural trends that are still relevant today.

Although the movie came and went in its initial release, Williams has been told by filmmakers including Edgar Wright and Quentin Tarantino that “Phantom” was an influence on their work.

“The people that loved it have honored it and treasured it,” Williams said. The experience has taught him: “Don’t write something off as a failure too quickly.”

Among other fun facts from the session:

  • “Fill Your Heart,” the first song Williams ever wrote, was the B-side of the Tiny Tim novelty hit “Tiptoe Through the Tulips.” It was later recorded by David Bowie.
  • Williams initially turned down the offer to write a song for a bank commercial with his then-collaborator Tony Asher. “I said ‘I’m white light and black leather’ — I’m a street guy,” Williams recalled. When Asher told him the fee, he got down to business very quickly and “We’ve Only Just Begun” was born. Williams sang the tune in the blurb, which would go on to be a massive hit for the Carpenters and a career-making tune for Williams.
  • The first work Williams did after regaining his sobriety in the early 1990s was songs for “The Muppet Christmas Carol.” He got inspiration by going out to sit in a peaceful meadow and reading a “very bloody novel” by crime author Lawrence Block.
  • Williams was surprised as anyone else that Daft Punk reached out to him a few years ago to collaborate on the song “Touch.” He expressed his “immense respect” for the artistic vision of French rockers known for maintaining anonymity by performing on stage with masks.