Signal and Sensation

Endless Scale

A scale that rises forever and never gets higher, drawn so you can see exactly how it cheats.

Open fullscreen →

What it is

Click, and listen to a scale climb. It keeps climbing. It never arrives anywhere.

This is a Shepard tone, the Escher staircase of sound, and the drawing next to it shows the trick while your ears refuse to accept it.

Two buttons: continuous glide is Risset’s version, stepped is Shepard’s original chromatic one. And you can send it downward instead, which somehow feels worse.

How it works

Ten sine voices, each one octave above the last, all sliding upward together. A voice’s loudness depends only on where it sits in the ten-octave range, under a window that’s silent at both ends. So a voice fades to nothing as it reaches the top at exactly the moment a new one fades in from below.

Voice i at cycle phase p sits at x = ((i + p) mod N) / N, with frequency fMin·2^(xN) and amplitude bell(x). Everything else follows.

When the phase has advanced by one, every voice has climbed an octave into the slot its neighbour just left, and since loudness depends on position and nothing else, the configuration is identical to where it started. There’s no seam because there’s no loop point. Every moment is the same moment.

Both of those claims are tests rather than assertions. One compares the whole set of frequency-and-loudness pairs at phase p against phase p+1 and demands they match exactly. The other sums all ten amplitudes across the cycle and demands the total stays within 2%.

What surprised me

I wrote the total-loudness test expecting to have to tune the window until it passed. It came back at 0.0000%.

The total isn’t approximately constant. It’s exactly five, at every phase, and there’s a reason. Summing N equally spaced samples of a periodic function cancels every Fourier component except those at multiples of N. A raised cosine has nothing above its first harmonic, so with ten voices the sum is precisely N/2 forever, as an identity rather than a coincidence.

That means my mental model of the illusion was wrong. I thought the fade shape was hiding a seam. It isn’t hiding anything. There’s no seam to hide, because the total energy is mathematically incapable of changing. Your ear gets no event to latch onto because no event occurs.

I then tried to break it to check I understood. A triangular window is also exactly constant, because a triangle has only odd harmonics and ten is even. A Gaussian leaks 0.09%, since it has a little of everything. And a window with a deliberate tenth harmonic added swings by 46% and audibly breathes once per cycle, which is what I’d assumed a badly chosen window would do all along.

So the rule for building one of these is narrow and precise. Any window will do, as long as it has no component at a multiple of your voice count.

What I would do next

The same construction in the frequency domain instead. An endless rhythm, where the tempo doubles forever and never gets faster.