Wed Jun 10 18:57:46 CEST 2009

Using finite fields for music

One of those ideas that disappeared into the background..  Let's try
again.  A finite field[1] or Galois field is a field[2] with p^n
elements, where p is a prime number.  There is only one GF(p^n) upto
isomorphism.  The field p^n is the field of polynomials over p, modulo
a reducable polynomial of order n.

For music applications, it is probably possible to look at Galois
fields in the same way as one would use the complex number field to
represent sum-of-sines.  Multiplicative cycles can be used as
different rhytmic/harmonic components, and each element of the field
could be associated to an instrument, or a combination of.  

For music we need the numbers 2, 3, 5 and 7 in copious quantities.
Larger prime numbers are less interesting from a harmony/rhythm point
of view.  Given that we're looking for a certain combination of small
prime numbers in the factorization of the multiplicative group, we can
start typing things into a calculator as see if we end up at prime

  2^a 3^b 5^c 7^d = p^n - 1

A more systematic way is probably in order, i.e. generating[5] all
power of primes below a certain number and investigating the factors
of the multiplicative group order.  However, to illustrate the idea
let's just pick a few starting from the factorization.  The first
candidate is GF(211) which fits nicely in 8 bits.

  2^2 . 3 . 5 . 7 = 211 - 1

Another one that fits in 8 bits is GF(241).

  2^4 . 3 . 5 = 241 - 1

The question is: how to make this interesting?  We can generate
periodic sequences of numbers using formulas like:

   x_n = \sum a_i g_i^n

where g_i are generators of cyclic subgroups, and a_i are arbitrary
field elements.  The first question is: given a particular
representation of a GF, how many such sequences exist?  Suppose we
associate a certain configuration of drum sounds to each element in
the field.  How many patterns can be generated?  Are they at all
interesting?  What about maps from the elements to a smaller number of

Maybe combinations of drums can be associated to terms in a
polynomial.  Is there an interesting way to combine a non-prime field
with cycles this way?  

Maybe the interesting stuff lies in the symmetries of a field[7]?
I.e. start with a simple rhythm.  Find a (small) field to embed it in,
then find variations of this by looking at the field's automorphisms.

How can a GF be visualized?  The structure of the additive group is
quite straightforward: for GF(p^n) it is n times p cycles.  How can
the multiplicative group be shown on top of this?  There's a
visualization of GF(3^2) here[3].  Visualizing the the group as
actions on a set seems like a good idea.  Looks like a nice
application for graph visualization[4].

Intuitively it seems that groups with small p and n in the same order
of magnitude, will contain a more interesting structure.  Instead of a
single flat space (p^1) the structure is a vector space where each
dimension has a separate entitiy.  It allows the representation of
instruments/notes (q) that can sound together in chords(n).

I.e. 5 tones, 3 note-chords gives 5^3=15 with a multiplicative group
of 14 = 2 . 7 elements.  More concisely:

order   factorization
          add   mul
15        5^3   2 . 7 
21        7^3   2 . 2 . 5

As a side note, maybe Galois Theory[7] is interesting to study in its
own right, as it is connected to polynomials which are next to
matrices the bread and butter of numerical math.

[1] http://en.wikipedia.org/wiki/Finite_field
[2] http://en.wikipedia.org/wiki/Field_(mathematics)
[3] http://finitegeometry.org/sc/9/3x3.html
[4] http://en.wikipedia.org/wiki/Graph_drawing
[5] http://www.research.att.com/~njas/sequences/A000961
[6] http://en.wikipedia.org/wiki/Cyclic_group
[7] http://en.wikipedia.org/wiki/Galois_theory