AT THE time I was recording 'MacArthur Park', 25 years ago, the Beatles were also in the studio recording the 'White Album'. I sneaked in and sat at the back of the control room. They were laying down 'Honey Pie'. Paul looked as though he was having a good time, sat at the piano with a sweater tied around his neck, and Linda straddled around him; John was sitting on a rug on the other side of the studio, burning incense and candles; George was standing in the middle playing bass guitar; and Ringo was out of sight in a drum booth.

After a while they got a pretty good take and Paul came into the control room to listen. He nodded at me and went over to George Martin. Then Paul beckoned and introduced me to George as 'Tom Dowd from Atlantic Records'.

I was so fresh off the farm there was no way I was going to correct Paul McCartney, so for the next 15 minutes I enthused about the track as 'Tom Dowd of Atlantic Records'. Then George Harrison came in and whispered: 'By the way, I love those strings on 'MacArthur Park'.' It was all a send-up.

I knew John pretty well when he was hanging out with Harry Nilsson. John got into a fight one night, and at six in the morning I was rousted out of bed by Harry saying: 'We need you, pal.' I went to a lawyer's office with Harry and John and perjured myself, saying I'd seen the whole fight and John hadn't laid a finger on anyone. But I hadn't been there and had no idea what I was talking about.

In a way George Martin is Sgt Pepper. He looks like an RAF hero, has an aristocratic bearing and you get a special feeling when you walk into a room he's in. He's so precise. He later produced an album for me, El Mirage, and I think about him at least once every day.

While we were in the studio we'd make paper planes to race in the hall. I learnt to make some great paper planes on that album, but so did George. I went into the control room and he'd constructed entirely in paper a scale model of a high-performance sail-plane. It flew damn well. Working with George I was like a kid in a candy store, because we shared the orchestration thing.

'MacArthur Park' is the one song I've been asked about in almost every interview I've done. For a while I got tired of being asked what the 'cake in the rain' line meant, but I learnt to live with the questions - and I have made up dozens of different stories about its meaning.

I pre-recorded all the tracks for 'MacArthur Park' in Los Angeles then brought them to the Lansdowne Studios, in London, for Richard Harris to record his vocal track. We'd leave his house in Belgravia in his Rolls-Royce Phantom V with a pitcher of Pimms. In the studio we'd put Richard on the microphone, the Pimms on a stool and he'd sing until the Pimms was gone. Then the session was over - in more ways than one. He did pretty well, it took him only two or three stabs to get that high note.

When I'm writing I come from two directions. One is a completely musical place, and then I find lyric ideas which fit. But that's a rarity: more often I get the lyrics organised, then go to the piano. I keep a fairly prolific notebook and I'm always going to it for ideas.

I don't like writing a song unless it needs to be written; I never write on spec. I just wrote a song for a musical, a ballad called 'If You Love Me, Love My Dog'. It's a love song between two women and I found it quite difficult to get into those shoes.

One lesson I've learnt is that I was probably meant to have been a writer of prose; it's so much more challenging to construct prose than write a three-minute song - there's a limit to how much enjoyment you can get from that.

I was a real Tin Pan Alley kid in my teens and my idols were Burt Bacharach and Hal David, Neil Sedaka and those kind of people. I always knew that I had a certain way with certain songs.

Then, in the early Seventies, I realised I was being pigeonholed into oblivion as a writer of pop songs for Frank Sinatra and Barbra Streisand. I'm not knocking it, but it certainly wasn't who I was or what I was interested in; I was more interested in what the Beatles and Rolling Stones were doing.

When I was 21 people would come to me saying they expected me to be a 40-year-old man and I found myself something of a stranger in my own generation, so I made a conscious break and struck out on my own with rock'n'roll bands.

I always pick up ideas when I'm in London. I wrote 'The Highwayman' in London, a country song that won a Grammy award. I always write when I'm in London; I sit in a pub scribbling in my notebook, looking at people, listening to the things they say and soaking it all up.

'The Highwayman' was recorded by Waylon Jennings, Willie Nelson, Johnny Cash and Kris Kristofferson, and I was really impressed. How many times in your life can you say four people like that got together to record one of your songs? There are certain really spectacular moments in this life of mine; that was one of them.

There's no one I've ever been annoyed at because they recorded one of my songs - as a publisher I'm delighted when anybody records one of my songs. Needing the money's no joke. I've got six children and a T- shirt that says 'My Children and My Money go to Boston University'.

The song I'd most like to be remembered for is not one you'd expect: it's a pretty little song called 'The Moon is a Harsh Mistress'. One of the people I've been most pleased with for performing a song of mine was Bob Dylan; he did 'Let's Begin' every night on his European tour.

What would knock me on my arse today is if Paul McCartney sang one of my songs. I've been told he likes 'Didn't We'. If he recorded that it would put me on a cloud for 90 days. It's what a songwriter lives for - that kind of a bow from someone like that.

And when it happens it feels better than sex.

Jimmy Webb is appearing at the Cafe Royal's Green Room, London W1, until 13 September.

(Photograph omitted)