Sunday, March 2, 2008

Canon Loop

No, I promise, this won't be a Pachelbel marathon. Looping that canon would be way too easy, and it's so been done.

However, my exploration of Strange Loops and Shepard Tones led me to something really fascinating, and has resulted in the most interesting and satisfying of my loop creations. [see video below if you can't abide my prose.] In 1980, Douglas Hofstadter won the Pulitzer Prize for his book, Gödel, Escher, Bach: an Eternal Golden Braid, which, introduced the concept of strange loops as part of a dazzling exploration of meaning, self-reference, artificial intelligence, etc. It's been years since I read the book (although I'm a huge fan of Hofstadter's later work, Le Ton beau de Marot), so I had no memory of his suggestion that the "modulating canon" from Bach's The Musical Offering could be made to cycle endlessly by using Shepard tones. (He apparently did this with some 70's era synthesizers; I don't know how often it's been done by others.)

Here's the basic idea: this canon is an 8-bar structure which modulates up one whole-step each time through. Thus, when played six times, the performers have moved from C Minor to D Minor to E Minor to F# Minor to G# Minor to A#(Bb) Minor and back to C Minor, one octave above where the canon began. So, the music could go on infinitely, but it would soon become inaudibly high. (Before it became inaudible, it would probably be unbearably squeaky.) However, Hofstadter proposed that the Shepard tone technique could make it possible to modulate up to the same pitch where the music started. How? By slowly fading out one register while another fades in slowly from below.

Naturally, I couldn't resist trying this out - and there went my weekend! Not surprisingly, the Shepard principle works much better when the register fade take place over 2.5 minutes, as opposed to the brief scale snippets I experimented with earlier. Also, I think the dry, staccato attacks of my virtual guitars helps, because we're less likely to notice the subtle balance changes when the notes don't sustain. One surprise is that I'm quite pleased with the way the little computer guitars handle this "performance," and I think it's actually satisfying musically. For example, I much prefer their sound to this; not only is the counterpoint in my version clearer, it's also more pleasant to listen to. This is certainly Bach at his most Webernesque, so the impersonal interpretative point-of-view works.

The video below also incorporates a score - the resolution is borderline acceptable (I'm working on improving that), but I thought it was worthwhile to get all 8 measures on-screen at once. Along with my improvised "follow the magic yellow line" technology, it provides a really clear way to "see" the canon unfold. Each new page is essentially the same music, transposed up. I think the fade-down to the lower octave is pretty well camouflaged, although you can certainly pinpoint the switch if you listen for it. Still, it's remarkable to hear this music unfold this way, continuously modulating upward, but always ending back in the same place.

The top voice is based on the tune given to Bach by Frederick the Great. The other two parts are in canon, with the bottom voice leading and the middle voice following a measure behind and a fifth above. (A red arrow at the beginning of the video shows how the two relate.) The bottom voice (leader) is recorded on the left channel and the middle voice is recorded on the right channel [UPDATE: The stereo separation was lost in the YouTube transfer; the left/right distribution of parts does work on the download files below]. The modulation up is easy enough to hear each 8 measures, although it's worth noting that the top voice mostly traces a downward trajectory. This also helps to disguise the Shepard tone illusion.

Of course, the audio is what counts; I listened to it looping continuously on the 30-minute drive home from a recital tonight; that's some pretty stimulating wallpaper - it really clears the brain. You can download the mp3 here and try for yourself. Also, since I haven't gotten YouTube to make the video as clean as I'd like, you can download a higher quality .wmv version here. It's about 33MB, but easier on the eyes.

If you want to hear my other recent experiments in looping, take a look at the last few posts. I'm still enjoying my looped Tchaikovsky sequence as an alternative to the Bach. Both are more appealing than most of what I can find on the radio, and I find the aural wallpaper idea quite interesting. Many classical radio stations trend that way anyway, but why not go all the way?

[Speaking of Hofstadter and the topic at hand, his latest book (2007) is called I Am a Strange Loop. I haven't read it yet, but I think I know what he means. I don't know if he revisits the idea of applying Shepherd tones to this canon.]

UPDATE: Just discovered something called Google (?!) which lets you do web searches; this led to the discovery of other Shepard tone recordings of this canon, including this one on organ and this one. I'm sure there are others, and there's much more information out there about Shepard tones. But there's no more time to search for now . . . [UPDATE2: but I did listen to that organ one, found on this course site, and must admit that the illusion is exceptionally well-disguised. I think we're so used to hearing single voices playing multiple registers on an organ that the ear is more easily fooled by the subtle phasing in of a new register. I prefer the sound of my guitars, but concede that the the effect works better on the organ recording.]


Elaine Fine said...

Well, I'm using this in my class tomorrow!


So am I! (then maybe they'll see why their last set of projects haven't been graded yet.)

kevinsjournal said...

Do you have a midi file for this?


Thanks for the question. So, as best as I can remember, I started with a single MIDI file that I created and then converted it to audio, once starting at pitch and again starting an octave below. Then, I used an audio editing program to layer the two audio files, with the lower octave fading in gradually as the upper octave fades out.

I'm sure there are other MIDI versions of the piece out there (at, etc.), but here (I think) are the two MIDI files I used to generate the audio:

Lower Octave

Upper Octave