More about Steganographic Étude (Noam D. Elkies)

The solution
The piece encodes the first 244 decimal digits of π, including the initial 3, which corresponds to the first note of the right hand, the E a third above middle C. Every fourth note of the right-hand part (that is, the second note of each group of four 16th notes) gives another digit. After the initial 3, the digits 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, etc. can be read off the notes: middle C, the F a fourth above, another middle C, the G a fifth above, high D a ninth above, then low D, A, and G a second, sixth, and fifth above, and so forth. This rule applies throughout the piece (except for the final two bars, which have no 16ths at all), for a total of 4*61=244 digits. The digit zero is encoded by a B just below middle C, as in the beginning of bar 9, so that all ten digits give a segment of the C-major scale, in the standard order 0123456789. These notes are always “natural” even when the music modulates from the home key of C to regions as far as A-flat major (in that 9th bar) and E minor (bars 38-40).

How was it written?
I started by printing out the notes corresponding to the desired digits of π where they’d have to go in the right hand (
like this); this in turn was automated with a simple PostScript routine that took the input

```
3 9 7 9 8 5 3 5 6 2 9 5 1 4 1 3 Pi
5 9 7 2 3 8 3 3 4 6 2 6 4 8 3 2 Pi
7 3 9 9 3 9 6 1 7 9 1 4 8 8 2 0 Pi
2 9 5 4 4 9 4 7 9 0 2 8 5 0 1 5 Pi
9 8 0 2 6 8 2 6 0 4 6 1 8 7 0 3 Pi
copypage erasepage
```
to produce the first page (NB the digits -- which I got by writing a short GP program -- are in reverse order within each line), and likewise for digits 81-160 and 161-240. I then wove a musical “story” around those notes, comprising not just the foreground figuration in the right hand but also the harmonic background of key-regions and progressions, and the occasional change in texture starting with the pedal point and tenor-range melody in bars 11-12. I write a bit more about this compositional process later (see the “compositional challenge” and “some details” sections below).

Why was it written?
The immediate motivation for writing the piece is that it would let me (and any other pianist who learns to play it) recite the first few hundred digits of π from memory -- albeit at a pace rather slower than is typical of such exhibitions. The only time I’ve actually done this in public was at
Harvard’s Pi Day celebration in 2005, where my recitation was not just slow but even included a wrong digit about two-thirds of the way through (perhaps I inadvertently inverted the octave pattern in bar 33), even though I reinforced my kinesthetic memory by “air piano”-ing the right hand.

Still, even 100 digits is way more than I could recite before starting this project. The first ten or so digits I memorized by osmosis decades ago because I saw them so many times in books or on the display of a hand-held calculator; I could certainly have worked my way at least up to 100 with a conscious effort (it would be no harder than committing a dozen or so phone numbers to memory), but it felt like a pointless waste of time. The inspiration for spending much more time to contrive and practice the Steganographic Étude was a presentation by Ben Rapoport, a fellow member of the Senior Common Room of Harvard’s Lowell House, on human memory and mnemonics. Several of the mnemonic techniques that Ben described had in common the use of a story or image to organize the information one wants to remember. This is the opposite of how one goes about efficiently storing information on a computer, where one “compresses” the data to strip away as much redundancy as possible. Humans memorize by adding redundancy, as well as extraneous information (since there are usually many ways to construct a mnemonic for a given subject, and the mnemonic realizes just one of these choices). Presumably the human brain can’t readily harness its huge memory capacity to store and organize a mass of patternless information, and the mnemonic pattern eases this organizational task.

Ben’s talk was not long before March 14, which is 3/14 in the American date format and is thus celebrated as Pi Day at many American schools and universities, including Harvard’s. Our celebration includes a contest for reciting digits of π from memory. So I thought to construct a piece of music that could function as a mnemonic for these digits. The math department had recently acquired an upright piano for the common room where the contest would be held; while very far from a concert instrument, this piano is much better than nothing, and I could practice my piece on it (anyone can use the piano after normal working hours) and eventually give the premiere on Pi Day -- probably the first and only time a new composition had been premiered on that piano, and certainly the only time I’ve ever given a premiere performance on such an instrument...

A compositional challenge
Copland once said (if I remember right -- and I paraphrase in any case) that when he used
serial materials in his music it was not for their musical qualities but for the absence of musical quality: the materials impose unnatural constraints that goad the composer in directions that would not have been explored otherwise. My piece uses the digits of π in much the same way. Barring the kookiest kind of mathemusical mysticism, we do not expect there to be some pattern to the sequence of decimal digits that lends the piece a special musical coherence. It is precisely the fact that digits are for all musical purposes random that makes it a nontrivial challenge to write a viable piece of music around them. The encoding must also be sufficiently simple that by knowing the rule one can reconstruct the digits from the piece with little additional effort.

There’s more than one choice of encoding scheme that one could use. I chose an association of digits with numbers that almost every musician knows well, via scale degrees. Using the piano’s home key of C major, and Middle C as the canonical starting point, this means that the scale notes CDEFGABC correspond to 12345678. Most of these correspondences are also reinforced by the name of the interval from Middle C to the scale note: D is a second above Middle C, then E is a third above, F a fourth, etc. (The upper C is an octave above, and “octave” is basically the Latinate form of “eighth”; likewise the neutral interval between middle C and itself is sometimes called a “prime”, i.e. “first”, though “unison” is more common.) Naturally then the D a ninth above Middle C had to correspond to the digit 9. As for zero, that had to be the B below Middle C, to continue the progression consistently. [That association is alas less natural in common-practice music theory, where we count starting from 1 even when it ought to have been 0; that’s for instance why two octaves add up to a 15th rather than a 16th: arithmetically all the interval numbers should be reduced by 1, so octave+octave=15th is really 7+7=14. But I digress. Twelve-tone music theory does count starting from zero, using the digits 0 through 9 for the notes C, C#, D, Eb, E, etc. up to A; but this encoding would make the mnemonic harder to use for most Western musicians, since we’re trained to think of (say) the Ode to Joy tune as 334554321123322 (see e.g. the “Scale Degree” window at themefinder.org) than as 445775420024422 --- to the extent that we think about it numerically at all.]

OK, so we have this sequence of several hundred notes. This is a somewhat well-known “tune” (which confirms that my choice of encoding is natural -- indeed one of the other competitors in the recitation contest sang the first few dozen digits of π to those notes). But it’s musically worthless as it stands: the notes are of necessity as “random” as the digits of π that they encode, and do nothing musically other than stake out the key of C major. (Note that this encoding scheme not only restricts the notes to the C-major scale but also overrepresents C’s, and the neighboring tones of D and B: a random digit distribution yields 20% C’s, 20% D’s, and 20% B’s, and only 10% of each of E, F, G, and A.) So the challenge is to embed this sequence of notes into a musically meaningful mnemonic.

I chose to make the π notes appear on every fourth note of a “perpetuum mobile” figuration -- 25% was about the largest proportion of forced notes I felt I could accommodate. I made my task easier by putting those forced notes on the second 16th-note of every group of four, an unstressed position and thus one of less structural significance in the larger-scale shape of the piece. The left hand would usually play a chord on every beat under the stream of 16th notes in the right hand. This texture, plus the contour of the opening phrase or two, make the beginning of my piece reminiscent of Bach’s D-major prelude from Book I of the Well-Tempered Klavier; but the two pieces go in different directions, and overall my piece feels closer to C.M.v.Weber’s perpetuum mobile (last movement of his first piano sonata) than to Bach’s prelude.

But I’m getting ahead of myself. First I had to decide how long the piece would be; I figured it would be reasonable to aim for 50 bars or a bit more, so that the piece would encode a respectable 200+ digits but not wear out its welcome. I then found a point in the digit sequence that suggested an appropriately decisive concluding gesture for the piece. That still left about 700 notes and their accompanying chords to write. Again, the challenge is not just to get from one forced note to the next but to do so in a way that makes musical sense on larger scales than four 16th-notes at a time -- usually in the familiar doubling sequence of beat pairs, bars, two-bar and four-bar phrases, etc.

Further examples: bars 21-22 (including the pickup to 21) claim a new high register for an implied melody C...|C...Bb...A...F#...|G.F.Eb...D modulating to G-minor, which is then reinforced in a lower register in the next two bars; this is echoed in the following four bars, Bb...|Bb...A...G...E...|F.E.D...E modulating towards F. Likewise in 37-46, where this time the new element is the octave figuration (which in effect raises the proportion of forced notes to 50% during bars 37-38 and 41-42). At the largest scale is the key scheme: starting from C major (first 12 bars), moving to A minor (reached in bars 17-20), then to F major (27-36), and back to C after at 48 (after inserting a three-bar dominant extension in 45-47 that breaks the regular pattern of 2- and 4-bar phrases). Note that bars 48-49 sound like a recapitulation of the opening two bars even though only one of the relevant π digits matches 3.1415926 -- or maybe two if we count 8 as a match for the first 1.

Along the way I sometimes get the opportunity to work with the digits of π rather than despite them, by exploiting the kind of fleeting pattern that the human mind imposes even on completely random data. Many π reciters use such patterns in the digit sequence to help organize their memorization, e.g. the fragment 84 62 in digits 18--21 after the decimal point (corresponding to the sequence linking the end of bar 5 to the beginning of 6), and the three 5’s at digits 177-179 (the beginning of the dominant extension in bars 45-47, noted in the previous paragraph). There are also fortuitous moments such as the sequence 67831 (digits 234-238) that would be of little help to most π reciters but are significant in the C-major encoding chosen for this piece. Thus 67831 becomes ABCEC, suggesting a final cadence in C major, especially with the first C coming right after the downbeat (bar 60).

Musical steganography
The resulting piece took the form of an étude -- a short musical composition that the performer can use to practice a specific technical challenge. (Creating the piece could also be regarded as a compositional study or étude.) I could have titled it a “mnemonic étude” for its intended function, or an “acrostic étude” because the notes that encode the digits of π appear in the same place in each beat, as do the letters forming the extra message in an
acrostic text. But it turns out that spotting this message makes for a surprisingly good puzzle: most people have a hard time finding the “message” in the score, even when told of its existence and given various hints on its nature. [I’d be most impressed if somebody could hear the acrostic in real time!] This suggests that the étude is also an example of musical steganography, whence my choice of title. (See this Wikipedia page if you’ve never heard of “steganography” before.) Musical steganography seems to be a natural idea which hasn’t been previously considered as such -- e.g. the Grove Dictionary has an extensive entry on musical cryptography, but none on steganography, though some of the cryptographic examples might be regarded as instances of steganography as well.

And yes, I did consider the alternative title “transcendental étude”, punning on the fact that π is a “transcendental number” in the technical mathematical sense that it satisfies no nontrivial polynomial equation with rational coefficients (Lindemann’s theorem). Alas this title is already firmly associated with Liszt’s series of twelve etudes. My étude, though not trivial to perform, is easy as π compared with Liszt’s...

The point is not just to estimate how many ways there are to strew notes on a page of staff paper, any more than one can count English sentences by merely enumerating strings of letters or words: such a combinatorial exercise vastly overestimates the actual count because almost all the resulting scores or texts are utter nonsense. The patterns that the human ear needs to make sense of music, from the smallest scale (individual melodies, chords and progressions) to the largest (overall compositional structure), impose many constraints; beginning students often have a hard time finding even one tolerable way to satisfy these constraints, and some masterpieces seem so intricately put together that it feels like one can account for every single note, as though the composer had no choice at all. Yet we have many thousands of good pieces of music, and many more must be possible, if only because many compositions are known to have been lost (a hundred or so Bach cantatas, for starters), and many others never got written because (for example) Mozart and Schubert died tragically young.

So, the question is how much the musical desiderata of psychological and structural coherence actually constrain the space of viable pieces of music. There is a precise scientific language (usually encountered in statistical mechanics, Shannon’s information theory, or signal processing) for measuring this “how much”; but such language might not seem suited to a concept as subjective and potentially controversial as a “viable piece of music”.

Yet to the extent that my Steganographic étude is “viable”, it can also be regarded as a proof of a lower bound on the number of viable pieces of this kind that could exist -- and thus on the “entropy” or “information content” of music (using the relevant terms from physics and computer science). Given that the decimal digits of π are essentially random, I could have started from any of the 10244 possible sequences of 244 decimal digits, and with similar effort could have constructed an étude that would presumably be about as convincing musically as the one based on the digits of π. So there are at least 10244 such pieces, no two of which are exactly the same. Put another way, each bar of the Étude contains more than 13 bits of information, because it encodes four decimal digits (and 213 = 8192 is less than the number 104 = 10000 of possible four-digit sequences). Note that the actual information content per bar must be even greater than log2(104) = 13.2877+, because there were further choices in weaving a musically sensible “story” around those 244 notes, not to mention the initial choice of writing this sort of piece rather than any other kind of music.