Kepler's Orrery
Generative music based on gravity equations.

News
  • Kepler's Orrery is going to
    Maker Faire!
  • Kepler's Orrery goes to school
  • Kepler's Orrery is a generative music system that uses gravity equations to compose and play ambient music. Each simulation starts with a collection of bodies that attract each other, move, and swirl around under the influence of their mutual gravity.

    When the bodies collide, they make music. Each one is assigned a melody and an instrument and plays its next note at each collision.

    Simulations are set up with "world" files that specify position, mass, and velocity for each body, as well as their melodies and instruments, and world metadata that defines simulation parameters such as step size, modifications to gravitational constants, etc.

    The music it makes differs with each world. Sometimes slow and ambient; sometimes random, sharp, and surprising.

    While the simulations are based on gravitational equations, and therefore deterministic, from a listener's point of view, it is difficult to predict what is going to happen next, and so the soundscapes tend to remain fresh.

    New Version: New to Kepler's Orrery are two interactive components that allow users to modify the workings of the system in interesting ways:
    • A "physics tweaker" allows users to change the gravitational constant, add a repulsion factor, or add a (fictional) friction element, and then watch how the simulation differs under these new parameters.
      This component also allows users to turn on trails that indicate the paths of the bodies, and toggles viewing the force field vectors as the bodies move through the gravitational field.
    • A "world builder" allows users to reposition bodies, change their mass or initial velocities, and add or delete bodies, then restart the simulation to see how the initial positions change the outcome.
      This component also allows users to edit the melodies and instruments bodies play when they collide, and to add "mutators" to the system that change the mass and velocity of bodies that they collide with.

    Kepler's Orrery is Open Source.
    The player code has been released under GPL; the worlds (think of them as the "songs") under Creative Commons (attribution, share-alike). I'm hosting the code on java.net. You can browse the source code anonymously, and download the source if you register (free) and log in.
    Watch some videos!
    See it running live in an applet!
    Some notes about the algorithm

    Acknowledgements:
    Portions of the n-body simulator code were derived from code supplied with Introduction to Programming in Java: An Interdisciplinary Approach, by Robert Sedgewick and Kevin Wayne, Addison-Wesley, 2007. ISBN 0-321-49805-4
    http://www.cs.princeton.edu/IntroProgramming
    (See the source code for details)