Watch CNN Films’ “Jimmy Carter: Rock & Roll President” Sunday at 9 p.m. ET.

CNN  — 

A few US presidents’ legacies are inextricable from music: Bill Clinton’s saxophone skills on the campaign trail, for example, or Barack Obama’s well-documented ability to carry a tune.

But when it comes to Jimmy Carter, the popular historical record seems to scratch. Despite the 39th president’s lifelong interest in music and its influence on his career, Carter’s connection to the artists who’ve shaped American culture often goes unsung.

This little-known part of Carter’s legacy inspired director Mary Wharton to create the documentary “Jimmy Carter: Rock & Roll President,” which examines the former president “through the lens of his musical playlist,” Wharton says.

“I was not familiar at all with Carter’s interest in music, and as a documentarian who has studied the music history of this time period, I was shocked that this story existed and had been kind of hiding in plain sight all this time,” she says. “His musical favorites tell you so much about who he is.”

From the gospel sung in local Georgia churches, to the country music he could pick up on his childhood radio, to the Bob Dylan lyrics that set him apart as a politician, “Rock & Roll President” plays like a virtual soundtrack to Carter’s life story. Below, we spotlight 12 songs from and inspired by the film and what they tell us about Jimmy Carter.

“Whiskey River,” Willie Nelson

Carter has been friends with Willie Nelson for decades, and believes he knows everything the artist has ever written. Carter explains in the film that some considered their friendship inappropriate for a president – but director Wharton is one observer who isn’t surprised by their bond.

“Carter connected with the fact that these artists are truth tellers, and I think that’s one of the things that Carter was always known for,” Wharton says. “He stood firmly behind the truth. He told America the truth even when they didn’t want to hear it; even (when it was) to his own peril in politics.”

“Maggie’s Farm,” Bob Dylan

While Wharton wasn’t surprised by Carter’s friendship with Nelson, she was intrigued to learn that Bob Dylan and Carter also have a long friendship, since Dylan isn’t exactly known for being a social butterfly. But as with Nelson, Carter found a kindred spirit in Dylan.

“Carter talked about when he heard the song ‘Maggie’s Farm,’ and how – as someone who grew up the son of a farmer, the son of a landowner – it was the first time he really truly understood the perspective and the plight of the working man; the guy who works on the farm as opposed to the guy who owns your farm,” Wharton says.

“It’s Alright Ma (I’m Only Bleeding),” Bob Dylan

Carter actually quoted from Dylan’s 1965 record “It’s Alright Ma (I’m Only Bleeding)” in his acceptance speech for the Democratic presidential nomination in 1976.

“When Carter was running for office, there was a huge divide between the sort of establishment world and the world of young people, (or) the counterculture, and Bob Dylan was a counterculture hero,” Wharton says.

“When Carter quoted Dylan, he was telegraphing to young voters that he listened to the same music that they did, and that was a big deal. The young people at that time were very much disillusioned by the Vietnam War and Nixon and (then President) Ford, who was the legacy of Nixon. That was what Carter was running against, and Carter was very smart to embrace the language of the counterculture.”

“Down by the Riverside,” Mahalia Jackson

Carter’s musical taste is incredibly diverse, ranging from folk rock to soul to jazz. But at the root of it all, the documentary shows, is gospel.

“The gospel piece of this puzzle was so important,” Wharton says. “It’s the genre of music that we dig into first in the film because gospel is the foundation.”

There’s the role the music style has played in Carter’s own life, as he recalls in the documentary going to gospel performances as a child. A longtime Christian, Carter is intimately familiar with the music of seminal artists like Shirley Caesar, James Cleveland and Mahalia Jackson, and he hosted his own (shorter) version of the “all-day gospel sings” he was raised on once he was at the White House.

But gospel is also foundational to Carter’s story because of the influence the genre had on other music he would grow to love.

“All rock ‘n’ roll stems back to gospel; hip hop stems back to gospel; R&B, it all comes out of that,” Wharton says. “I always go back to this idea that every culture in the world has created their own form of music, and usually that spiritual music is the first kind of music that appears in a society.”

“Music is like the closest thing that any of us normal people will get to touching the divine,” she continues. “You can go to a place that feels like from another world, and music can help take you there. That, to me, is a big part of why Carter’s connection to music makes sense, because he was so connected to his spirituality.”

“Amazing Grace,” Willie Nelson

Some of Willie Nelson’s gospel music, Wharton learned, was actually a balm for Carter during an immensely tumultuous turning point in his presidency.

The 1979 Iran hostage crisis was obviously the most difficult challenge that (Carter) had ever faced, and obviously a very, very stressful time for him. And he was able to get through that by listening to a Willie Nelson gospel record,” Wharton says.

“Not even his aides knew about that. If it weren’t for our film, no one would know that there was a musical connection to how he managed to get through that crisis with such grace and humility and the ability to make the hard choices to be sure that those 52 American hostages came home alive. His presidency was killed by it, but those Americans came home alive, and that was all he cared about. The fact that music was the thing that helped him get through that is one of the linchpins, I think, of what makes this concept of the ‘rock ‘n’ roll president’ hang together.”

“Steps,” Cecil Taylor

In popular culture, Carter tends to come across “as a little bit of a fuddy-duddy; a grandfatherly figure with his cardigan sweaters and ‘aw shucks’ demeanor,” Wharton says.

In reality, “he’s a fan of some of the most intellectual, heady and supremely hip music on the planet.”

Exhibit A for the director was her discovery of Carter’s love of landmark jazz musician Cecil Taylor. Wharton had heard of Taylor but hadn’t really engaged with his music until working on the documentary, when she learned that Carter was obsessed with the artist.

“Cecil Taylor was this pioneer of the free jazz movement, so his music is very intellectual and incredibly avant-garde. I was just blown away when I started listening to it,” Wharton said. While they weren’t able to track down footage of a Taylor performance that fit the documentary, a song like “Steps” speaks to “a level of hipness that I don’t think anyone really expects of Jimmy Carter. … I love when I tell people that I wasn’t really that clued in to Cecil Taylor’s music until President Carter hipped me to him.”

“Salt Peanuts,” Dizzy Gillespie

During his presidency, Carter hosted Taylor at the White House as part of a massive jazz celebration.

Other giants of the genre showcased their artistry that day, including Dizzy Gillespie, who can be seen performing a rendition of “Salt Peanuts” in the documentary alongside Carter.

“Carter studied nuclear physics, and there’s a strong correlation between music theory and mathematics and science,” Wharton says. “When you start to look at those pieces of Carter’s personality, that he was a scientist, but he was also a humanist – it all points to his love of jazz.”

“Midnight Rider,” Allman Brothers Band

In Wharton’s view, some of the more surprising artists that Carter connected with were the members of the Allman Brothers Band.

The Southern rock group was “known for being rowdy and doing drugs and getting into fights,” Wharton says. “Just a whole different kind of thing really than any of those other artists.”

Other politicians would have considered that political kryptonite, but not Carter; in the film, he credits the band with helping him drum up support so he could reach the White House. Gregg Allman, in fact, was among Carter’s first guests after his election win.

“Can’t You See,” Marshall Tucker Band

Wharton also wanted to understand how the artists viewed their relationship with the politician.

“When it comes to the musicians who have, you know, lots of people who want to be their friend all the time, why wouldn’t they be suspicious of his motives, or feeling like he’s using them to get the young people’s vote, or something like that?” Wharton says.

What she learned is that “they could sense that he was genuine, and that he wasn’t just talking the talk,” she says. “Songwriters are always looking for truth, because that’s what makes a good song – when there’s enough truth in it that everyone can relate to it somehow, that’s when it resonates with a large audience. And the fact that Jimmy Carter was really the embodiment of the truth is a big clue to me as to why those musicians and songwriters in particular connected with him.”

“God Bless America,” Aretha Franklin

Focusing on a music fan like Carter meant uncovering some truly excellent performances for the documentary – including scenes from his inauguration ceremonies, which featured Aretha Franklin and Paul Simon.

“(They) were two of my favorite performers,” Carter says in the film, “and so when I got ready for the inaugural performers to be chosen, they were at the top of my list.”

“American Tune,” Paul Simon

“Sometimes things were so ridiculously perfect, you know, like the fact that Paul Simon played ‘American Tune’ at Jimmy Carter’s inaugural concert,” Wharton adds. “It was like, ‘what better song could he have picked?’ It’s so appropriate.”

“Coal Miner’s Daughter,” Loretta Lynn

Another priceless scene for Wharton was found in a Loretta Lynn performance of “Coal Miner’s Daughter” at the White House.

“Loretta Lynn is kind of everyman’s daughter in a way, and for her to be performing at the White House for the president and a bunch of other distinguished guests, it’s just so marvelous; she’s there in all of her twangy glory,” Wharton says with a laugh.

“That, to me, was the real pleasure of putting together the soundtrack, by looking at the pieces that are actually there. We’re not making it up that Carter loves Loretta Lynn; we see him giving her a big ol’ kiss at the end of the song, and he had invited her to perform.

“This music is intrinsically a reflection of who he is and how he lives his life, and it factors in ways large and small throughout his entire story. That’s what makes it so remarkable to me.”