Wednesday, April 6, 2011

Listening to π

.
The number π has fascinated laymen (and, to be honest, mathematicians) for millennia.  It was observed that when the circumference of a circle was divided by its diameter, the number obtained was always the same for any circle (as long as it was on a plane; if the circle surrounded a hill, for example, what should its diameter be: over the hill, or through the hill?).  This fact is difficult to establish rigorously; on one hand, it is an extrapolation of a similar result regarding polygons; for instance a 20-sided polygon is practically a circle, and the perimeters of 20-sided polygons divided by their diameters is always roughly 3.13836 (π is roughly 3.14159).  Let's look at a 300-sided polygon; what do you get when you divide the perimeter by its diameter?  Roughly 3.14154.  Since this phenomenon has nothing to do with measurement, in principle it would be a constant anywhere and in any time.  On the other hand, there is no simple equation that one can solve for it; it is what is called a transcendental number.  A transcendental universal constant.

One of the interesting things about the actual number π is that when you find it accurately to a million decimal places, the decimal digits continue to be quite random; in other words, it is impossible to find a pattern to the digits (except, of course, the fact that they constitute π when assembled together).  Furthermore, any desired string of digits seems present somewhere in π, and there used to be Internet sites that would try to locate any string you wanted to check out, and tell you the position at which it was present.  (For instance, if you asked whether the string "159" was present, it would tell you yes, in position 4.)  This often strikes laymen as remarkable, but it would be more remarkable if a particular string was absent!  So, what with one thing and another, adding in the fact that the relatively esoteric peculiarities of the number π are often misunderstood by laymen to begin with, the mystique of the number has grown to the point where it is practically a religion!

Recently an amateur musician decided to convert the first 32 digits of π into a tune.  Usually, when random numbers are assembled into tunes, they are far from aesthetically pleasing.  The people in the present instance got around this in a clever way, by repeating the first 8 notes under the random sequence, like a chorus.  The result was strangely pleasing: (notes corresponding to) the infinite random sequence of the decimal expansion of π, over the recurring (notes corresponding to the) first eight numbers.

You know, when you think about it, the correspondence could have been anything.  These fellows chose to make 0 correspond to C, 1 correspond to D, and so on (it was all white notes, I believe.  Or it may as well have been, for all the difference it would have made), which is slightly less arbitrary than it could have been.  For instance, they could have made 0 correspond to C, 1 correspond to E, 2 correspond to G, 3 correspond to A, 4 correspond to D an octave higher, 5 correspond to G an octave higher ... why not?  And the tune would have been actually pentatonic, and simply beautiful, with or without the Cantus Firmus of the first eight notes!  (Or make all the digits correspond to various octaves of the notes C, E, and G, which would result in a gigantic C major chord, or at least an arpeggio.

The other arbitrary thing about this exercise (which I complained about on YouTube) is that laymen tend to think that the decimal system is god-given.  Actually, it is quite arbitrary, except for the accident that humans have 10 fingers.  You can use any positive integer, for instance 2, which gives you binary numbers.  In the binary system, you can represent any desired number using only 1 and 0.  For instance
1 [base ten] = 1 [base two]
2 [base ten] = 10 [base two]
3 [base ten] = 11 [base two]
4 [base ten] = 100 [base two]
5 [base ten] = 101 [base two]
6 [base ten] = 110 [base two]
0.5 [base ten] = 0.1 [base two]
0.25 [base ten] = 0.01 [base two]
0.75 [base ten] = 0.11 [base two] (just add the previous two equations)

and so on.  The number π in base 2 is just as infinite as it is in base 10, but of course the expansion only has 0 and 1 in it, and the part before the "." is going to be 11[base 2], which is 3.  Here is π in base 2 accurate to as many binary digits as shown:


11.00100100001111110110101010001000100001011010001100001000110100110001001100011001100010100010111000000011
[Base 2].

We could make a tune with just two notes for this one!  So we can certainly "hear" π if we want, but the tune is most definitely going to depend on what base we pick, and on the notes we pick to represent each digit.

The most reasonable correspondence, really, is to use the so-called 12-tone scale, which is all the numbers on the piano keyboard, counting some fixed note as 0, say C, and then numbering the notes consecutively.  (You could re-number the notes any way you like; the melody you get will sound equally "aleatory".  (As I have mentioned in earlier posts, the composer Vi Hart specializes in aleatory music, or rather, music generated by binary sequences that come from various sources, not necessarily random, as far as I can see.)

To represent a number in  base 4, for instance, we need to use the digits 0, 1, 2 and 3;
to represent a number in base 8, you need to use 0, 1, 2, 3, 4, 5, 6, 7.
The number of digits you need is equal to the base.  In decimal representation, we use the ten digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Base twelve requires twelve digits. 0-9 gives us ten, and we need two more; it's traditional to call them a and b.  The digit "a" stands for 10, and "b" stands for 11; to get the decimal number 12, we just go 10 [base 12].

In base 12, the number π is 3.184809493b918664573a6211bb151551a05729290a7809a492742140a60a55256a0661a03753a3aa548056468802 [base 12], to the number of places shown, using Mathematica, a computer algebra system.  I used the first few digits of this expansion to make a tune, and to give it a little more interest, I had it echoed in another part an octave below, then transposed the whole thing up a few notes, and repeated it.  It sounds completely arbitrary, though the accompaniment (which consists of the same melody delayed by a couple of notes) does make it seem "intelligent".  Here it is: 

No comments:

Final Jeopardy

Final Jeopardy
"Think" by Merv Griffin

The Classical Music Archives

The Classical Music Archives
One of the oldest music file depositories on the Web

Strongbad!

Strongbad!
A weekly cartoon clip, for all superhero wannabes, and the gals who love them.

My Blog List

Followers