Thursday, December 29, 2011

A Funky Primer (Correspondents)

This post builds on my previous post, "Alarm Clock Blues", so if there are any confusing terms, please refer back to that one!

As is the case with most mathematics, it is easy to lose track of what the components of a structure look like when analyzing the way the structure interacts with other similar structures. In this post I'd like to explore the consequences of x- and y-blocks where gcd(x,y) != ("is not equal to") 1, since most music I listen to, and most people listen to, are made out of these blocks. I'll elaborate on this, but first let's get back to the B section of Alarm Clock Blues.

In our example, each pattern is made out of equally sized notes with distinct pitches- these are our components. While I don't really care about pitch, why waste a perfectly good extension to my x-axis? Without pitch, my blocks would be indistinct, since they are all full of notes without rests. By making all pitches in a block distinct, I make the width of a block clear. Additionally, I add clarity by making the first pitch of the block the lowest sounding pitch of the pattern. I could have equally made it first pitch the highest pitch of the pattern, as long as the first pitch was distinct.

As time progresses, chords are created by overlaying all of the parts. Here are the chords created for the first 12 beats of the B section (note that I put the 7-block, not the 6-block, in the bass. This is because the 7-block "causes the most trouble", since it is pairwise coprime to the other block lengths. And I've always thought the most interesting part should be in the bass.)

C4 --> C6 --> C5 --> Bb5 --> Eb5 --> G5 --> Eb6  --> Eb4 --> D4 --> C4   --> C6 --> C5   --> Bb5
C3 --> C5 --> C4 --> Bb4 --> Eb4 --> G4 --> Eb5  --> Eb3 --> C3 --> C5   --> C4 --> Bb4 --> Eb4
C2 --> C4 --> C3 --> Bb3 --> Eb3 --> G3 --> C2   --> C4   --> C3 --> Bb3 --> Eb3 --> G3  --> C2 
C1 --> C3 --> C2 --> Bb2 --> Eb2 --> G2 --> Eb3 --> C1   --> C3 --> C2   --> Bb2 --> Eb2 --> G2

The bottom line is Player 1, the second from bottom line is Player 2, etc. I bolded the first note of each block.

Now one might think that by repeating each pattern so many times would yield every possible chord made out of the domain notes in each block, but this is where gcd comes in once again.

If you have a x-block and a y-block with x,y not relatively prime (gcd(x,y) != 1), then you will not have every possible chord created by running the blocks end-to front until a congruence occurs (in which case the chord pattern will just repeat.) For example, in the B section of Alarm Clock Blues, you will never have a C2 (in Player 2) with a D4 (in Player 4) in the same chord. Player 2 is playing 6-blocks and Player 4 is playing 9-blocks, gcd(6,9) = 3 != 1.

Let's look at a much simpler example to understand the above more completely.


Here we have an 8-block stacked on 4-blocks stacked on 4-blocks. If you imagine the top line to be a hi hat, the middle line to be a snare, and the bottom line to be a bass drum, you have your absolutely most basic A Funky Primer rock beat. (If you can't imagine, I can't think of a more excited-to-teach-you guy than this one to show you what I'm talking about.)

In the bass 4-block, there is a hit on the first beat, and then a rest on the last three beats. In the snare 4-block there is two rests, a hit, then another rest on the last beat. In the hi hat 8-block, there is a hit on every beat. Like the C2 and D4, it's clear to see that the hit in the bass 4-block will never coincide with the hit in the snare 4-block. In fact, the bass hit will always line up with the first beat of the snare part and the snare hit will always line up with the third beat of the bass part. I will define the beat(s) that a beat from one block lines up with another block as a correspondent.

For example, the correspondent of the bass hit in the snare 4-block is the first beat of the snare 4-block. Similarly, the correspondent of the snare hit in the bass 4-block is the third beat of the bass 4-block. 

Now what are the correspondents of the bass drum hit in the hi hat 8-block? Well if you run the two end-to-front, as you see above, the bass drum hits line up with the 1st and 5th hi hat notes. Conversely, the correspondent of both the 1st and the 5th beat of the hi hat 8-block is the 1st beat of the bass 4-block.

Some notation: because already this idea is getting wordy let me define the following notation.
Given an x-block and y-block,
with x,y natural numbers not necessarily unequal,
and i a natural number representing some beat in the x-block,
and a1, ... , ak the correspondent beats in the y-block,
correspondent(x-block(i), y-block) = {a1,...,ak}
In plain english the above reads, "the correspondents of the ith beat of the x-block is the following subset of the y-block."

An example of the notation:
H = hi hat 8-block; B = bass 4-block; both as above (I have not yet introduced a way to define the blocks with numbers alone.) then,
correspondent(B(1),H) = {1,5}
correspondent(H(6),B) = {2}

To any mathematicians reading this, you probably want to scream at me for not just using modular notation (http://en.wikipedia.org/wiki/Modular_arithmetic a good starting point if you want to learn more.) Since you may at this point relate H to Z/8Z and B to Z/4Z, you may expect me just to use a statement like 6 (mod 8)  = 2 (mod 4). This was where I began my thoughts about the subject, but I have since realized that it would not be sufficient for music. The reason I want to invent the idea of a correspondent is because I don't want to assume that the contents of an x-block are distinct, because in music that is rarely the case.

First, I want to be able to account for rests, since what's not played is as equally important as what is played. For example, take S = the above snare 4-block. Sure, by my current definition of correspondent can compute and spit out an answer to the input: correspondent(B(1),S) = {1}, but that result doesn't really tell me anything musical since nothing is happening on the first beat of the snare 4-block. Therefore, if a correspondent beat is a rest, then the resulting correspondent set should just be marked with a *. So instead of correspondent(B(1),S) = {1}, I mark the beat with a star and I have correspondent(B(1),S) = {1*}.

But I want to push the idea of a correspondent further. Currently a correspondent as I define it fails to capture a situation like the following:


This is the same drum pattern with one small but significant addition. The bass part is no longer a 4-block since now there is an additional hit on the 7th beat of the pattern, so it is now also an 8-block like the hi hat. Now I need to rethink what question I'm trying to answer by finding a beat's correspondent in another block. A correspondent should tell me, in plain english, "what lines up with the note that I am looking at in the corresponding block." But if all I get out of correspondent(B(1),S) = {1*}, how am I supposed to know that the bass drum does in fact line up with the snare part, but only on the 7th beat, without having to look at the MIDI file?

Therefore when looking for my corresponding beats in the corresponding block, I should look at all beats in the corresponding block that correspond to all beats equivalent to the beat I am evaluating. 

Since all bass drum hits are equivalent in my scenario, I define the equivalence class B[1] = {1,5,7}. This is the location that all hits occur in B that are equivalent to the note that occurs on the 1st beat. This is clearly an equivalence relation, and therefore B[1] = B[5] = B[7] but in general I will take the first occurring beat to be my representative for the equivalence class. I'm afraid at this point some readers may be lost so let me give some examples.

Example 1

Example 1, A = 8-block
A[1] = {1,3,5,7,8}
A[2] = {2,6}
A[*] = {4}

Example 2
Example 2, B = 12-block
B[1] = {1,3,5,6,8,10,12}
B[2] = B - B[1]
=> B[*} = {null}


So now we are easily able to expand our definition of correspondent. The notation correspondent(B[1],S) (with square brackets instead of parenthesis) means to look for where all equivalent beats of the beat indicate correspond in the corresponding block. Therefore the following three statements are equivalent: 

correspondent(B[1],S) 
= {correspondent(B(1),S), correspondent(B(5),S), correspondent(B(7),S) 
= {1*, 3}

Lastly, since all rests are equivalent, I want a rest class to be defined by [*].

For example, in my second drum beat example, where B[1] = {1,5,7}, 
I can find B[*] = {2*,3*,4*,6*,8*} but since it's known that I'm looking at rests, I will just say B[*] = {2,3,4,6,8}. Note that in this scenario, where there is only one distinct note in the block, 
B[*] = B - B[1]. This will not always be the case in general. 

For the grand finale, I'm finally able to define blocks from scratch without having to write them out in reason or use music notation. To do this I will use equivalence classes. If I define all the equivalence classes in a block, I can then assign each class to a sound when I actually want to make music.


A = 8-block //as in Example 1
A[1] = {1,3,5,7,8}
A[2] = {2,6}
A[*] = {4}


B = 12-block //as in Example 2
B[1] = {1,3,5,6,8,10,12} //This is your standard bembé clave.
B[2] = {2,4,7,9,11} // fills in the spaces
=> B[*] = null

C = 15-block
C[1] = {1,2,3,5,8,13} //a recognizable pattern
C[*] = C - C[1]

D = 15-block
D[1] = {1,5,9,13}
D[3] = {3,6,9,12}

From my previous post I know that I'll have a congruence after lcm(12,8,15,15) = 120 beats, which equates to 120/12 = ten 12-blocks, 120/8 = fifteen 8-blocks, and 120/15 = eight 15-blocks.

Then I assigned a sound to each equivalence class, and here is what came out!


The above is a soundcloud link that is unfortunately not very informative unless you can pick out the parts by ear. Below is a link to a project I've been developing called Groovato. It's not quite finished, but it works extremely well illustrating this point. Simply scroll down to the groove called "8-12-15-15-Blocks", hit "Play it!", and then you can solo out the individual tracks at your discretion. If you create an account on Groovato you can also get a little more in depth with the tracks (altering their tempo, recording on top of them, downloading your recordings, creating your own grooves) but the whole thing is a little buggy so please be patient with it! It is definitely a better medium to explore track-based music with.


As always, please leave any feedback in the comments, as I need all the help I can get developing this thing.

Next up- Rhythmic Generators!

No comments:

Post a Comment