SEATTLE — For 18 days, an underwater robot dived and surfaced and dived and surfaced — some 402 times in all — listening to the ocean’s depths as it traveled hundreds of miles along the continental shelf off the Washington and Oregon coastline.

The torpedo-shaped robot, called a glider, captured the percussive roar of a research ship’s air gun, which reverberated like a muffled bass drum. It listened to what sounded like the churn of a wobbly washing machine, which indicated the presence of a ship passing nearby. The 120-pound robot even caught the delightful, baritone whining of humpback whales.

For years, scientists have been working to untangle the mysteries of ocean sound. Noise travels much farther underwater than it does in air.

“Sound is to marine animals what light is to people on land,” said Joe Haxel, an assistant professor at Oregon State University in marine resources studies. It is the medium through which these creatures hear, locate themselves and communicate.

Just how noisy is the sea? Are humans — with freight ships and ocean drilling and sonar testing — making it louder?

“We know so little about the overall noise in the ocean and how that affects things — the critters that live there,” said Chris Meinig, the director of engineering for the National Oceanic and Atmospheric Administration’s Pacific Marine Environmental Laboratory in Seattle.

A new research paper, authored by both Haxel and Meinig and published last month in the peer-reviewed science journal PLOS ONE, chronicles the glider’s travels and explains how this technology allows scientists to listen to the sea and explore its murky depths.

“This is a new way to make measurements that inform us about what’s going on out there,” Haxel said.

Most ocean gliders operate without propellers or any propulsion system at all.

Instead, they carve through the water because of their wings, which angle against the saltwater as the robot adjusts its buoyancy.

“We use the wings to adjust the attitude and the flight path,” Meinig said.

Mechanical rudders are often equipped to help keep the machine on course. Batteries inside the tubular machine can move and adjust its ballast.

When gliders surface, they can communicate with satellites, share data and get instructions from their handlers. Then, they dip back down to a programmed depth, before beginning to climb through the water again.

Scientists use gliders to gather ocean temperatures, information about salinity and myriad other measures.

Seagliders were invented at the University of Washington. These robots have been searching the ocean for clues to science’s mysteries for about 15 years, Meinig said. But the technology continues to develop.

Because gliders do not have propellers, the quiet machines rarely disrupt normally skittish animals, Haxel said.

“They’re kind of sneaky,” he said.

Hydrophones, which are essentially underwater microphones, have allowed scientists to gather acoustic data from gliders for many years.

But studies of ambient ocean noise have typically relied on fixed moorings, which can only sample at individual locations and depths.

Gliders with hydrophones have not been used for extensive noise monitoring before, largely because the vehicles’ rudders often interrupt recordings. Haxel and other scientists managed to filter rudder noise from their audio using computer algorithms.

“I have not seen anybody do an ambient noise study with gliders like this before,” said Elizabeth Kusel, a senior scientist with JASCO Applied Sciences, who has worked with gliders for about a decade and was not involved in this research. “Their work is very valuable.”

Research scientists launched the glider on July 20, 2012, off Grays Harbor. It arrived 2½ weeks later near Brookings, Ore., some 285 miles away.

The robot traveled, on average, less than 1 mph. Its median dive depth was more than 2,050 feet below the ocean’s surface.

Scientists recorded throughout its journey, capturing audio of at least 11 encounters with Pacific white-sided dolphins, three brushes with humpback whales and several other creatures scientists could not identify.

The robot also captured passing vessels and the powerful air gun of a National Science Foundation ship conducting seismic research off the coast.

“It’s basically an explosion,” Haxel said of the air gun’s blasts. “Every 20 or 30 seconds you’re getting a large rumble in the water column.”

Oil and gas companies also use seismic air guns to research possible deposits. Their use is controversial because these blasts can harm nearby animals.