Skip to main content

Generative music gets heavy (but fun) with Kepler's Orrery

Here in the CM offices, when we're not busy blasting each other to bits in rounds of Spacewar, we're chilling out to the sweet sounds of unpredictable generative music.

Now, at last, we've found a single program that can indulge both our passion for computerised gravity simulations and on-the-fly computer music. This happy medium is known as Kepler's Orrery - it's a Java-based generative music applet that creates tunes based on an ongoing gravity simulation. Check it out right here (opens in new tab) on the website of the creator, Simran Gleason. It's also been made an open source project, which you can check out over at this site (opens in new tab), if you fancy getting your hands on the source code.

The project page explains it all quite neatly:

"Kepler's Orrery is a generative music system that uses gravity equations to 'compose' and play music.

Start with planets (or stars or particles) that each have mass, position, and velocity, then run a n-body gravity simulator to make them move. They attract each other, accelerate, swirl around, and slingshot off each other. Sometimes they collide, and that's what plays the music.

Each body can have a melody attached to it, and plays its next note when it collides.

Composing for this system is tricky, but fun."


Fun indeed! Fire up the applet and we're sure you'll waste as much time on it as we did. Here's how a simple "world" looks in action, in case you're still baffled: