Thursday, March 04, 2010

The Music of Pi

I have an amazing world first to announce! And even better, one that you can experience!

In the afternoon I modified my music software NoiseStation II, adding to it the facility to import and export notes in text form. There are two formats, the most useful perhaps being the "gap, note, gap, note," where "gap" is the spacing in "ticks" (typically that is 48 for one beat) and "note", the note pitch in cents where 50 is C octave zero, so 150 is C-sharp, 250 is D, 1250 is C octave 1 etc. etc. so a tune of three notes might look like "48,350,48,150,48,850."

That allows me to write software to generate and process music, and quickly import it into my sequencer for high quality rendering. It's something I've planned to do for years but never got round to it. I have developed an elaborate algorithm to analyse existing pop songs and write new ones that are similar to those input. Now that becomes easier.

Now for the premiere!

My impetus for today's programming was an idea to write an album of music based on transcendental numbers, and I wanted to hear the most famous of all, the number pi. My first task will be to convert these numbers into base twelve. Decimal is not appropriate for a musical scale. I don't know enough about maths to do it unfortunately, but some eager scientist has published on the Internet the first few digits of pi in base twelve. With that it was easy to convert it and import it into NoiseStation, and so, for probably the first time, you can hear the first few digits of pi absolutely correctly, in base twelve over one octave played in a sine wave.

I need mathematical help to produce an algorithm, or even a very long list of digits, for pi, e, and other interesting numbers in base twelve.

This album is on my "to do" list for 2010 and will be highly experimental.