On the chromatic scale, pitch is divided into 12 equal parts to make an octave. Also, doubling or halving the frequency of a pitch adds or subtracts an octave, respectively.

The mathematical equation for this is the multiplication or division of a given frequency by the twelfth root of two.

Since I'm using a Google Docs spreadsheet to compute frequencies, this equation can be written as a formula to automatically find the next or previous value, like this:

=(n-1)*2^(1/12)

or

=(n+1)/2^(1/12)

*Note: (n+1) and (n-1) represent a next or previous cell's name, respectively, like F88 or F86 when applied to F87.*

Since there are 88 keys on the keyboard, if I start with Key 1, called A0 in musical notation, then I can use the second formula above to find Key 2. Once I know that, I can find the remaining 86 keys with the first formula.

Of course, this assumes that I already know the frequency of one key or pitch. But we (meaning humans) have scientifically measured them all through experimentation, so the problem is simply finding how to write the equation as a formula in Google Docs (and presumably Excel).

In my next post, I will show the mapping of color to sound by using these formulas.