Pop star Meghan Trainor has said writing a song for Snoopy And Charlie Brown: The Peanuts Movie was “challenging”.

The All About That Bass hit-maker co-wrote Better When I’m Dancin’, which was hailed as “another classic confidence-boosting tune” by Billboard.

It also features on the official soundtrack for the 20th Century Fox film directed by Steve Martino.

Snoopy and Charlie Brown: The Peanuts Movie
Snoopy and Charlie Brown: The Peanuts Movie (20th Century Fox)

During an interview with the Press Association, Meghan explained why the process had not been easy.

“It’s all challenging,” the 21-year-old stated. “Writing for a movie was a little more pressure for me because before this, I had never done it.”

She added: “This wasn’t just writing a song that I loved; I had to make sure all of Fox loved it, as well as the director of the movie.”

The Peanuts gang, including a Peanuts-ized Meghan Trainor in the centre
The Peanuts gang, including a Peanuts-ized Meghan Trainor in the centre (20th Century Fox)

Charlie Brown, his pet beagle Snoopy and the rest of the gang made their debut in cartoonist Charles Schulz’s Peanuts comic strip 65 years ago.

In addition to the popular and influential comic strip, which was read daily by 355 million people in 75 countries at its height, Peanuts made the transition to television and movies.

Specials such as A Charlie Brown Christmas and It’s The Great Pumpkin, Charlie Brown remain small-screen favourites.

A Boy Named Charlie Brown was the first feature film released in 1969.

Thirty-five years on from Bon Voyage, Charlie Brown (And Don’t Come Back!!) – the last two-dimensional cartoon movie, the gang hit cinemas in state of the art 3D animation.

This fifth movie, written by Craig and Bryan Schulz (the creator’s son and grandson respectively), sees our hero face a big test when a new girl arrives in town.

Grammy-nominee Meghan said she wants audiences to have a positive experience.

“I hope they love the movie just as much as I do and I hope the songs I wrote for it make them dance and feel happy,” she enthused.

The Massachusetts-born star broke into the music industry without the assistance of a talent show, such as American Idol – but she had good words for them.

She said: “I think they can be very beneficial for developing a fan base for a new artist.

“I was always way too scared to even audition for those kind of shows, so I have a huge amount of respect for the people who do try out.”

Meghan, who has two Billboard Music Awards to her name, revealed her admiration for fellow female singer-songwriters.

She said: “I’ve been really listening to Kacey Musgraves’ new album. Both her first and second album are really inspiring and blew me away because she is not afraid to speak her mind.

“She really has something to say and shows that in these songs. I’m proud that she actually writes her own music.”

Meghan made it clear it is all about the music when asked what she would change about her industry.

“Politics,” she stated. “Because they get in the way of what actually matters, which is the music being made.”

Snoopy and Charlie Brown: The Peanuts Movie is released in UK cinemas on December 21.