“The Ballad of the Lonesome Cowboy,” was recorded for the soundtrack to Toy Story 4, which will be available on June 21 when the film opens nationwide.

Penned by Randy Newman, the new tune was written from the perspective of Woody, the pull-string cowboy voiced by Tom Hanks.

“Woody feels like he was a lonesome cowboy until someone comes along and changes his world,” says Randy. “Chris Stapleton did a great job on this song.”

Listen to “The Ballad of the Lonesome Cowboy” below.