Cartoon caveman Fred Flintstone sometimes strummed a double bass while his pal Barney Rubble bashed tortoise shells as if they were drums.

Now it seems real-life cavemen also had a flourishing music scene many thousands of years before the birth of Mozart, Brahms and Beethoven.

The great composers' earliest ancestors were playing musical instruments and showing artistic creativity more than 40,000 years ago, a study has shown.

Evidence of the musicians was unearthed in Germany in the form of primitive flutes made from bird bones and mammoth ivory.

A new system of fossil dating confirmed the age of animal bones excavated in the same rock layers as the instruments and examples of early art.

The bones, probably the remains of meals, bore cuts and marks from hunting and eating.

Got any Boney M? The flute made from bird bone (Image: PA)

The finds, described in the Journal of Human Evolution, are from Geissenkloesterle Cave in the Swabian Jura region of southern Germany.

They show that the Aurignacian culture, a way of living linked with early modern humans, existed at the site between 42,000 and 43,000 years ago.

It suggests that some of the first "modern" humans to arrive in central Europe had a musical bent.

Professor Nick Conard, from Tubingen University in Germany, who took part in the excavation, said: "These results are consistent with a hypothesis we made several years ago that the Danube River was a key corridor for the movement of humans and technological innovations into central Europe between 40,000 to 45,000 years ago.

"Geissenkloesterle is one of several caves in the region that has produced important examples of personal ornaments, figurative art, mythical imagery and musical instruments.

The new dates prove the great antiquity of the Aurignacian in Swabia."

Cartoon crooner: Fred sings along to Barney's piano

The results indicate that modern humans entered the Upper Danube region before an extremely cold climatic phase around 39,000-40,000 years ago.

Previously, experts had argued that modern humans only migrated up the Danube immediately after this event.

Professor Tom Higham, from Oxford University, who led the team that dated the bones, said: "Modern humans during the Aurignacian period were in central Europe at least 2,000-3,000 years before this climatic deterioration, when huge icebergs calved from ice sheets in the northern Atlantic and temperatures plummeted.

"The question is what effect this downturn might have had on the people in Europe at the time."