They were once among Britain’s most beloved singers, their “murmurs musical” giving melancholy poets solace in their darkest hours. But these days the world-famous warblers are more likely to be found jamming with jazz musicians in neglected Berlin parks than serenading Londoners in Berkeley Square. Some even claim that their latest outpourings feature elements of German techno.

Luscinia megarhynchos, the common nightingale, has been shunning the UK since the 1960s, during which time the population has slumped by 90%. The number of birds in Berlin, however, is on the rise. According to cautious estimates by the city senate, the German capital’s nightingale population grew by 6% every year from 2006 to 2016: “a very high rate”, said Johannes Schwarz, a species conservation officer, who puts the current number of nesting pairs at between 1,300 and 1,700.

So ubiquitous have the feathered crooners’ excited trills become in the city that Berlin’s natural history museum and the German ministry for education and research last year launched a crowdsourcing project to seek a better picture of why the birds flock to the German capital in such numbers, and discover whether their songs have different dialects in different parts of the city.

Berliners were encouraged to record nightingales in their neighbourhood via Naturblick, an app that researchers describe as “Shazam for birdsong”.

One year on, just as the nightingales arrive in Berlin after a 3,700-mile journey from sub-Saharan Africa, usually returning to the same shrubs they were born in, a team of six researchers are beginning to draw their first conclusions.

At the heart of the nightingale effort is Sarah Darwin, a Berlin-based botanist who just happens to be the great-great-granddaughter of Charles Darwin. She grew up to the sound of Vera Lynn singing A Nightingale Sang in Berkeley Square, but was “gobsmacked” when she first heard an actual nightingale outside her window after moving to Berlin, and immediately spent the night listening to the bird’s song from a tent in her garden.

Facebook Twitter Pinterest Sarah Darwin. Photograph: José Jácome/EPA-EFE

Darwin’s colleague Silke Voigt-Heucke said that nightingales, just like many of the people who come to Berlin from abroad and make it their home, may be attracted to the city’s dishevelled appearance. “What makes Berlin unique for a capital in Europe is that we still have a relatively good network of green spaces that are not overtly cultivated. For now, there are still a lot of unkempt brownfield sites,” she said.

“Poor but sexy”, a now widely mocked marketing slogan coined by the former mayor Klaus Wowereit, may have had a more lasting relevance in the avian world. “Many of Berlin’s parks haven’t been managed properly for years, which has turned out to be a blessing in disguise,” Voigt-Heucke said. “Nightingales nest on the ground within or next to dense bushes, so piles of leaves and stinging nettles are perfect for them.”

A lack of predators is unlikely to be a factor attracting nightingales to urban living: Berlin has one of the highest concentrations of goshawks in Europe, and cats pose a constant danger.

A map of around 1,500 recordings in the Berlin area shows a number of nightingale sightings on the outer edges of large green spaces, such as the Tiergarten and Treptower Park – a result, naturally, of the fact that even keen ornithologists are less likely to wander into the dark undergrowth when the birds are singing at their loudest, between around 11pm and 3am.

At the same time, Voigt-Heucke said, the researchers’ findings raised questions over whether street lights and busy roads are really a deterrent to birds. One nightingale hotspot is on the brightly lit Strasse des 17 Juni, just 100 metres from the Brandenburg Gate. Another well-known nightingale is found every spring perched atop the same traffic light in the Alt-Treptow district.

What if Berlin’s nightingales, far from being put off by the endless noise of the city, are in fact attracted to it? That is the (contested) theory of David Rothenberg, an American jazz musician, philosopher and author of Why Birds Sing.

Facebook Twitter Pinterest The male nightingale sings to attract a mate. On average, a bird can combine 190 different songs. Photograph: Alamy

Since 2013, Rothenberg has visited the German capital every spring with a host of musicians to seek out nightingales and play music with them. The result is an entire album of collaborations, called Nightingales in Berlin, as well as a book and a film by the same name, premiering in the city this May.

First, Rothenberg said, nightingales would often feel threatened by the sound of a clarinet, a violin or a human singing voice, and try to interrupt it – a process known by scientists as “jamming the signal” – thereby preventing any foreign message from coming through.

“But he may respond differently,” he added. “A male nightingale who is confident in his territory, who doesn’t consider you and your clarinet or iPad or voice or cello a threat, will listen to what you play, wait a moment, then respond with his own short song, and then pause again.”

Scientists are more guarded about the idea that Berlin’s nightingales may be drawn to urban hubbub. “It’s true that nightingales get louder if the noise around them is louder,” said Voigt-Heucke. “One working theory might be that it is more costly for the bird to sing against street noise, and that that makes them more attractive to females. But it’s a hypothesis that would need to be tested.”

Where scientists and artists agree is that the nightingale’s song often defies its own cliche. “I was expecting melody, soaring up and down like Chopin,” said Rothenberg of his first encounter. In his poem The Nightingale, Samuel Taylor Coleridge described the bird’s song as made up of “murmurs musical and swift jug jug, / And one low piping sound more sweet than all”.

Instead, Rothenberg found the nightingale song to have “a scratchy quality, a bit like a DJ playing electronic music. “It has an incessant energy – it just keeps going. When you play a duet with a nightingale, you have to prepare yourself for them to win. They just don’t stop.” Some nightingales have been recorded singing non-stop for 20 hours.

Facebook Twitter Pinterest David Rothenberg in a still from the film Nightingales in Berlin. Photograph: Ville Tanttu

At times, Rothenberg found the birds dropping in “buzz sounds” as if to confound their listeners, a tactic he likens to jazz musicians playing a “blue note”, “a hip tone, a most excellent riff that only makes sense if used sparingly”.

Charlotte Schneider, a Berlin student whose essay on nightingale song structures has just won the regional prize in Germany’s youth science competition, came to a similar conclusion.

“I was surprised when I first listened consciously to a nightingale”, she told German website RiffReporter. “It was less tender and dainty and melodic than it is often described.” Nightingale songs are made up of an impressive variety of trills, gurgles, whistles and rapid “beats”. During the latter, Schneider said, “the tones don’t just come out rapid and hard, but almost mechanically precise – it’s almost like techno”.

Until recently, scientists had classified 700 types of nightingale song, which unpaired males intone in the first weeks of spring to attract a mate. But, after sifting through the crowdsourced sound files gathered across Berlin, the researchers at the Natural History Museum have now identified 2,300.

On average, a bird uses 190 of these, but can combine them in a surprising variety of ways – deliberately so, as Schneider argues in her prizewinning essay. “The nightingale works with the expectations of his audience, so that he gets as much attention as possible.” Like the violin virtuoso Niccolò Paganini, she said, the bird “manages to create an astonishing variety of patterns out of a limited number of motifs”.

“If you asked me who the most beautiful singer in the bird world is, I wouldn’t necessarily have picked the nightingale,” said Darwin. “But they are fierce, that’s what they are. In many ways they are typical Berliners – not exactly beautiful, but determined.”