The song begins with the four notes, created by Michaël Boumendil, which precede announcements at French SNCF railway stations which David Gilmour recorded on his iPhone at Aix-en-Provence station.
The song "Rattle That Lock" was inspired by and makes use of the SNCF jingle, composed by Michaël Boumendil, which Gilmour heard and recorded on his iPhone at Aix-en-Provence station while traveling to visit friends. When Boumendil first got a phone message from Gilmour, he thought it might be a prank, so didn't return the call.
The lyrics for the track were written by Gilmour's wife and long time collaborator, Polly Samson and are based around the themes of Book II of John Milton's Paradise Lost. The music video is also inspired by these themes.