The Well-Tuned Cosmos

by R. Andrew Lee

1. Introduction

The Well-Tuned Cosmos started with a few ideas that took a while to find each other.

The first came from Scott Unrein, a composer who I have known for many years. Scott once talked to me about a piano piece inspired by the Dark Sky project, written to last the exact length of a single night, however long or short that night happened to be. That made me wonder how you'd release such a composition. That thought stayed with me long after he first pitched the idea, and somewhere along the way the answer started to look less like a recording and more like an app. A piece that would live in perpetual loop, but could only be heard at night.

The second came with my dog, Zuzu. I got Zuzu, a Great Pyrenees, in the summer of 2023, and she is the first dog I have ever owned. That winter, walking her in the dark cold of rural Wisconsin, I fell in love with the night sky. Having recently relocated from Denver, I enjoyed much less light pollution, and walking the dog meant getting to see the sky night after night, week after week, month after month. Over the course of a season I started to see the sky change. Constellations and stars became familiar, and I watched the planets drift slowly through them.

There is also Bach. Years before any of this, I played some preludes and fugues from The Well-Tempered Clavier on a keyboard that allowed for historical tuning rather than equal temperament, and the experience changed how I heard music. Different keys had different colors. Intervals that were always slightly off on a modern piano landed cleanly. It was the first time I understood, in my hands and ears, that tuning was not a fixed background but something you could compose with. Everything that came after, including this piece, traces back to that experience.

Of course, the piece is also indebted to La Monte Young. Several visits to the Dream House have left me with a sound world I keep thinking about, long sustained just-tuned tones filling a still room. It inspired me to do my own exploration of just intonation and sine waves, setting the ever changing night sky to music.

2. The Concept

The Well-Tuned Cosmos is a piece of generative music that uses the sky above you as its “score.” When you load the page, it asks for your location, looks up which named astronomical objects are above your horizon at that moment, and assigns each one a sine tone. The brighter the object, the louder. The higher in the sky, the more present. Each tone is placed in the space around you to match where its object is in the sky, so a star low in the east comes from your right and a star overhead comes from above. As the Earth turns, stars rise and set, and the chord changes with them.

There is no playback in the usual sense. Nothing is recorded, nothing repeats. The piece is a real-time rendering of the sky you happen to be standing under. Two people listening at the same instant from different cities will hear different music. The same listener returning at midnight will hear something different from what they heard at dusk.

Daylight silences almost everything. The Sun overwhelms the visible sky, and the piece honors that by fading the stars out as morning arrives. Only the Moon and the brightest planets stay audible in daytime, and only when they are far enough from the Sun to be visible against it. By night, the full chord returns.

What you end up with is a piece that is always playing somewhere on Earth and never playing the same way twice. It is also, in a small way, a way to learn the sky.

3. The Catalog

The piece currently tracks eighty-eight objects. The Sun, Moon, five planets, and eighty-one named stars. The cutoff for stars is apparent magnitude 2.5, bright enough to be visible from most city skies and bright enough that most have a proper name.

The naming follows the International Astronomical Union's official list. These are the names you would find on a planisphere, like Vega, Sirius, and Aldebaran. A handful of stars are obscure enough that the IAU has not given them a proper name, and those are listed by their Bayer designation, like Alpha Centauri or Beta Crucis.

Every sounding object and constellation chord has been intentionally chosen. An earlier version of the piece generated the dimmer stars by formula, mapping coordinates to pitches algorithmically, but that approach was retired so each voice could be chosen in relation to the ones around it.

The “Solar System” category is named with room to grow. For now it holds the Sun, the Moon, and the five naked-eye planets, but the intent is to add comets and meteor showers as the piece develops, so that the Leonids in November or a passing bright comet would have their own moment in the chord.

4. Tuning

The piece is tuned to a single low D. Every audible tone is a whole-number ratio above that D. The fifth above is exactly 3:2, the major third is exactly 5:4, the minor seventh is 7:4, and so on. This is just intonation, the tuning choirs drift toward when no piano is forcing them to compromise. Some constellation chords use less common ratios, the kind you might rarely hear anywhere else, to add greater interest and color to the piece.

The reason for using sine waves is simple. Sine tones have no harmonics of their own, so the only thing creating a sense of consonance between two of them is how cleanly their frequencies divide into each other. A 3:2 played in equal temperament is slightly flat of a true 3:2. On a piano you may not notice, but on two pure sines the difference is between a still chord and a slow wobble. The Well-Tuned Cosmos uses just intonation because it wants the option of being exactly in tune, and the option of being exactly not quite in tune, rather than the tempered compromise that lives between them.

The D itself is set to 36 Hz, low enough that the piece's lowest octave sits below the threshold of pitched hearing. The D you actually hear most often is 144 Hz or 288 Hz, and the brighter stars climb through the octaves above. Faint stars sit higher still, in the kind of register where the pitch becomes more like a glint than a tone.

5. Spatial Design

When The Well-Tuned Cosmos places a tone in space, it does not just pan left and right. It uses a head-related transfer function, the same kind of filtering that lets headphones convince your ears that a sound is coming from above or from behind. Every star sits where it actually is in the sky. A star directly overhead sounds directly overhead, a star low on the southern horizon sounds behind you, and a star low in the east comes from your right. For now, the composition assumes you are facing north, but a future version on a phone could read the device's orientation and rotate the chord with you as you turn.

The best listening experience is with headphones. The effect depends on small spectral cues that each ear picks up independently, and stereo speakers in a room can blur them. On headphones you can close your eyes and locate the bright stars by ear. On speakers, the distinctions are less clear and the elevation flattens out.

The positions update slowly, in step with the actual motion of the sky. A single star moves too gradually to notice over the course of a minute, but over an hour or two you'll notice that the chord has shifted, with the western voices gone, the eastern voices louder, and the whole arrangement different than when you began.

6. Day and Night

The day and night cycle is the largest gesture in The Well-Tuned Cosmos. Over twenty-four hours the sky rotates once on its axis and the chord rotates with it, fading the western voices out and bringing the eastern voices up. The poles are an exception, where the stars circle parallel to the horizon and the day-night cycle itself stretches across a year. Either way, it is the slowest motion in the piece and the most complete.

The transitions are not abrupt. As the sun drops below the horizon the stars do not click on. They rise gradually through civil twilight, only reaching their full strength when the sky is genuinely dark. The same fade plays in reverse at dawn. If you happen to be listening through that window, the piece is at its most attentive, the chord changing shape under your ear in a way that mirrors what is happening to the sky outside.

Daytime is mostly silence, but not complete silence. The Moon stays audible at a reduced level whenever it is up, because the Moon is visible during the day and the piece honors that. Venus, Jupiter, Mars, and Saturn can sound during the day if they are bright enough and far enough from the Sun to be seen against it. Stars are silent during the day. Even Sirius, the brightest star in the sky, vanishes into the daytime blue.

The Sun itself never makes a tone. Its only role in the piece is to silence everything else when it is up and let it return when it has set.

7. Constellations as Chords

Stars are not designed in isolation. Each constellation is treated as a chord, and the pitches of its stars are chosen with one another in mind. Orion is a chord. The Big Dipper is a chord. The Southern Cross is a chord. Each one is shaped deliberately.

This is where the less common ratios show up. Different constellations might use different versions of a third, a pure 5:4 for one, the septimal major third (9:7) in another, and the undecimal neutral third (11:9) in yet another. These are three different shades of a third that equal temperament would smear into one. The choice depends on what is best suited for the constellation. Scorpius reaches for higher primes, with ratios like 19:15 and 9:7 and 20:19, building a chord with edge. The Big Dipper stays close to classic fifths and fourths, and settles into something more familiar.

A few patterns repeat across the catalog. Some constellations carry shimmer pairs, two stars tuned to nearly identical pitches with a small detuning so they beat against each other once every five to twenty seconds. Castor and Pollux do this in Gemini, Markab and Scheat in Pegasus. The shimmer adds another voice to the chord without adding another pitch.

Other pairings reach further. A bright northern star can share an exact pitch with a bright southern one, because no observer ever hears them both. Acrux in the Southern Cross sits on the same frequency as Dubhe in the Big Dipper, and Mercury slips onto that pitch too when it is up. The same trick works across the year, with stars half a year apart sharing a pitch because only one is ever in the night sky. Spica covers the spring slot, Algol the autumn one. The audible pitch space is finite, and these reuses keep the catalog from crowding it.

8. Listening Notes

The Well-Tuned Cosmos is not a song. It will not start, build, and resolve. It is closer to a wind chime, or a fountain, or a room with a good view. You put it on and let it run, and over time you start to hear what it is doing.

A few things to try. Listen on headphones if you can. The spatial design only really works there, and the shimmer pairs are easier to catch. Sit with it for at least ten minutes. The piece moves slowly, and the slow rotation of the chord with the sky takes longer to register. Try it at different times. Twilight is one window, when the chord is fading up or down with the sky. Moonset is another, when the deep voice of the Moon drops out of the texture.

If you want something to listen for, the shimmer pairs are a good entry point. Find Castor and Pollux in Gemini if they are up. They sit a few thousandths of a hertz apart, and you will hear them slowly beat against each other, an audible heartbeat in the chord. Vega, when it is in the sky, is the brightest tone in its register and a useful anchor.

Sometimes, though, it is best to just listen and let the music wash over you. The more you listen, the more your ear is likely to find on its own.

9. Roadmap

The Well-Tuned Cosmos is a work in progress.

The Solar System category is meant to grow. Comets and meteor showers are next, with date-window visibility logic so that the Leonids would only sound during their November peak and a passing comet would only sound while it is up. Dwarf planets and other named bodies are possible after that.

Other versions are coming. The web came first because it needed no installation and could go up immediately. Native apps for iOS and Android will follow, with macOS and Windows after them.

The phone version may look to see which way you are facing, allowing the chord to rotate around you in real time.

There is no end-state. The catalog will keep growing and the chord will keep being tuned.

10. Credits

The Well-Tuned Cosmos was composed and built by R. Andrew Lee. Astronomical positions are computed with the open-source astronomy-engine library by Don Cross. Star names follow the official list maintained by the International Astronomical Union. The piece runs in the browser on the Web Audio API.