Have you ever been watching a movie and noticed that the musical score was seeming, impossibly, to be perpetually rising, ratcheting up the intensity of the film more and more? Or perhaps it seemed to be perpetually falling, creating a deeper and deeper sense of doom onscreen? If so, it is likely that this effect was achieved using a Shepard tone, a way of simulating an unbounded auditory ascent (or descent) in a bounded range.

To understand how Shepard tones work, let’s look at a simplified implementation of one. We will have three musical voices (middle, low, and high), with an octave between successive voices. The voices then start to move, in unison, and always an octave apart, up through a single octave, over, say, five seconds. As they go, though, they also change their volumes: the middle voice stays at full volume the whole time, the low voice gradually increases from zero volume to full volume, and the high voice gradually decreases from full volume to zero volume. The result will simply sound like a tone rising through an octave, and it can be represented visually as follows.

shepard_1

This by itself is nothing special, though. The trick of the Shepard tone is that this pattern is then repeated over, and over, and over again. Each repetition of the pattern sounds like a tone ascending an octave, but, because of the volume modulation, successive patterns are aurally glued together: the low voice from one cycle leads seamlessly to the middle voice of the next, the middle voice from one cycle leads seamlessly to the high voice of the next, and the high voice simply fades away. The result sounds like a perpetually increasing tone.

shepard_2

Note the similarity to the visual barber pole illusion, in which a rotating pole causes stripes to appear to be perpetually rising. Also, this whole story can be turned upside down, which will lead to a perpetually falling tone.

Let’s hear some Shepard tones in action! Now, in practice, using only three voices does not create a particularly convincing illusion, so, to make these sounds, I used nine voices, spread across nine octaves. Also, linearly varying the volume, as in the above visualization, seems to make it more noticeable when voices enter or fade away, so I used something more like a bell curve.

(Technical notes: These Shepard tones were created in Supercollider, using modified code written by Eli Fieldsteel, from whose YouTube tutorials I have learned a great deal of what I know about Supercollider. Also, I used a formant oscillator instead of the more traditional sine oscillator.)

First, a simple ascending Shepard tone:

The effect becomes more convincing, and the tone more interesting, if multiple Shepard tones are played simultaneously at a fixed interval. Here, we have two ascending Shepard tones separated by a tritone, a.k.a. the devil’s interval, a.k.a. half an octave:

Next, three descending Shepard tones, arranged in a minor triad:

Finally, two Shepard tones, with one ascending and the other descending:


The origins of the Shepard tone lie with Roger Shepard, a 20th-century American cognitive scientist, as a sequence of discrete notes. The continuous Shepard scale, or Shepard-Risset glissando, which our code approximates, was introduced by French composer Jean-Claude Risset, who perhaps most notably used it in his Computer Suite from Little Boy from 1968.

More recently, it has prominently been deployed by Christopher Nolan and Hans Zimmer, as the basis for the Batpod sound in The Dark Knight and in the Dunkirk soundtrack.


Cover image: M.C. Escher, Waterfall

Advertisements

One thought on “Infinite Ascent: Shepard Tones

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s