THE haunting sound of whales singing can be a soothing soundscape that can help people relax or it can conjure a sense of eeriness if you were to be alone on the open ocean at night. When whales are singing, we think that they are communicating with complex and beautiful songs that reverberate through the water for miles.

Whale song has captivated humans for decades, but the exact purpose and mechanisms behind it have long remained shrouded in mystery. Now, advances in underwater acoustic recording technology and whale research are pulling back the curtain on the secret lives of singing whales.

Scientists have identified several possible functions for whale song, including attracting mates, navigating, communicating over long distances, and expressing emotion. Male humpback whales are known for their complex songs lasting up to 30 minutes, which they repeat for hours at a time during mating season. This suggests whale song plays a key role in courtship.

Meanwhile, blue whale songs contain identifiable patterns shared by all whales in a population across vast ocean regions – evidence that songs could function for large-scale communication and coherence within social groups. Songs also appear to direct grey whale migration, with distinctive song types sung during different phases of their epic journey down the Pacific coast.

But how exactly do whales create their ethereal choruses? Their anatomy provides some clues. Toothed whales like orcas and sperm whales possess a single nasal passage connecting their blowholes to their larynx. They use the larynx to block and seal the airway while they are underwater, and they create sound using a vocal organ in their nasal passage.

Mammals, including humans have folds of tissue that we call vocal cords. These are found in a specialised region called the larynx.

As air from the lungs is exhaled the pairs of folded tissues of the larynx vibrate and this creates sound. Baleen whales like humpbacks and blue whales have two nasal passages thought to be involved in song production.

These passageways connect to laryngeal sacs surrounded by muscles that can vibrate to modulate sound.To discover how whales create sound a team of scientists studied the larynges from three different species of baleen whales, a sei, a humpback and a minke whale. They then created an air supply that would mimic the lungs of a whale. As they blew air between a fatty pad and the surface of the vocal folds sound was produced.

Whales have exceptionally large brains. Interestingly, the biggest whale, the blue whale, does not have the biggest brain. Although a blue whale can measure anything up to 90ft long their brain weighs in at about 7kg (15lb). The sperm whale however comes in at around 9kg. By comparison an adult human brain is about 1.4kg and an elephant brain is about 5kg.

In the whale brain there are entire lobes dedicated to auditory processing – perfect for making and analysing the nuances of intricate whale song. Their ears are the only mammalian ears adapted to work underwater. They also function at low frequencies, ideal for long-range communication. The ears also “float” inside their head so they figure out which direction the sound is coming from.

Advanced technologies are enabling new insights into the acoustic qualities of whale song. Directional hydrophones can trace songs back to individuals, while acoustic tags attached to whales record data on song usage and production.

Bespoke software is then able to visualise whale song to provide tantalising indications that whales combine such song elements in hierarchical sequences like the structures we see in human language. This raises profound questions about the linguistic capabilities of whales.

We know that whales can hunt in packs, and this requires a level of communication to organise themselves so that the prey do not all get away. They can stalk their prey, isolating them and finally capturing them. Whale song, we believe, allows the whales to communicate and co-ordinate their hunting.

Whale song represents a complex form of culture and communication we have only begun to grasp. Each population possesses a distinctive musical dialect transmitted between generations for reasons still largely mysterious to us.

Unlocking the secrets of whale songs could illuminate their behaviour, social structures, and intelligence.

But time may be running short to understand these wondrous cetacean ballads. Noise pollution, climate change, hunting, and ship collisions increasingly threaten singing whales. Recordings of whale song take on a new urgency as fragile acoustic environments and whale populations rapidly change.

If we listen closely, whale songs may reveal wonders about both our world and that of whales. But we first must ensure these haunting melodies continue to reverberate through the deep for generations to come.

Dr James Williams is a senior lecturer in education at Sussex University