A whale calling out into the ocean can sound beautiful, haunting, and at times, completely inorganic. In the case of humpbacks, there is in fact something remarkably calculated about their songs—something scientists didn’t even know until around 50 years ago, and still don't fully understand today. 

It was around that time in 1968 when Katy Payne, a researcher in acoustic biology at the Cornell Lab of Ornithology, and her husband Roger, a biologist, met Navy engineer Frank Watlington on a trip to Bermuda. They were connected through a mutual friend who thought the Paynes and Watlington might hit it off over a mutual passion for whales. Just a few years earlier, in 1965, humpback whales had become so endangered that the International Whaling Commission placed a temporary ban on commercial hunting.

Watlington invited the couple onto his ship and played the recording below of a male humpback, which he had picked up while doing work with underwater microphones called hydrophones. At the time, the hydrophones were being used by the Navy to listen for enemy submarines.

"I had never heard anything like it," Katy told NPR. "Oh, my God, tears flowed from our cheeks. We were just completely transfixed and amazed because the sounds are so beautiful, so powerful—so variable. They were, as we learned later, the sounds of just one animal. Just one animal."

Watlington had kept the recordings a secret for fear that the songs of the humpbacks would be used to find and kill them. He instead handed them off to the Paynes, who found there was more to discover in them than anyone initially realized.

In an effort to “see” the sounds, Katy made spectrograms showing the frequencies in a purely visual way. It was in the spectrograms that she started to notice a structure and what appeared to be rhythms and melodies. As she’d discover, the vocal patterns of humpback males (they’re the only ones who sing) aren’t random, and whales in a group will sing a song in roughly the same way. The whales will also make changes through time—altering rhythm, pitch, and duration after listening to each other. In other words, it’s sort of like they’re engaged in one long songwriting session.

Scientists aren’t totally sure why the songs change, but Katy said it might have something to do with—what else?—attracting females. The males might be awarded for their innovations, not so unlike human courting methods.

Proving this phenomenon was occurring wasn’t easy. The Paynes spent years recording whales, jetting around the world listening to the music of the ocean—while making their own at night. In 1970, Capitol Records released an album of humpback whale songs recorded by Roger, Katy and Frank, which remains the best-selling nature sounds album of all time.

Years later, at a Greenpeace meeting in Vancouver, an anti-war activist played the whale songs for then-director Rex Weyler. At the time, the fledgling organization was looking for a cause to kickstart environmental efforts. With that, Save the Whales was born. Fast forward to earlier this year, when the National Oceanic and Atmospheric Administration proposed changing the way humpback whales are classified under the Endangered Species Act. Of the 14 distinct populations in the species, only two would still be considered endangered and two would be classified as threatened.