Saturday, September 7, 2013

A-Flat Minor part II - Chords

A-Flat Minor part II—Chords

In the previous post, I discussed chords and how harmonics of a single note can be considered the basis for the notes of a chord. There's a very interesting discussion of how chords relate to the harmonics of a single note in this article originally published in Experimental Musical Instruments (which basically inspired this whole project). One of its claims (if I understand correctly) is that consonance only really occurs between identical notes, and chords themselves only sound consonant because they have shared notes in their harmonics (this means that if we call the harmonics of a single note timbre then we can say that notes of a nice-sounding chord depend only on the timbre of the instrument - the traditional major chord sounds nice only with a timbre that produces harmonics which are exact integer multiples of the root).

Part I looked at the notes in the harmonics, and this part will look at the common frequencies in both major and minor chords.

Major Chords

Previously, we saw how the harmonics of a single note produced a range of other notes. The diagram below shows the notes reached (as indicated by angle on the spiral) by these harmonics:

The notes for the major chord are taken from the first three unique angles encountered, the I, V and III notes.

What happens when we play a major chord using these three notes? The following shows us:

There's a lot of information in this chart, and I'm not sure exactly how to interpret it all. The root (I) and its harmonics are in red, the fifth (V) and its harmonics in blue and the third (III) in green. When notes coincide, the colors are combined additively (as indicated in the key in the top left). The first thing to note is that the III and V notes both combine with the root (turning from green to yellow and blue to magenta respectively). This isn't surprising, as we picked those notes exactly because of this property. What is maybe more surprising is the lack of white notes, with VII and IV# being the only notes where harmonics from all three notes combine. The II note has combined harmonics from the root and fifth, much like the V itself. Also oddly, none of the other notes have the root (I) as a harmonic, it stays purely red all the way to the edge of the spiral.

Whether our ears actually pick up all this information is another matter, but nonetheless it offers an interesting visual representation of a major chord.

Minor Chords

The Otonality and Utonality link mentioned last time provides an elegant explanation for the notes of a major chord, being the first individual notes from the harmonics of the root, as we saw above. It also provides a similar explanation for the minor chord, with a few adjustments: the notes of a minor chord can be found from the subharmonics of the fifth of a minor chord! The subharmonics are integer divisions of the root frequency, eg  f, f/2, f/3, f/4...  (while the harmonics are integer multiples, eg f, 2f, 3f, 4f... ). If we look for the first unique notes, they are f, f/3, f/5 and again we can multiply by powers of 2 to get them in the same octave. Then we get ratios 1:4/3:8/5 or 15:20:24. Looking at Wikipedia
we see this should be 10:12:15, which we will get if we raise what we've considered the root to the next octave (and stick it on the end) giving us 20:24:30 = 10:12:15.

So what's going on here is that a minor chord is composed of the I, IIIb, V notes , and we can justify this by saying the notes are the first sub-harmonics of the V note. [Because I'm such a fan of this elegant theory, if it was up to me I'd prefer to rename minor chords to use the fifth rather than the root as the identifier - I'm guessing the reason the current scheme is used is due to the similarity to the major chord eg I, III, V for the major vs I, IIIb, V for the minor (you just have to move one finger on a piano!). If the fifth was the root, the notes would be I, IV, VIb which means moving two fingers!] I'm going to use both chords below, referring to the I, IV, VIb chord as a 'pseudo-minor' chord

All this theory about the minor chord is actually a lot easier to see in the diagram of the harmonics:

The above is the harmonics of the pseudo-minor. The I, IV and VIb notes are the first three notes that have a harmonic at the I position (we can see this clearly here, the 12 o'clock notes turn from red to yello to white as the harmonics combine). We can also see white notes on the III and V positions (even though the V note is not one of the chord notes it seems to play a significant role). This is in contrast to the major note, where there were relativley few white notes, but a lot more cyan, yellow and magenta notes.

We can look at the more traditional minor chord too:

This is essentially the same as the previous diagram, but rearranged so that what was the IV note (all green in the previous diagram) is now rotated to the root (red), and the old root is increased by an octave and is now at the 6 o'clock V position (and blue). Again we see all three notes having harmonics at the V position (instead of the root) and white notes at the II position (which was V previously!).

More Notes?

I'm really pleased with the way these diagrams have turned out. If you want to play with the source and try to see what other chords look like, it's available on Github (it needs the ui_decorators class and PySide for the UI to work). There's lots to think about here, but two things I find interesting: The lack of a note at the 9 o'clock position, it has strong harmonics from the root (and even the IV note in the pseudo minor) and the number of harmonics found at the II and VII notes (especailly the VII note - it has harmonics from all notes in bot the major and minor chords). I haven't looked at what happens if we add a VII note to the mix, mainly because things seem complicated enough, and we're starting to run out of colors.

Another thing worth mentioning is that although the Python program can play the notes it creates, I've been mostly using it with the sound turned off. It may be there's not enough variation in the frequencies, but either way the actual notes sound pretty harsh and not particularly pleasant - I think it works better as a visual aid rather than an aural one.

More Pictures

The diagrams above have been starting at 440Hz and stopping at 22.1kHz, giving around 6 octaves or so. These limits were chosen as a sensible starting frequency and then a sensible upper limit for the human ear. However, we can choose to increase these limits and get more octaves. I'm including some more pictures here starting at 64Hz instead, giving us another few octaves, and at a higher resolution (1200x1200 instead of 600x600). The notes are smaller so they don't arbitrarily overlap at the higher octaves.

Major Chord

Minor Chord

Pseudo-minor Chord

A-Flat Minor part I - Harmonics

A-flat Minor I—Visualizing harmonics

What is a major chord? It sounds like a simple question, and if you ask a musician, they might say something like a root, a major-third and a prefect fifth. When I started looking into chords and how they're created this seemed like a great answer. Surely these fractions correspond to some perfect ratios, where a third indicates maybe a third of the main frequency and a fifth is a fifth Or at least something to do with 3 and 5. Erm, no. It turns out you simply count, starting at 1: a 'third' is simply the third note you reach and the fifth the fifth (eg for the scale of C, a 'third' is E and a fifth is G, you just count up from C, with C=1).

So in that case, what is a major chord? Wikipedia comes to the rescue, telling you it's notes in the ratio 4:5:6. This is at least meaningful, but seems a little arbitrary - how are these ratios chosen and why do they sound so good together? Luckily, there's a link from there to a very interesting page about Otonality and Utonality. Here, it describes how the major chord can be made up of the first three unique notes from the integer harmonics of a note (ie for a note with frequency f, we take 2f, 3f, 4f... etc., these tend to happen to some extent in real instruments naturally). Let's take C4 (middle C, 262.626Hz) as an example, and look at the notes we get for the first few harmonics:

A#6 (ish)7

Here we can see the first 3 unique notes (C4, G5, E6) have ratios of 1:3:5. However, because doubling (or halving) the frequency gives us the same note, we can move the notes to the same octave by multiplying by 4, 2,1 to  give us the 4:6:5 ratio we expect. (It might seem odd that a major chord has no notes above 6/4 times the root note. What happens to the next obvious choice: 7/4? I think this note gets too 'close' to the root note (in linear scale, both 5/4 and 7/4 are 1/4 away from the root, but acoustically I think the 7/4 (or 7/8 if we move it to just below the root) starts to sound very close to it and a little discordant. Maybe.)

Visualizing Harmonics

Is there a simple way to visualize these harmonics? What would be nice is a way to see harmonics and get some idea of the note and octave. A common way of visualizing this is using a music helix where the note becomes an angle and the octave a height. This can then be flattened to form a spiral (and there's a fascinating website about that here, with a lot of videos of music and the corresponding spectrogram).

I used Python to write a program that would allow me to visualize harmonics and chords in a similar fashion. Here's what a single root note, with no harmonics looks like:

The small red bar near the center represents the root note. As more notes get added, they'll appear on the spiral, further out at higher frequencies and at an angle corresponding to the note.

Now lets look at the first 3 harmonics:

We again see the root, red, and right above it the second harmonic in green. The third harmonic appears further along on the spiral in the fifth (V) location in blue. The third harmonic is the 'fifth' mentioned earlier (ie G if the root is C).

Now let's look at the first 5 harmonics, and see the notes of our major chord:

This time the first, second and 4th harmonics are in red (they're all the root note, say C), the 3rd in green (this is the V, G) and the 5th in blue (the 'major third', III, E). These are the three notes of the major chord, represented here with the root at 12 o'clock, the 'fifth' at 6 o'clock and the major third at 3 o'clock.

It's interesting to see what notes we hit if we just keep adding harmonics. What happens if we just add harmonics up to an arbitrary limit? Below I start at 440Hz and add all harmonics til we reach past the limit of most people's hearing, 22.1kHz:

Here we can see that once a note has been hit, it will get hit again the next go round (not surprisingly, as if h is a harmonic, so will 2h). It's also interesting to see which notes in the scale we hit - after the III and V notes, we hit the II and VII notes pretty early on, and then some odd incidentals (IIb and IV#). Oddly, the 7th harmonic (9 o'clock in the diagram above) isn't close to any of the natural notes, even though it's the next unique note after the major chord notes. (This is arguably a case for dismissing harmonics much higher than the 7th - after all, if the 7th harmonic is the next one and we haven't even bothered naming a note for it, can harmonics any higher than this really be that important? I'm going to ignore that question and carry on ignorantly).

I'm going to stop there and next time look at what happens when you combine the harmonics of the chords together, and also take a look at minor chords. You can find part II here.

Technical details about the charts above

In the charts above, I've decided to make the angle linear with frequency so that the fifth, which is 3/2 the root, occurs at 180 degrees. This means that doubling the frequency of a note will some of the time put the note 180 degrees opposite, and sometimes not. If I had used a log scale for the notes, a doubling would be the same for all the notes, but at a rather less convenient 210 degrees. The software below allows you to choose either method. The lines for the notes are for the just intonation tones.


The software used to create the diagrams above is available from my github account. The UI requires the ui_decorators module, talked about here.