The Rolling Stones’ Keith Richards once told me that the key to songwriting is “keeping your antenna up.” It’s a concept that almost every songwriter I’ve ever interviewed has repeated in some fashion.  They may be the ones with the songwriter credit, but  they are really just a conduit for something flowing through them.  Or, as Paul Williams put it Tuesday night at the Songwriters Hall of Fame (SHOF) evening at the Grammy Museum in Los Angeles, “There’s something in the song that didn’t come from us.”

That, however, does not mean that there aren’t often wonderfully amusing stories accompanied by the creation of the music. The Oscar-winning Williams was joined by some of the best songwriters to ever take pen to paper, as they told tales about how their most famous songs came about. The event heralded the opening of SHOF’s permanent exhibit at the museum.

The most amusing story came from the legendary Lamont Dozier, who, as part of the songwriter trio of Holland-Dozier-Holland, has written more than 50 No. 1s, most of them for Motown artists like Marvin Gaye and Diana Ross and the Supremes.

“I call this my infidelity song,” the good-natured Dozier told the crowd of his classic, “Stop in the Name of Love.”  “It was  six or seven in the morning. I’d had a couple. I was in a no-tell motel and I heard a knock on the door. My ‘friend’ went out the bathroom window because the woman I was with at the time was known to be a bit of a terror.” Dozier’s girlfriend came in the room and started chewing him out.  “I said, ‘Baby, please. Stop in the name of love!’ She said, ‘That’s not funny.’ I said,’ Wait. Did you hear that cash register?’” He went on to write the song that became a massive hit for the Supremes.

Dozier also told a remarkable story about Marvin Gaye recording “How Sweet It Is (To Be Loved By You). Gaye showed up at the studio with his golf clubs, unhappy to be kept off the links. He groused that he didn’t know why he was there and that he hadn’t received a copy of the song to learn it beforehand. After he heard it, “he was immediately perturbed. He was pissed because the key was too high,” Dozier says, adding with a wink, “We did that on purpose because we knew if he reached for it, he would shine.  He did the song in one take and he just heard it for the first time that day. He was a genius.”

Mac Davis talked about writing songs recorded by  Elvis Presley, including “In the Ghetto,” “A Little Less Conversation” (which he originally wrote for Aretha Franklin) and “Memories.”

Davis first met Presley at a looping session for “A Little Less Conversation,” which appeared in “one of [Elvis’s] worst movies. That narrows it down to 50,” he joked. (The song appeared in 1968’s “Live a Little, Love a Little.”)  Col Tom Parker approached Davis and said, as Davis recalled, “‘You’re a good-looking boy. Let me rub your head.’” A slightly weirded out Davis complied, and Parker said to him, “You go tell everybody  you met Col. Parker and you’re going to be a star.”  He was right.

Despite protestations from his camp,  Presley insisted on recording “In the Ghetto.”  “He fought to record that song,” Davis says. “He was used to listening to Col. Parker. He was no longer No. 1, the Beatles were.  Priscilla’s told this story. They didn’t want him to cut it. They thought it was too political. It was a white guy singing about the ghetto.” “In the Ghetto” didn’t go to No. 1, but it showcased Presley in  totally new light.

Davis most recently wrote with Weezer. “Rivers Cuomo called and asked if I’d write a song with him,” Davis said. “I now have street cred with my kids.”  The clever tune, “Times Flies,” is on Weezer’s new album, “Hurley.”

Nick Ashford, who was joined by his wife and songwriting partner Valerie Simpson, talked about how nervewracking playing a song for Motown founder/chief Berry Gordy could be.  “There was a Motown quality control board,” he said. “It would be Berry and his disciples. Berry looks like Jesus.” Ashford had been summoned to play a song, but was quaking in his boots when the board sent a song by Norman Whitfield, author of such classics as “I Heard it Through the Grapevine” and “Just My Imagination,” got sent back to the songwriter for more work. Ashford played “You’re All I Need To Get By” and held his breath. “Berry Gordy said, ‘We’re not going to vote on this song. We’re just sending it out.”  The song, recorded by Marvin Gaye and Tammi Terrell, became one of the biggest R&B hits of 1968 and was the biggest duet of Gaye’s career.

In a few other tidbits, Hal David, who, with partner Burt Bacharach,  wrote everything from “This Guy’s in Love With You” to “Alfie” and “Close To You,” revealed that “Raindrops Keep Falling on My Head” was turned down repeatedly before BJ Thomas recorded it for “Butch Cassidy & the Sundance Kid.” The song went on to win an Oscar.  (David did not say who passed on the song, but according to lore, both Ray Stevens and Bob Dylan declined to record it for the movie).

Williams said that “We’ve Only Just Begun,” a hit for the Carpenters, was originally written as a bank commercial. As much as he loved working with a number of artists, Williams holds a special place in his heart for a piece of felt that turned into his favorite partner: Kermit the Frog, for whom he wrote “The Rainbow Connection.”  Jim Henson gave me the most freedom I’ve ever been given,” he says of his work on “The Muppet Movie.”  “‘The Rainbow Connection’ is my favorite song I’ve ever written.”

In addition to the celebrated songwriters on the stage, there were many in the audience, including Jimmy Webb, who is responsible for my favorite line ever written:  “I need you more than want you/And I want you for all time,” from “Wichita Lineman.”

What do you think is the best song ever written?