Compute pi to base 12 using Python?

Bengt Richter bokr at oz.net
Thu Apr 14 01:35:24 EDT 2005


On Thu, 14 Apr 2005 03:14:51 GMT, Doug Schwarz <see at sig.for.address.edu> wrote:

>In article <mailman.1865.1113441561.1799.python-list at python.org>,
> Dick Moores <rdm at rcblue.com> wrote:
>
>> Dan wrote at 18:02 4/13/2005:
>> >On Wed, 13 Apr 2005 03:27:06 -0700, Dick Moores <rdm at rcblue.com>
>> >wrote:
>> >
>> > > I'm just trying to help an artist acquaintance who needs (I just
>> > >learned) the first 3003 digits of pi to the base 12.
>> >
>> >Now you've got me curious.  Why would an artist want the first 3003
>> >digits of pi to the base 12?
>> 
>> He says,
>> Do you know how I can get "base12 pi"?
>> Because the chromatic scale is base12.
>> c c# d d# e f f# g g# a a# b
>> 
>> Dick
>
>Does your artist friend have any idea what base 12 means?
>
Maybe he wants to play sounds of pi and has found base 10 digits don't
hit all the notes, and he may not be as dumb as you think ;-)

>The chromatic scale is based on one twelfth powers of two, i.e., if the 
>frequency of a note in the scale is f(n), then the frequency of the next 
>note is given by
>
>  f(n+1) = f(n) * 2^(1/12)
>
>so by the time you go all 12 notes in an octave you have doubled the 
>frequency.  There is nothing here involving base 12 or pi.
>
I expect something interesting and imaginative ;-)
It might also be interesting to keep a running sum of the base 12 values
and use sum % 88 to select piano keys, to let it walk intervals outside
of a single octave ;-)

I found using different base digits to draw end-to-end vectors selected from
equal vectors equally spaced in all base directions for a "random" walk picture
was interesting. I also changed the color according to various criteria such
as digit run length ending on the current digit. Maybe the artist could scale
that up and put it on the wall as backdrop to the music ;-)
It would be easy to generate postscript for it, that could be scaled up and
printed wall size. Or pdf. I'm tempted to play with my pdf plotting toy and
maybe make it work ;-)

I'm kind of curious what the ear could pick up about pi from hearing the sequence
as notes. Or intervals, or grouped to make chords even. Anyone have an easy python
midi interface for windows to play on the sound card? I could generate a .wav file
to play tones, but midi would be much more compact ;-)

Regards,
Bengt Richter



More information about the Python-list mailing list