Wikipedia defines the Shepard tone as "a sound consisting of a superposition of sine waves separated by octaves". What a useless definition.
The Shepard tone is the sonic equivalent of a barbershop pole: Multiple descending or ascending sounds which create an eternally descending or ascending sound (Or both with the help of the mighty tritone)
Pretty much the same thing
Some examples of the Shepard tone:
- Pink Floyd - Echoes (22:30)
- Godspeed You! Black Emporer - The Dead Flag Blues (7:15)
- Wolves In The Throne Room - Subternean Initiation (3:30)
- Wolvserpent - A Breathe In The Shade Of Time (14:45)
Creating the Shepard Tone in SuperCollider
SuperCollider is "a programming language for real time audio synthesis and algorithmic composition." We will be using SuperCollider today to make a Shephard Tone generator. After that, we will have some more abstract conversation on expanding the Shepard Tone beyond Sine oscillators.1 2 3 4 5 6 7 | ( SynthDef(\synth, { |freq = 440, amp = 0.2, sustain = 1| var sig; sig = SinOsc.ar(freq, 0, amp) * EnvGen.kr(Env.perc(sustain, 1), doneAction: 2); Out.ar(0, sig ! 2); // sig ! 2 is the same as [sig, sig] AKA stereo }).add; ) |
Let's play a simple tone through our new synth
1 | Synth(\synth, [freq: 440, amp: 1/2, sustain: 1]).play; |
Here we have a synth at 440 hz played at 50% volume for 1 second.
Here's our meat and potatoes, the base sound we will use. The interesting part is up next: There are probably many ways to make a Shepard tone. We will be creating our tone by first generating a downward sweep. Next, that sweep is repeated at least a few times before the first sweep ends.
Let's Start With A Sweep!
So we know how to play a tone, as seen earlier. Now we need to take 12 (Or however many) of those tones and make a sweep. We can do this by creating an array of all the notes in our sweep and then iterating over that array.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ( t = Task({ var cScale = [60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49];//12 notes descending starting at C //For every note in the array, convert that note to midi and then make some sounds cScale.do({ |midi| var octaves = 1; octaves.do({ |i| Synth(\synth, [ freq: (midi + (12 * i)).midicps, //(12 * i) adds octaves amp: 1/cScale.size, sustain: cScale.size]); }); (1/cScale.size).wait; }); }).play; ) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ( t = Task({ loop { var cScale = [60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49];//12 notes descending starting at C //For every note in the array, send that note to midi and then make some sounds cScale.do({ |midi| var octaves = 4; octaves.do({ |i| Synth(\synth, [ freq: (midi + (12 * i)).midicps, //(12 * i) adds octaves amp: 1/cScale.size, sustain: cScale.size]); //this is important - the first note should end as the loop ends }); (1/cScale.size).wait; }); } }).play; ) |
We now have a Shepard tone! Behold it's mind-melting glory, listen into it's abyss and feel the sound of death.
Ahem.
The Tritone Paradox
There's only going to be two small changes. First, we need a synth that will play two notes instead of one, a tritone apart
1 2 3 4 5 6 7 8 | ( SynthDef(\synthTritone, { |freq = 440, amp = 0.2, sustain = 1| var sig; sig = [SinOsc.ar(freq, 0, amp) * EnvGen.kr(Env.perc(sustain, 1), doneAction: 2), SinOsc.ar(freq + (freq / 2), 0, amp) * EnvGen.kr(Env.perc(sustain, 1), doneAction: 2)]; Out.ar(0, SelectX.ar(0, sig) ! 2); }).add; ) |
We also need to change the code to use this synth - Change this line
1 | Synth(\synth, [ |
to
1 | Synth(\synthTritone, [ |
There you go, we've now got a tritonic, perception-defying, disorienting wall of sound!


No comments:
Post a Comment