# Creating coexistent patterns, with several pattern-less systems

I'm a young musician, as well as a computer programmer. My understanding of math is formed well to my needs, but I am by no means a mathematician, but the field is very interesting to me. I have come across a lot of questions in music theory relative to math. Much of it to try and make sense of the esoteric phenomenon that many great musicians have tried to make sense of. In the simplest sense some explain music as a repetitive pattern that can break or substitute itself to create tension or harmonic dissonance to resolve back to the original pattern.

The golden ratio has inspired many artists. Satie, Sonneries de la Rose + Croix no 1 is a great example of this. Where as the golden ratio is often seen as perfect, whereas dissonance is often seen as a "flaw" or break in repetition. This specific piece is interesting because it creates a pattern, breaks it in a very confusing manner, then resolves the pattern into something distinguishable which resolves back into the chorus. Bringing on a sort of epiphany

My experiment is based around Galois Field Theory. I'm looking for an algorithm to create multiple arrays of non-pattern distinguishable points, which collectively sum up to a distinguishable pattern. I aim to interpret this into a musical notation. Like I stated previously, I'm not a mathematician. So this problem is difficult for me to solve.

This leads me to my question. Would is be possible to create arrays of essentially anti-patterns which would sum to a distinguishable pattern? For instance a Fibonacci pattern, or perhaps any pattern which could be divided up into separate anti-patterns which could be resolved into the original pattern. If so, how? If not, why?

Inspiration came from Scott Rickard and some of his research in this area. This may clarify exactly what I'm trying to do. Take this pattern-less music concept and turn it into a way to create dissonance and tension in music which resolves in a similar manner to the piece previously mentioned by Erik Satie.

I realize my use of music jargon, and I will try and relate it to you in as mathematical terms as I can if you just ask. I know this might seem off topic, but truly this is a very mathematical topic, I'm just trying to keeps it relative to my goal and perhaps someone with similar interests can weigh in on this and perhaps aid me in making this question more geared towards the mathematician.

All a musician can do is to get closer to the sources of nature, and so feel that he is in communion with the natural laws. ~ John Coltrane

-
Is your use of the word ”anti-pattern” coming from design patterns? –  k.stm Mar 31 '14 at 9:42
No, that's why I quoted it. It just a short hand that I basically coined on the spot to easily refer to a "a system of no given pattern or relation". Which is more in reference to Galois Theory of generating pattern-less systems using prime numbers. –  tsturzl Mar 31 '14 at 9:45
"Galois Theory of generating pattern-less systems using prime numbers" --- I have taught Galois Theory, and Number Theory, and I have no idea what this means. –  Gerry Myerson Mar 31 '14 at 10:15
@GerryMyerson I’m just listening to the TED talk tsturzl linked. In it, the speaker mentions Galois and refers to Galois Field Theory as “the mathematics of prime numbers” and later claims that “Solomon Golomb realized that that mathematics was exactly the mathematics needed to solve the problem of creating a pattern-free structure.” So maybe this is the output of a mathematical version of a Chinese Whispers game? –  k.stm Mar 31 '14 at 15:07
And listening on, this is what I understood: By a “pattern-free structure” they mean a rearrangement $a_1, …, a_n$ of numbers $1…n$ such any difference $a_{k+1} - a_{k}$ for $k = 1…(n-1)$ occurs only once (modulo $n$). And what it offered as solution is taking a generator $α$ of $(ℤ/pℤ)^×$ and use $α^0, …,α^{p-1} \bmod p$ as a rearrangement for $1…p$ for some prime $p$. Then, by factoring out $α-1$, one gets $α^{k+1} - α^k = α^{l+1} - α^l$ if and only if $α^k = α^l$. And since $α$ is a generator, one ensures the uniqueness of the differences (modulo $p$). –  k.stm Mar 31 '14 at 15:21

I am still not sure what is actually meant by “pattern-free structures” and whether I’m missing something. The following is all under the assumption that what is meant are unique pitch relations between two consecutive notes (see my comments on the question).

One simple way to create “pattern-free structures” that collaboratively create a more visible pattern is to reveal the patterns of the “pattern-free structures”.

There are four ways for generating a cyclic dodecapohny, i.e. taking $2$, $6$, $7$ or $11$ as the generating elements (instead of $3$ for $88$ tones). Let’s chose $2$ and $11$.

(Notice that $11 \equiv -2 \bmod 13$, so the following effects are easily explained by observing that the two chosen generators only differ by a sign modulo $13$.)

I quickly opened up ghci (a Haskell interpreter) and computed the sequences:

Prelude> let tonate :: Integral a => a -> a -> [a];
tonate generator modulus = map ((mod modulus) . (generator^)) [1..modulus-1]
Prelude> tonate 2 13
[2,4,8,3,6,12,11,9,5,10,7,1]
Prelude> tonate 11 13
[11,4,5,3,7,12,2,9,8,10,6,1]
Prelude> zip (tonate 2 13) (tonate 11 13)
[(2,11),(4,4),(8,5),(3,3),(6,7),(12,12),(11,2),(9,9),(5,8),(10,10),(7,6),(1,1)]


As you can see, or check for yourself, the sequences $$[2,4,8,3,6,12,11,9,5,10,7,1] \quad \text{and} \quad [11,4,5,3,7,12,2,9,8,10,6,1]$$ seem to be pattern-free in themselves, but if you combine them by playing them simultaneously, … $$[(2,11),(4,4),(8,5),(3,3),(6,7),(12,12),(11,2),(9,9),(5,8),(10,10),(7,6),(1,1)]$$ … you see that there are only $4$ repeating intervals obtained this way: The minor seventh, the minor third, the minor second and the prime. These are ordered in a fairly regular structure. If you rotate the latter sequence first, the intervals might be a bit more easy on the ear:

Prelude> let rotate :: Integral a => a -> [b] -> [b];
rotate 0 x = x; rotate n x = rotate (n-1) (last x : init x)
Prelude> zip (tonate 2 13) (rotate 6 $tonate 11 13) [(2,2),(4,9),(8,8),(3,10),(6,6),(12,1),(11,11),(9,4),(5,5),(10,3),(7,7),(1,12)]  Of course, you can also reverse one of the sequences or rotate by other offsets and combine those effects. You can try this with larger sets of tones and start playing around. The mathematics you need to understand is that of modular arithmetic. If you want to get an even more advanced understanding, you should look at some basic ring theory (i.e. commutative rings, the notion of a ring homomorphism), maybe including the Chinese Remainder Theorem. You can also look at what Scott Rickard was probably refering to, i.e. some simple group theory and the Galois Fields$ℤ/pℤ$for a prime$p\$ (which are needed for this Golomb-trick to work).

But frankly, anything but modular arithmetic is mathematics students struggle with in their first two or three semesters, so it might take a while to get a hold of it. But modular arithmetic should be fine and give you the right perspective on these patterns.

And honestly, I am by no means a musician – I don’t even play an instrument –, so please forgive me if this is a bit naïve. Also, I’m not really good in seeing modular structures and I don’t even know that much elementary number theory. So I’m pretty sure that someone else can come along and give a more mature perspective.

Actually, there are four ways instead of two for generating a cyclic dodecaphony.

Prelude> zip (tonate 6 13) (tonate 2 13)
[(6,2),(10,4),(8,8),(9,3),(2,6),(12,12),(7,11),(3,9),(5,5),(4,10),(11,7),(1,1)]

-
Sorry for the late response. Was trying to see if anyone else was going to weigh in on this. You're answer is great actually. Don't worry about the musical aspect. Numbers are rather pseudo, and I plan to interpret them as physically as possible through music. I'm sorry for my lack of proper terminology. After all we are co-operative counterparts of an academic whole. –  tsturzl Apr 16 '14 at 1:15