Music Theory for (Non)Musicians and (Non)Programmers
Key Signatures (Part 1)
To make sense of the Circle of Fifths and how it relates to music in general, this article is going to more visual and there will be no code. It is important, though, to understand the basics of notation before getting into the further topics.
The G Clef, or, Treble Clef
The G Clef is called the "G Clef" because the circular part wraps around the line that denotes the note "G."
With that knowledge, we can figure out the rest of the notes:
In music notation, this the note B:
When we add an accidental, or, "sharp sign" (#) in this case, we sharpen a note. This is F#:
Examine this passage. The notes are D, E, F#, D, E, F#.
In this short passage, we see that F# is repeating. Obviously, the entire piece may or may not have F# repeating throughout, but, for this example, we can pretend that F# is repeating. The piece would be in the Key of G Major. To represent the Key of G, we set the sharp accidental next to the G Clef:
Every F not is now converted to F#
To be certain, one cannot look at such a short passage and say that it definitely should be in the Key of G. Repeating F# does not mean that the concept of Key of G should be encapsulated. Music Theory is not a layer of abstraction. If you had a repeating D# in your music and each F was natural (not sharp), you are not able to create something that looks like this:
The Circle of Fifths, as shown by the pattern "S, S, H, S, S, S, H" suggests that each new key is relative to the Key of C, with each other key shifted left, with the pattern starting at the root note.
Creating Key Signatures
Circle of Fifths:
Using what we know about the Circle of Fifths, we can now easily create each successive Major and Minor Key:
The top key in the Circle of Fifths is "C", which indicates that it has no accidentals.
C Major / A Minor (0 accidentals)
The next key is is "G", which indicates that it has one accidental. We find the appropriate accidental by looking two letters back, which is "F". Since "E minor" is the same as "G", "Em" and "G" are the same.
G Major / E Minor (1 accidental)
Next, we have "D". We keep the same accidental for "G" and add another accidental, which is two places behind "D" and add "C". Once again, Bm is under D, so we say they are the same.
D Major / B Minor (2 accidentals)
We continue this process until we get to "C#".
A Major / F# Minor (3 accidentals)
G Major / E Minor (4 accidentals)
B Major / G# Minor (5 accidentals)
F# Major / D# Minor (6 accidentals)
C# Major / A# Minor (7 accidentals)
Now that all of the notes are sharpened, we go back to the top of the circle and find "F".
To find the appropriate flat note for the key of F, we look to the left one note and find "Bb"
F Major / D Minor (1 accidental)
Using the same pattern, we would add "Eb" to get the key of "Bb Major"
Bb Major / G Minor (2 accidentals)
Eb Major / C Minor (3 accidentals)
Ab Major / F Minor (4 accidentals)
Db Major / Bb Minor (5 accidentals)
Gb Major / Eb Minor (6 accidentals)
Cb Major / Ab Minor (7 accidentals)
What About History?
The rules laid out by the Circle of Fifths does not apply to all forms of music, and that includes all Western Music. The one-flat keys did not appear until the Medieval Period, and signatures with more than one flat didn't appear until the 1500s. Even so, there was no standard way to write in a Key, so a single flat may well have sat on the D note as I showed above.
The Circle of Fifths didn't appear until the 1670s, when it was introduced in Grammatika, a treatise on music composition by Nikolai Diletskii. I would not know when it totally caught on.
The Circle of Fifths, as presented here and commonly presented elsewhere, is based on the diatonic scale. We will examine more when we get into scales.
If you would like to see these ideas and concepts in action, please visit my newest project: butternotes.com