One of this year's most thrilling scientific discoveries was TRAPPIST-1, the system of seven Earth-size planets that orbit a sun 39 light-years from our own.

There was just one problem with the newfound solar system: It looked as if it was about to blow up.

Whenever scientists simulated the movements of the TRAPPIST-1 planets, which orbit very close to one another, they crashed into each other after fewer than a million years. The issue stemmed from the orbits of the planets. All seven TRAPPIST-1 planets are locked in what's known as “orbital resonance.” Each planet takes a certain amount of time to orbit their sun — that's the length of its year. The lengths of the planets' years are related to one another in whole-number ratios. So, in the amount of time it takes the outermost planet to complete two orbits of the sun, the next planet has completed three orbits, the next one four orbits, then six, then nine, 15 and 24.

This resonance enhances the gravitational relationships among the planets, much the way periodically pushing a child on the swing can make the kid go higher and higher. And over the course of simulated centuries, these “pushes” add up until the orbits are warped enough to overlap one another. Eventually, two planets wind up in the same spot at the same time — with cataclysmic results.

That's the trouble with resonances, according to Dan Tamayo, an astrophysicist at the University of Toronto at Scarborough's Center for Planetary Sciences and the Canadian Institute for Theoretical Astrophysics (CITA): “They can be the seeds of chaos in planetary systems.”

When asteroids in the asteroid belt form a resonance with Jupiter, they are swept out of their orbits and can go crashing into Earth. That's why there are so few asteroids circling the sun in what's called the Kirkwood gaps, where the length of an orbit forms a whole number ratio to that of Jupiter.

But resonance can also be a source of stability. Neptune and Pluto have orbits that cross one another, but orbital resonance keeps them constantly at different spots along that path, so they don't collide.

The TRAPPIST-1 planets form the longest resonant chain in the known universe. The chance that humans would be lucky enough to detect them in the brief, million-year window of existence predicted by scientists models is so slim, Tamayo knew something else had to be going on. He suspected that the alien solar system was much older and that unaccounted-for factors were helping to stabilize it.

“It's this fickle, beautifully complex thing,” Tamayo said. “When you have these very special period ratios, things can either go very well for you or very badly, and that depends on how well you've considered additional parameters like orientation and eccentricity” (how circular an orbit is).

The seven planets of the TRAPPIST-1 system orbit a dim red dwarf star. (NASA/JPL-Caltech)

These parameters aren't very well understood, based on what scientists have directly observed about TRAPPIST-1, which is why so many models of the system crashed. To establish a stable system, scientists needed to make sure the planets were well tuned to one another, like instruments in an orchestra.

So Tamayo rewound his model of the TRAPPIST-1 system back to its beginnings, when the planets first formed out of the disks of dust and gas that surrounded their newborn star. When this process happened slowly, Tamayo and his colleagues found, the planets could gently nudge one another into just the right configuration needed to stay stable.

The researchers plugged the new model into the University of Toronto's supercomputers; in most instances, the results suggested that the system could persist for billions of years. The results were published Wednesday in the Astrophysical Journal Letters.

As Tamayo plugged away on his simulation, little did he realize that his next-door neighbor at CITA, astrophysicist Matt Russo, was studying the exact same question.

Like Tamayo, Russo was fascinated by the orbital resonance of the TRAPPIST-1 planets. But Russo, who has a degree in jazz guitar and moonlights as a guitarist in an indie pop band, saw something in the system that Tamayo hadn't noticed: It looked like music.

Musical harmonies are the product of resonance in the frequencies of particular pitches. The tones in a major fifth, as in the beginning of the “Star Wars” theme, are related by a ratio of 3:2, just like the outermost two planets in the TRAPPIST-1 system. A perfect fourth, familiar from “Here Comes the Bride,” makes the ratio 4:3, like the fifth and sixth TRAPPIST-1 planets. The human ear appreciates sounds that fit into these simple, whole-number ratios. Chords like the augmented fourth, which forms the clunky ratio of 45:32, are usually considered unpleasant. Notes that don't form any kind of ratio just sound wrong.

“I immediately recognized that would make beautiful music because it's that same pattern of period ratios that makes chords,” Russo said. “I thought, 'Someone should translate that into music to see what it sounds like.' ”

He wandered next door to Tamayo's office to ask whether he had any simulations he could play around with.

“That's when we realized that the two projects were really two parts of one project,” Russo said. 

The pair began working with Russo's bandmate, Andrew Santaguida, to translate the math of the TRAPPIST-1 system into sound. Here's what they came up with:

In this musical model, each planet is assigned a pitch that is 212 million times its orbital frequency, to put it in the human hearing range. The motion of the planets is also sped up by 212 million so it doesn't take 18.76 days (the length of the outermost planet's year) to complete one bar of the song.

Since the planets were detected via the transiting method, which measures dips in the amount of light from the star as a planet “transits,” passes in front of it, each planet emits its particular pitch at the moment of transit in the musical model. They also inserted a drum beat into the melody each time a planet overtook its neighbor — the moment in an orbit when the chaos-inducing gravitational tug of planets on one another is the strongest.

The resulting song is complex but surprisingly stable. The notes are harmonious; the drum beats regular. You could listen to it for a hundred million years, and the tune and tempo would not change.

This isn't a coincidence; it's a result of the “tuning” that Tamayo described in building his simulation. Just like orchestra members who take time to match their instruments to one another before a performance, the planets of TRAPPIST-1 have gradually settled into orbits that resonate perfectly. Their motion is as harmonious as a song.

“It’s the exact same physics, happening at the solar system scale and at the microscopic scale,” Russo said.

But the math of the universe is not always so musical. When the team applied their formula to Kepler-90, an extrasolar system of seven planets not in orbital resonance, the resulting melody was nothing more than discordant noise.

“The notes are random and just painful to listen to,” Russo said. “It's a nice comparison, because it shows just how special TRAPPIST-1 is.”

Read more:

Baby Louie, an infant dinosaur with a checkered past, finally gets a proper name

Humanity's strange new cousin is shockingly young — and shaking up our family tree

A scientist explains how to take pictures on Mars