Paul McCartney, seen in Washington earlier in June, says he's set to pen the music for a ballet. ((Jacquelyn Martin/Associated Press))

Paul McCartney says he's about to stretch his creative legs after being commissioned to write music for a ballet.

The former Beatle shared a few details about the fledgling project in an interview with the BBC.

"I'm interested in doing things I haven't done before," McCartney told the U.K. public broadcaster.

"That offer came up and I love writing music. The two went together and I said, 'Yeah.' So I just accept things before I even know what I'm doing."

McCartney did not reveal what dance company had hired him or when the ballet would be performed.

He noted that the project was still in its earliest stages and he didn't have a lot of details. However, he was enthusiastic about the job.

"I don't really know that much about it yet," he admitted. "I'm just writing music for it, but it's a switch."

Though best known for the pop and rock music he created with the Beatles, Wings and as a solo artist, McCartney has also made the occasional foray into classical music albums.

The most recent was Ecce Cor Meum (Behold My Heart), which he released in fall 2006 and which was inspired by his first wife, Linda, who died of breast cancer in 1998.

Composed for choir and orchestra, the classical oratorio in four movements had its premiere at Royal Albert Hall.

He also released 1999's Working Classical, which featured a classical reworking of some of his original songs, 1997's Standing Stone, which was based on a poem McCartney wrote, and 1991's The Liverpool Oratorio, created to commemorate the Royal Liverpool Philharmonic's 150th anniversary.

Earlier this month, McCartney was honoured at the White House with the Gershwin Prize for Popular Song.