The early Sixties. Everything is up in the air, not least love, drugs and sex. A group of talented teenagers from academic backgrounds in Cambridge — Roger 'Syd' Barrett, Roger Waters and David Gilmour — are all keen guitarists and among many who move to London, keen to discover more of this new world and express themselves in it. Mainly in further education — studying the arts, architecture, music — they mix with like-minded incomers in the big city.

In 1965, Barrett and Waters meet an experimental percussionist and an extraordinarily gifted keyboards-player — Nick Mason and Rick Wright respectively. The result is Pink Floyd, which more than 40 years later has moved from massive to almost mythic standing.

Through several changes of personnel, through several musical phases, the band has earned a place on the ultimate roll call of rock, along with the Beatles, the Stones and Led Zeppelin. Their album sales have topped 250 million. In 2005, at Live 8 — the biggest global music event in history — the reunion of the four-man line-up that recorded most of the Floyd canon stole the show. And yet, true to their beginnings, there has always been an enigma at their heart.

Roger 'Syd' Barrett, for example. This cool and charismatic son of a university don was the original creative force behind the band (which he named after the Delta bluesmen Pink Anderson and Floyd Council). His vision was perfect for the times, and vice versa. He would lead the band to its first precarious fame, and damage himself irreparably along the way. And though the Floyd's Barrett era only lasted three years, it always informed what they became.

These were the summers of love, when LSD was less an hallucinogenic interval than a lifestyle choice for some young people, who found their culture in science fiction, the pastoral tradition, and a certain strain of the Victorian imagination. Drawing on such themes, the elfin Barrett wrote and sang on most of the early Floyd's material, which made use of new techniques, such as tape-loops, feedback and echo delay.

Live, the Floyd played sonic freak-outs — half-hidden by new-fangled light-shows and projections — with Barrett's spacey lead guitar swooping over Waters' trance-like bass, while Wright and Mason created soundscapes above and beneath. On record they were tighter, if still 'psychedelic'. Either way, they sounded 'trippy'. And perhaps that was Barrett's intention. He certainly ingested plenty of LSD and other drugs, which didn't help his delicate mental balance.

Over the spring of 1966, the young band were regulars at the Spontaneous Underground 'happenings' on Sundays at the legendary Marquee Club, where they were spotted by their future managers Peter Jenner and Andrew King. And by the autumn, the Floyd had become the house band of the so-called London Free School in west London.

A semi-residency at the All Saint's Hall led to bigger bookings — at the UFO and the International Times' launch in the Roundhouse — as well as the recording of the instrumental 'Interstellar Overdrive' with the UFO's co-founder, producer Joe Boyd. (This track was later used on hip documentaries of the scene.) A signing to EMI followed in early 1967.

"We want to be pop stars," said Syd. In March, Boyd recorded Barrett's oddly commercial 'Arnold Layne' as a three-minute single. And with a Top Twenty hit to promote, the band took on a gruelling schedule of gigs and recordings.

They appeared at the coolest event of the summer, The 14-Hour Technicolor Dream in Alexandra Palace. They gave a concert under the banner 'Games for May' in a classical venue — the Queen Elizabeth Hall — where they displayed their theatrical ambitions through the use of props, pre-recorded tapes and the world's first quadraphonic sound system. (They received a lifetime ban for throwing daffodils into the audience.) And in June the Floyd released a single originally written for this event.

'See Emily Play', which was produced by EMI's Norman Smith, charted at Number Six and made it on to primetime TV's Top of the Pops three times (with Barrett acting increasingly strangely). This was followed in August by Pink Floyd's first LP, The Piper At The Gates of Dawn, which they recorded at Abbey Road next door to the Beatles, then working on Sergeant Pepper. Again making the Top Ten, the album is mainly Barrett's and is a precious relic of its time, a wonderful mix of the whimsical and weird.