The soaring, ocean-wide song of humpback whales is often likened to music, but when researchers first started analyzing the clicks, moans and cries, it took the eye of a mathematician to spot a pattern, writes David Rothenberg at Medium.

Rothenberg describes how a network of underwater microphones originally built to detect Soviet submarine first brought whale songs to the ears and minds of whale scientist Roger Payne and assistant Scott McVay. When McVay layed out the printed sonograms (which map pitch and texture of sound) on his living room floor, his mathematician wife, Hella McVay, saw the structure of the cetaceans’ calls. "Amazing!… it repeats!" she said. The team traced the sonograms by hand to gain a more simplified version of the structure and devised a notation system.

That original work was published in Science in August 1971. But the analysis of whale song has only grown richer since then. Scientists now understand how songs are passed from creature to creature over the distance of vast ocean basins and give each of the 11 populations of humpbacks around the world a unique song.

The songs also continue to inspire. Recently Rothenberg, a musician, teamed up with visual designer, Michael Deal to translate whale songs into musical notation. The shapes traced by Payne and McVay already resembled notation from Gregorian chants in the 10th century, so Rothenberg and Deal pushed the shapes a little farther. "We created a graphic notation system, where each discrete sound unit in a given population’s shared song is assigned its own stylized shape and color," Rothenberg writes. The duo's music and design effort is available in a newly-released album.

Here’s a small snippet of a full song recorded by Paul Knapp Jr. in 1992 off the coast of Tortola. The full version is featured in Rotenberg’s article and is available in Deal’s online shop:

The system makes repeated patterns more obvious to human ears as we listen along to a humpback whale song Rothenberg recorded off of the Maui Coast in March 2010.

Rothenberg’s relationship with whales is a unique one. He not only records and attempts to notate their songs, but sometimes he tries to play along. In The New York Times he describes his quest to send clarinet songs beneath the waves and accompany the humpback whales as they sing.

Most times when I drop my microphone and speaker underwater to play with the whales, I feel awfully lonely. There I am, making a strange sound and sending it out underwater, just hoping a whale might connect what he sings to what I’m playing. Often they just ignore me, but in the best of moments, and such a moment is just as rare as playing along with human musicians, some real contact may happen.

One of his favorite moments is featured on his CD "Whale Music." He also mentions that whale songs are sometimes far stranger than most people think. The soaring calls are punctuated with odd squeaks and groans, clicks and moans, that make it more "electronic than melodic, a full range of the kinds of crazy sounds that humans call music today."