Ed Sheeran has revealed that he was high on MDMA when director Peter Jackson texted him to ask if he would write a song for 'The Hobbit: Desolation of Smaug'.

The 23-year-old singer-songwriter admits he decided to try the drug for the first time while on holiday in Ibiza, attending his producer Jack Gossling's wedding.

He told Rolling Stone magazine: ''If I was ever going to try it, it would've been there.

''I thought the text wasn't real, because I was like, 'Is everything just great today?'''

The 'Lego House' hitmaker, who went on to write the track 'I See Fire' for the film, also spoke about his upcoming album, 'x', and claims he wanted ''raw, honest songs from the heart.''

He explained: ''When you hear that Kesha-Pitbull song, you know it's a hit, but it doesn't make you want to cry or laugh or sit in a corner for five hours just repeating it.''

Meanwhile, Ed also recently revealed one track from his album 'Don't' is about an ex-lover and singer who cheated on him in a hotel with a friend while he was downstairs.

He said: ''It's 100 percent not about Taylor [Swift]. Taylor's one of these people that if you p*ss her off and she writes a song about you, it's not good news for you.

''I've never dated Taylor. I've dated a few singers, though.''

Ed revealed he has played the song for Taylor and claims she told him: ''Whatever happens, ever, between us as friends, I never want to p*ss you off that much.''