The song that Pippin (Billy Boyd) sings to Lord Denethor that plays as the Gondorian army rides to reclaim the city of Osgiliath was written by Billy Boyd two days before the scene was shot. The writers gave him the lyrics they wanted and Boyd wrote the music.
Billy Boyd is an amazing musician. He's the lead singer for a band called Beecake. They're pretty awesome. This is their song "Rip It Up."