# 3.1.1 Context

Even if you’re not a musician, if you plan to work in the realm of digital sound you’ll benefit from an understanding of the basic concepts and vocabulary of music. The purpose of this chapter is to give you this foundation.

This chapter describes the vocabulary and musical notation of the Western music tradition – the music tradition that began with classical composers like Bach, Mozart, and Beethoven and that continues as the historical and theoretic foundation of music in the United States, Europe, and Western culture. The major and minor scales and chords are taken from this context, which we refer to as Western music. Many other types of note progressions and intervals have been used in other cultures and time periods, leading to quite different characteristic sounds: the modes of ancient Greece, the Gregorian chants of the Middle Ages, the pentatonic scale of ancient Oriental music, the Hindu 22 note octave, or the whole tone scale of Debussy, for example. While we won’t cover these, we encourage the reader to explore these other musical traditions.

To give us a common language for understanding music, we focus our discussion on the musical notation used for keyboards like the piano. Keyboard music expressed and notated in the Western tradition provides a good basic knowledge of music and gives us a common vocabulary when we start working with MIDI in Chapter 6.

# 3.1.2 Tones and Notes

Musicians learn to sing, play instruments, and compose music using a symbolic language of music notation. Before we can approach this symbolic notation, we need to establish a basic vocabulary.

In the vocabulary of music, a sound with a single fundamental frequency is called a tone. The fundamental frequency of a tone is the frequency that gives the tone its essential pitch. A piccolo plays tones with higher fundamental frequencies than the frequencies of a flute, and thus it is higher pitched.

A tone that has an onset and a duration is called a note. The onset of the note is the moment when it begins. The duration is the length of time that the note remains audible. Notes can be represented symbolically in musical notation, as we’ll see in the next section. We will also use the word “note” interchangeably with “key” when referring to a key on a keyboard and the sound it makes when struck.

As described in Chapter 2, tones created by musical instruments, including the human voice, are not single-frequency. These tones have overtones at frequencies higher than the fundamental. Overtones add a special quality to the sound, but they don’t change our overall perception of the pitch. When the frequency of an overtone is an integer multiple of the fundamental frequency, it is a harmonic overtone. Stated mathematically for frequencies $f_{1}$ and $f_{2}$, if $f_{2}=nf_{1}$ and n is a positive integer, then $f_{2}$ is a harmonic frequency relative to fundamental frequency $f_{1}$. Notice that every frequency is a harmonic frequency relative to itself. It is called the first harmonic, since $n=1$. The second harmonic is the frequency where $n=2$. For example, the second harmonic of 440 Hz is 880 Hz; the third harmonic of 440 Hz is 3*440 Hz = 1320 Hz; the fourth harmonic of 440 Hz is 4*440 Hz = 1760 Hz; and so forth. Musical instruments like pianos and violins have harmonic overtones. Drums beats and other non-musical sounds have overtones that are not harmonic.

Another special relationship among frequencies is the octave. For frequencies $f_{1}$ and $f_{2}$, if $f_{2}=2^{n}f_{1}$ where n is a positive integer, then $f_{1}$ and $f_{2}$ “sound the same,” except that $f_{2}$ is higher pitched than $f_{1}$. Frequencies $f_{1}$ and $f_{2}$ and are separated by n octaves. Another way to describe the octave relationship is to say that each time a frequency is moved up an octave, it is multiplied by 2. A frequency of 880 Hz is one octave above 440 Hz; 1760 Hz is two octaves above 440 Hz; 3520 Hz is three octaves above 440 Hz; and so forth. Two notes separated by one or more octaves are considered equivalent in that one can replace the other in a musical composition without disturbing the harmony of the composition.

In Western music, an octave is separated into 12 frequencies corresponding to notes on a piano keyboard, named as shown in Figure 3.1. From C to B we have 12 notes, and then the next octave starts with another C, after which the sequence of letters repeats. An octave can start on any letter, as long as it ends on the same letter. (The sequence of notes is called an octave because there are eight notes in a diatonic scale, as is explained below.) The white keys are labeled with the letters. Each of the black keys can be called by one of two names. If it is named relative to the white key to its left, a sharp symbol is added to the name, denoted C#, for example. If it is named relative to the white key to its right, a flat symbol is added to the name, denoted D♭, for example.

Figure 3.1 Keyboard showing octave and key labels

Each note on a piano keyboard corresponds to a physical key that can be played. There are 88 keys on a standard piano keyboard. MIDI keyboards are usually smaller. Since the notes from A through G are repeated on the keyboard, they are sometimes named by the number of the octave that they're in, as shown in Figure 3.2.

Figure 3.2 Piano or MIDI keyboard

Middle C on a standard piano has a frequency of approximately 262 Hz. On a piano with 88 keys, middle C is the fourth C, so it is called C4. Middle C (C3 on the keyboard shown) is the central position for playing the piano, with regard to where the right and left hands of the pianist are placed. The standard reference point for tuning a piano is the A above middle C, which has a frequency of 440 Hz. This means that the next A going up the keys to the right has a frequency of 880 Hz. A note of 880 Hz is one octave away from 440 Hz, and both are called A on a piano keyboard.

The interval between two consecutive keys (also called notes) on a keyboard, whether the keys are black or white, is called a semitone. A semitone is the smallest frequency distance between any two notes. Neighboring notes on a piano keyboard (and equivalently, two neighboring notes on a chromatic scale) are separated by a frequency factor of approximately 1.05946. This relationship is described more precisely in the equation below.

Let f be the frequency of a note k. Then the note one octave above f has a frequency of $2f$. Given this octave relationship and the fact that there are 12 notes in an octave, the frequency of the note after k on a chromatic scale is $\sqrt[12]{2}\, f\approx 1.05946\, f$.

Equation 3.1

Thus, the factor 1.05946 defines a semitone. If two notes are divided by a semitone, then the frequency of the second is 1.05946 times the frequency of the first. The other frequencies between semitones are not used in Western music (except in pitch bending).

Two semitones constitute a whole tone, as illustrated in Figure 3.3. Semitones and whole tones can also be called half steps and whole steps (or just steps), respectively. They are illustrated in Figure 3.3.

Figure 3.3 Semitones and whole tones

The symbol #, called a sharp, denotes that a note is to be raised by a semitone. When you look at the keyboard in Figure 3.3, you can see that E# denotes the same note as F because raising E by a semitone takes you to the note F. Thus, this key on the keyboard has two names (although calling it F is more common). When two notes have different names but are the same pitch, they said to be enharmonically equivalent.

The symbol♭, called a flat, denotes that a note is to be lowered by a semitone. C♭is enharmonically equivalent to B. A natural symbol ♮removes a sharp or flat from a note. Sharps, flats, and naturals are examples of accidentals, symbols that raise or lower a note by a semitone.

# 3.1.3 Music vs. Noise

It’s fascinating to consider the way humans perceive sound, experiencing some sounds as musical and some as noise. Understanding frequency components and harmonics gives us some insight into why music is pleasing to our senses.

Consider the waveforms in Figure 3.4 and Figure 3.5. The first shows the notes C, E, and G played simultaneously. The second is a recording of scratching sounds. The first waveform has a regular pattern because the frequency components are pure sine waves with a harmonic relationship. The second sound has no pattern; the relationship of the frequency components is random at any moment in time and varies randomly over time. Sounds that are combinations of harmonic frequencies make patterns that are pleasing to hear. They’re musical. Random patterns produce noise.

Figure 3.4 Waveform of musical sound

Figure 3.5 Waveform of noise

Musical instruments like violins, pianos, clarinets, and flutes naturally emit sounds with interesting harmonic components. Each instrument has an identifiable timbre – sometimes called its tone color – that results from its shape, the material of which it is made, its resonant structure, and the way it is played. These physical properties result in the instrument having a characteristic range of frequencies and harmonics. (See Figure 3.6.)

Figure 3.6 Approximate frequencies of various instruments

Instruments also are distinguished by the amplitude envelope for individual sounds created by the instrument. The amplitude envelope gives a sense of how the loudness of a single note changes over the short period of time when it is played. When you play a certain instrument, do you burst into the note or slide into it gently? Does the note linger or end abruptly? Imagine a single note played by a flute compared to the same note played by a piano. Although you don’t always play a piano note the same way – for example, you can strike the key gently or briskly – it’s still possible to get a picture of a typical amplitude envelope for each instrument and see how they differ. The amplitude envelope consists of four components: attack, decay, sustain, and release, abbreviated ADSR, as illustrated in Figure 3.7. The attack is the time between when the sound is first audible and when it reaches its maximum loudness. The decay is the period of time when the amplitude decreases. Then the amplitude can level to a plateau in the sustain period. The release is when the sound dies away. The attack of a trumpet is relatively sudden, rising steeply to its maximum, because you have to blow pretty hard into a trumpet before the sound starts to come out. With a violin, on the other hand, you can stroke the bow across a string gently, creating a longer, less steep attack. The sustain of the violin note might be longer than that of the trumpet, also, as the bow continues to stroke across the string. Of course, these envelopes vary in individual performances depending on the nature of the music being played. Being aware of the amplitude envelope that is natural to an instrument helps in the synthesis of music. Tools exist for manipulating the envelopes of MIDI samples so that they sound more realistic or convey the spirit of the music better, as we’ll see in Chapter 6.

Figure 3.7 Amplitude envelope

The combination of harmonic instruments in an orchestra gives rise to an amazingly complex and aesthetically pleasing pattern of frequencies that taken together are perceived as beautiful music. Non-harmonic instruments – e.g., percussion instruments – can contribute to this beauty as well. Drums, gongs, cymbals, and maracas are not musical in the same sense that flutes and violins are. The partials (frequency components) emitted by percussion instruments are not integer multiples of a fundamental, and thus these instruments don’t have a distinct pitch with harmonic overtones. However, percussion instruments contribute accents to music, called transients. Transients are sounds that come in short bursts. Their attacks are quite sharp, their sustains are short, and their releases are steep. These percussive sounds are called “transient” because they come and go quickly. Because of this, we have to be careful not to edit them out with noise gates and other processors that react to sudden changes of amplitude. Even with their non-harmonic nature, transients add flavor to an overall musical performance, and we wouldn’t want to do without them.

# 3.1.4 Scales

Let’s return now to a bit more music theory as we establish a working vocabulary and an understanding of musical notation.

Playing consecutive notes in an octave (but not necessarily all of them) is called playing a scale. There are different types of scales defined in Western music, which vary in the notes played within an octave. These different types of scales are referred to as intonations.

Table 3.1 lists seven types of scales divided into three general categories – chromatic, diatonic, and pentatonic. A list of 1s and 2s is a convenient way to represent the notes that are played in each. Moving by a semitone is represented by the number 1, meaning “move over one note from the previous one.” Moving by a whole tone is represented by the number 2, meaning “move over two notes from the previous one.”

In a chromatic scale, 13 consecutive notes are played, each separated from the previous one by a semitone. A chromatic scale starts on any key and ends on the key which is an octave higher than the first. This is represented simply by the list [1 1 1 1 1 1 1 1 1 1 1 1]. Note that while 13 notes are played, there are only 12 numbers on the list. The first note is played, and then the list represents how many semitones to move over to play the following notes.

Eight notes are played in a diatonic scale. As with a chromatic scale, a diatonic scale starts on any key and ends on the key which is an octave higher than the first. In a major diatonic scale, the pattern is [2 2 1 2 2 2 1]. This means, “start on the first note, move over by a tone, a tone, a semitone, a tone, a tone, a tone, and a semitone.” A major diatonic scale beginning on D3 is depicted in Figure 3.8. Those who grow up in the tradition of Western music become accustomed to the sequence of sounds in a diatonic scale as the familiar “do re mi fa so la ti do.” A diatonic scale can start on any note, but all diatonic scales have the same pattern of sound in them; one scale is just higher or lower than another. Diatonic scales sound the same because the differences in the frequencies between consecutive notes on the scale follow the same pattern, regardless of the note you start on.

Figure 3.8 The key of D

A minor diatonic scale is played in the pattern [2 1 2 2 1 2 2]. This pattern is also referred to as the natural minor. There are variations of minor scales as well. The harmonic minor scale follows the pattern [2 1 2 2 1 3 1], where 3 indicates a step and a half. The melodic minor follows the pattern [2 1 2 2 2 2 1] in the ascending scale, and [2 2 1 2 2 1 2] in the descending scale (played from highest to lowest note). The pattern of whole and half steps for major and minor scales are given in Table 3.1.

Table 3.1 Pattern of whole and half steps for various scales
Type of scale Pattern of whole steps (2) and half steps (1)
chromatic 1 1 1 1 1 1 1 1 1 1 1
major diatonic 2 2 1 2 2 2 1
natural minor diatonic 2 1 2 2 1 2 2
harmonic minor diatonic 2 1 2 2 1 3 1
melodic minor diatonic 2 1 2 2 2 2 1 ascending
2 2 1 2 2 1 2 descending
pentatonic major 2 3 2 2 3 or 2 2 3 2 3
pentatonic minor 3 2 3 2 2 or 3 2 2 3 2

Two final scale types ought to be mentioned because of their prevalence in music of many different cultures. These are the pentatonic scales, created from just five notes. An example of a pentatonic major scale results from playing only black notes beginning with F#. This is the interval pattern 2 2 3 2 3, which yields the scale F#, G#, A#, C#, D#, F#. If you play these notes, you might recognize them as the opening strain from “My Girl” by the Temptations, a pop song from the 1960s. Another variant of the pentatonic scale has the interval pattern 2 3 2 2 3, as in the notes C D F G A C. These notes are the ones used in the song “Ol’ Man River” from the musical Showboat (Figure 3.9).

 Ol' man river, C   C     D F Dat ol' man river D   C   C     D F He mus'know sumpin' G   A       A       G   F But don't say nuthin', G     A   C     D   C He jes'keeps rollin' D   C   C         A   G He keeps on rollin' along. A   C     C     A   G   A F

To create a minor pentatonic scale from a major one, begin three semitones lower than the major scale and play the same notes. Thus, the pentatonic minor scale relative to F#, G#, A#, C#, D#, F# would be D#, F#, G#, A#, C#, D#, which is a D# pentatonic minor scale. The minor relative to C D F G A C would be A C D F G A, which is an A pentatonic minor scale. As with diatonic scales, pentatonic scales can be set in different keys.

It's significant that a chromatic scale really has no pattern to the sequence of notes played. We simply move up by semitone steps of [1 1 1 1 1 1 1 1 1 1 1 1 1]. The distance between neighboring notes is always the same. In a diatonic scale, on the other hand, there is a pattern of varying half steps and whole steps between notes. A diatonic scale is more interesting. It has color. The pattern gives notes different importance to the ear. This difference in the roles that notes play in a diatonic scale is captured in the names given to these notes, listed in Table 3.2. Roman numerals are conventionally used for the positions of these notes.   These names will become more significant when we discuss chords later in this chapter.

Table 3.2 Technical names for notes on a diatonic scale
Position Name for note
I tonic
II supertonic
III mediant
IV subdominant
V dominant
VI submediant

# 3.1.5 Musical Notation

## 3.1.5.1 Score

In the tradition of Western music, a system of symbols has been devised to communicate and preserve musical compositions. This system includes symbols for notes, timing, amplitude, and keys. A musical composition is notated on a score. There are scores of different types, depending on the instrument being played. The score we describe is a standard piano or keyboard score.

A piano score consists of two staves, each of which consists of five horizontal lines. The staves are drawn one above the other. The top staff is called the treble clef, representing the notes that are played by the right hand. The symbol for the treble clef is placed at the far left of the top staff. (The word “clef” is French for “key.”) The bottom staff is the bass clef, representing what is played with the left hand. The symbol for the bass clef is placed at the far left of the bottom staff. A blank score with no notes on it is pictured in Figure 3.10.

Figure 3.10 Treble and bass clef staves

Each line and space on the treble and bass clef staves corresponds to a note on the keyboard to be played, as shown in Figure 3.11 and Figure 3.12. A whole note (defined below) is indicated by an oval like those shown. The letter for the corresponding note is given in the figures. The letters are ordinarily not shown on a musical score. We have them here for information only. The treble clef is sometimes called the G clef because its bottom portion curls around the line on the staff corresponding to the note G. The bass clef is sometimes called the F clef because it curls around the line on the staff corresponding to the note F.

Figure 3.11 Notes on the treble clef staff

Figure 3.12 Notes on the bass clef staff

It’s possible to place a note below or above one of the staves. The note’s distance from the staff indicates what note it is. If it’s a note that would fall on a line, a small line is placed through it, and if the note would fall on a space, a line is placed under or over it. The lines between the staff and the upper or lower note are displayed by a short line, also. The short lines that are used to extend the staff are called ledger lines. Examples of notes with ledger lines are shown in Figure 3.13 and Figure 3.14.

Figure 3.13 Placing notes above or below the treble clef staff

Figure 3.14 Placing notes above or below the bass clef staff

Beginners who are learning to read music often use mnemonics to remember the notes corresponding to lines and spaces on a staff. For example, the lines on the treble clef staff, in ascending order, correspond to the notes E, G, B, D, and F, which can be memorized with the mnemonic “every good boy does fine.” The spaces on the treble clef staff, in ascending order, spell the word FACE. On the bass clef, the notes G, B, D, F, and A can be remembered as “good boys deserve favor always,” and the spaces A, C, E, G can be remembered as “a cow eats grass” (or whatever mnemonics you like).

## 3.1.5.2 Notes and their Durations

There are types of notes – whole notes, half notes, quarter notes, and so forth, as shown in Table 3.3. On the score, you can tell what type a note is by its shape and color (black or white) on the score. The durations of notes are defined relative to each other, as you can see in the table. We could continue to create smaller and smaller notes, beyond those listed in the table, by adding more flags to a note. The part of the note called the flag is shown in Figure 3.15. Each time we add a flag, we divide the duration of the previously defined note by 2.

Table 3.3 Notes and their durations

Figure 3.15 Flag on note

## 3.1.5.3 Rhythm, Tempo, and Meter

The timing of a musical composition and its performance is a matter of rhythm, tempo, and meter. Rhythm is a pattern in the length and accents of sounds. Tempo is the pace at which music is performed. We can sing "Yankee Doodle" in a fast, snappy pace or slowly, like a dirge. Obviously, most songs have tempos that seem more appropriate for them. Meter is the regular grouping of beats and placement of accents in notes. Let’s consider meter in more detail.

Since the durations of different notes are defined relative to each other, we have to have some base line. This is given in a score’s time signature, which indicates which note gets one beat. Beats and notes are grouped into measures. Measures are sometimes called bars because they are separated from each other on the staff by a vertical line called a bar. A time signature of $\frac{x}{y}$, where x and y are integers, indicates that there are x beats to a measure, and a note of size $\frac{1}{y}$gets one beat. (A half note is size ½, a quarter note is size ¼, and so forth.) A time signature of $\frac{4}{4}$ time is shown in Figure 3.16, indicating four beats to a measure with a quarter note getting one beat. A time signature of $\frac{3}{4}$ indicates three beats to a measure with a quarter note getting one beat. $\frac{3}{3}$ is the meter for a waltz.

Figure 3.16 Time signature showing 4/4 time

If the time signature of a piece is $\frac{4}{4}$, then there are four beats to a measure and each quarter note gets a beat. Consider the score in Figure 3.17, which shows you how to play “Twinkle, Twinkle Little Star” in $\frac{4}{4}$time in the key of C. Each of the six syllables in “Twin-kle Twin-kle Lit-tle” corresponds to a quarter note, and each is given equal time – one beat – in the first measure. Then the note corresponding to the word “star” is held for two beats in the second measure. Measures three and four are similar to measures one and two.

Figure 3.17 Score for right hand of “Twinkle, Twinkle Little Star”

Directions for tempo and rhythm are part of musical notation. As we’ve already seen, a musical score begins with an indication of how rhythm is to be handled in the form of a time signature that tells how many beats there are to a measure and which type of note gets one beat. The most common time signatures are $\frac{4}{4}$, $\frac{3}{4}$, and $\frac{6}{8}$, but other timings are possible. $\frac{4}{4}$ time is so common that it is sometimes abbreviated on the time signature as C for “common time.”   Exactly how long it takes to play a measure depends on the tempo of the overall piece.

The tempo of a musical piece depends on which type of note is given one beat and how many beats there are per second. Tempo can be expressed at the beginning of the score explicitly, in terms of beats per minute (BPM). For example, a marking such as  = 72 placed above a measure indicates that a tempo of 72 beats per minute is recommend from this point on, with a quarter note getting one beat. Alternatively, an Italian key word like allegro or andante can be used to indicate the beats per minute in a way that can be interpreted more subjectively. A list of some of these tempo markings is given in Table 3.4.

Table 3.4
Tempo Marking Meaning
prestissimo extremely fast (more than 200 BPM)
presto very fast (168 – 200 BPM)
allegro fast (120 – 168 BPM)
moderato moderately (108 – 120 BPM)
andante “at a walking pace” (76 – 108 BPM)
adagio slowly (66 – 76 BPM)
lento or largo very slowly (40 – 60 BPM)

Students learning to play the piano sometimes use a device called a metronome to tick out the beats per minute while they practice.   Metronomes are also usually built into MIDI sequencers and keyboards.

## 3.1.5.4 Rests and their Durations

Rhythm is determined not only by the duration of notes but also by how much silence there is between notes. The duration of silence between notes is indicated by a rest. The symbols for rests are given in Table 3.5. The length of a rest corresponds to the length of a note of the same name.

Table 3.5 Rests and their durations

A dot placed after a note or rest increases its duration by one-half of its original value. This is shown in Table 3.6. Figure 3.18 shows a fragment of Mozart’s “A Little Night Music,” which contains eighth rests in the second, third, and fourth measures. Since this piece is in $\frac{6}{8}$ time, the eighth rest gets one beat.

Table 3.6 Dotted notes and rests

Figure 3.18 Example of music with rests

## 3.1.5.5 Key Signature

Many words in the field of music and sound are overloaded – that is, they have different meanings in different contexts. The word “key” is one of these overloaded terms. Thus far, we have been using the word “key” to denote a physical key on the piano keyboard. (For the discussion that follows, we’ll call this kind of key a “piano key.”) There’s another denotation for key that relates to diatonic scales, both major and minor. In this usage of the word, a key is a group of notes that constitute a diatonic scale, whether major or minor.

Each key is named by the note on which it begins. The beginning note is called the key note or tonic note. If we start a major diatonic scale on the piano key of C, then following the pattern 2 2 1 2 2 2 1, only white keys are played. This group of notes defines the key of C major. Now consider what happens if we start on the note D. If you look at the keyboard and consider playing only white keys starting with D, you can see that the pattern would be 2 1 2 2 2 1 2, not the 2 2 1 2 2 2 1 pattern we want for a major scale. Raising F and C each by a semitone – that is, making them F# and C# – changes the pattern to 2 2 1 2 2 2 1. Thus the notes D, E, F#, G, A, B, C# and D define the key of D. By this analysis, we see that the key of D requires two sharps – F and C. Similarly, if we start on D and follow the pattern for a minor diatonic scale – 2 1 2 2 1 2 2 – we play the notes D, E, F, G, A, B♭, and D. This is the key of D minor.

Each beginning note determines the number of sharps or flats that are played in the 2 2 1 2 2 2 1 scale for a major key or in the 2 1 2 2 1 2 2 sequence for a minor key. Beginning an octave on the piano key C implies you’re playing in the key of C and play no sharps or flats for C major. Beginning a scale on the piano key D implies that you’re playing in the key of D and play two sharps for D major.

Let’s try a similar analysis on the key of F. If you play a major scale starting on F using all white keys, you don’t get the pattern 2 2 1 2 2 2 1. The only way to get that pattern is to lower the fourth note, B, to B♭. Thus, the key of F major has one flat. The key of F minor has four flats – A♭, B♭, D♭, and E♭, as you can verify by following the sequence 2 1 2 2 1 2 2 starting on F.

Like meter, the key of a musical composition is indicated at the beginning of each staff, in the key signature. The key signature indicates which notes are to be played as sharps or flats. The key signatures for all the major keys with sharps are given in Table 3.7. The key signatures for all the major keys with flats are given in Table 3.8.

You may have noticed that the keys of F major and D minor have the same key signature, each having one flat, B♭. So when you see the key signature for a musical composition and it has one flat in it, how do you know if the composition is written in F major or D minor, and what difference does it make? One difference lies in which note feels like the "home" note, the note to which the music wants to return to be at rest. A composition in the key of F tends to end in a

chord that is rooted in F, as we’ll see in the section on intervals and chords. A second difference is a subjective response to major and minor keys. Minor keys generally sound more somber, sad, or serious while major keys are bright and happy to most listeners.

You can see in the tables below that each major key has a relative minor key, as indicated by the keys being in the same row in the table and sharing a key signature. Given a major key k, the relative minor is named by the note that is three semitones below k. For example, A is three semitones below C, and thus A is the relative minor key with respect to C major. When keys are described, if the words “major” and “minor” are not given, then the key is assumed to be a major key.

You’ve seen how, given the key note, you can determine the key signature for both major and minor keys. So how do you work in reverse? If you see the key signature, how can you tell what key this represents? A trick for major keys is to name the note that is one semitone above the last sharp in the key signature. For example, the last sharp in the second key signature in Table 3.7 is F#. One semitone above F# is G, and thus this is the key of G major. For minor keys, you name the note that is two semitones below the last sharp in the key signature. For the first key signature in Table 3.7, the last sharp is F#. Two semitones below this is the note E. Thus, this is also the key signature for E minor.

To determine a major key based on a key signature with flats, you name the note that is five semitones below the last flat. In the key that has three flats, the last flat is A♭. Five semitones below that is E♭, so this is the key of E♭major. (This turns out to be the next to last flat in each key with at least two flats.) To determine a minor key based on a key signature with flats, you name the note that is four semitones above the last flat. Thus, the key with three flats is the key of C minor. (You could also have gotten this by going three semitones down from the relative major key.)

Table 3.7 Relative major and minor keys with sharps

Table 3.8 Relative major and minor keys with flats

The key signature for a harmonic minor key is the same as the natural minor. What turns it into a harmonic minor key is the use of sharps or naturals on individual notes to create the desired pattern of whole tones and semitones. To create the pattern[ 2 1 2 2 1 3 1] (harmonic minor) from [2 1 2 2 1 2 2] (natural minor), it suffices to raise the seventh note a semitone. Thus, the scale for a harmonic minor is notated as shown in Figure 3.19. (In this section and following ones, we won't include measures and time signatures when they are not important to the point being explained.)

Figure 3.19 A minor harmonic

Similarly, the melodic minor uses the key signature of the natural minor. Then adjustments have to be made in both the ascending and descending scales to create the melodic minor. To create the ascending pattern [2 1 2 2 2 2 1] (melodic minor) from [2 1 2 2 1 2 2] (natural minor), it suffices to raise both the sixth and seventh note by a semitone. This is done by adding sharps, flats, or naturals as necessary, depending on the key signature. The descending pattern for a melodic minor is the same as for the natural minor – [2 2 1 2 2 1 2]. Thus, the notes that are raised in the ascending scale have to be returned to their normal position for the key by adding sharps, flats, or naturals, as necessary. This is because once an accidental is added in a measure, it applies to the note to which it was added for the remainder of the measure.

F minor melodic is notated as shown in Figure 3.20. In F minor melodic, since D and E are normally flat for that key, a natural is added to each to remove the flat and thus move them up one semitone. Then in the descending scale, the D and E must explicitly be made flat again with the flat sign.

Figure 3.20 F minor melodic

In E minor melodic, a sharp is added to the sixth and seventh notes – C and D – to raise them each as semitone. Then in the descending scale, the D and E must explicitly be made natural again with the sign, as shown in Figure 3.21.

Figure 3.21 E minor melodic

## 3.1.5.6 The Circle of Fifths

In Section 3.1.5, we showed how keys are distinguished by the sharps and flats they contain. One way to remember the keys is by means of the circle of fifths, a visual representation of the relationship among keys. The circle is shown in Figure 3.22. The outside of the circle indicates a certain key. The inner circle tells you how many sharps or flats are in the key.

Figure 3.22 Circle of fifths

A fifth is a type of interval. We’ll discuss intervals in more detail in Section 3.1.6.2, but for now all you need to know that a fifth is a span of notes that includes five lettered notes. For example, the notes A, B, C, D, and E comprise a fifth, as do C, D, E, F, and G.

If you start with the key of C and move clockwise by intervals of fifths (which we call “counting up”), you reach successive keys each of which has one more sharp than the previous one – the keys of G, D, A, and so forth. For example, starting on C and count up a fifth, you move through C, D, E, F, and G, five lettered notes comprising a fifth. Counting up a fifth consists of moving up seven semitones – C to C#, C# to D, D to D#, D# to E, E to F, F to F#, and F# to G. Notice that on the circle, moving clockwise, you’re shown G as the next key up from the key of C. The key of G has one sharp. The next key up, moving by fifths, is the key of D, which has two sharps. You can continue counting up through the circle in this manner to find successive keys, each of which has one more sharp than the previous one.

Starting with the key of C and moving counterclockwise by intervals of fifths (“counting down”), you reach successive keys each of which has one more flat than the previous one – the keys of F, B♭, E♭, and so forth. Counting down a fifth from C takes you through C, B, A, G, and F – five lettered notes taking you through seven semitones, Counting down a fifth from F takes you through F, E, D, C, and B. However, since we again want to move seven semitones, the B is actually B♭.   The seven semitones are F to E, E to E♭, E♭ to D, D to D♭, D♭ to C, C to B, and B to B♭. Thus, the key with two flats is the key of B♭.

The keys shown in the circle of fifths are the same keys shown in Table 3.7 and Table 3.8. Theoretically, Table 3.7 could continue with keys that have seven sharps, eight sharps, and on infinitely. Moving the other direction, you could have keys with seven flats, eight flats, and on infinitely. These keys with an increasing number of sharps would continue to have equivalent keys with flats. We’ve shown in Figure 3.22 that the key of F#, with six sharps, is equivalent to the key of G♭, with six flats. We could have continued in this manner, showing that the key of C#, with seven sharps, is equivalent to the key of D♭, with five flats. Because the equivalent keys go on infinitely, the circle of fifths is sometimes represented as a spiral. Practically speaking, however, there’s little point in going beyond a key with six sharps or flats because such keys are harmonically the same as keys that could be represented with fewer accidentals. We leave it as an exercise for you to demonstrate to yourself the continued key equivalences.

## 3.1.5.7 Key Transposition

All major keys have a similar sound in that the distance between neighboring notes on the scale follows the same pattern. One key is simply higher or lower than another. The same can be said for the similarity of minor keys. Thus, a musical piece can be transposed from one major (or minor) key to another without changing its composition. A singer might prefer one key over another because it is in the range of his or her voice.

Figure 3.23 shows the first seven notes of “Twinkle, Twinkle Little Star,” right-hand part only, transposed from the key of C major to the keys of E major and C minor. If you play these on a keyboard, you’ll hear that C major and E major sound the same, except that the second is higher than the first. The one in C minor sounds different because the fifth and sixth notes (A) are lowered by a semitone in the minor key, giving a more somber sound to the sequence of notes. It doesn’t “twinkle” as much.

Figure 3.23 Transposition from key of C major to E major and C minor

# 3.1.6 Musical Composition

## 3.1.6.1 Historical Context

For as far back in history as we can see, we find evidence that human beings have made music. We know this from ancient drawings of lutes and harps, Biblical references to David playing the lyre for King Saul, and the Greek philosopher Pythagoras’s calculation of harmonic intervals. The history of music and musical styles is a fascinating evolution of classical forms, prescriptive styles, breaks from tradition, and individual creativity. An important thread woven through this evolution is the mathematical basis of music and its relationship with beauty.

In the 6th century BC, the Greek philosopher Pythagoras recognized the mathematical basis of harmony, noting how the sound of a plucked string changes in proportion to the length of the string. However, harmony was not the dominant element of music composition as it developed through the Middle Ages. The chanting of medieval monks consisted of a single strand of notes, rather unmelodic, with no instrumental accompaniment and, by modern standards, a free-form rhythm. Madrigals of the Middle Ages were composed of single solo lines with simple instrumental accompaniment. In the Baroque period, multiple strands became interwoven in a style called polyphony, exemplified in the fugues, canons, and contrapuntal compositions of Johann Sebastian Bach. Although we have come to think of harmony as an essential element of music, its music-theoretic development and its central position in music composition didn’t begin in earnest until the 18th century, spurred by Jean-Philippe Rameau’s Treatise on Harmony.

In this chapter, we emphasize the importance of harmony in musical composition because it is an essential feature of modern Western music. However, we acknowledge that perceptions of what is musical vary from era to era and culture to culture, and we can give only a small part of the picture here. We encourage the reader to explore other references on the subject of music history and theory for a more complete picture.

## 3.1.6.2 Intervals

An understanding of melody and harmony in Western music composition begins with intervals. An interval is the distance between two notes, measured by the number of lettered notes it contains. If the notes are played at the same time, the interval is a harmonic interval. If the notes are played one after the other, it is a melodic interval. If there are at least three notes played simultaneously, they constitute a chord. When notes are played at the same time, they are stacked up vertically on the staff. Figure 3.24 shows a harmonic interval, melodic interval, and chord.

Figure 3.24 Intervals and chords

Intervals are named by the number of lettered notes from the lowest to highest, inclusive. The name of the interval can be expressed as an ordinal number. For example, if the interval begins at F and ends in D, there are six lettered notes in the interval, F, G, A, B, C, and D. Thus, this interval is called a sixth. If the interval begins with C and ends in E, it is called a third, as shown in Figure 3.25 Note that in this regard the presences of sharps or flats isn’t significant. The interval between F and D is a sixth, as is the interval between F and D#.

Figure 3.25 Intervals of different sizes: a sixth and a third

Because there are eight notes in an octave, with the last letter repeated, there are eight intervals in an octave. These are shown in Figure 3.26, in the key of C. Each interval is constructed in turn by starting on the key note and moving up by zero lettered notes, one lettered note, two lettered notes, and on up to eight lettered notes. Moving up one lettered note means moving up to the next line or space on the staff.

Figure 3.26 Intervals in an octave, key of C major

The same intervals can be created in any key. For example, to create them in the key of D, all we have to do is move the bottom note of each interval to the key note D and move up zero notes from D for perfect unison, one note for a major second, two notes for a major third, and so forth, as shown in Figure 3.27. Note, however, that F and C are implicitly sharp in this key.

Figure 3.27 Intervals in key of D major

A major interval can be converted to a minor interval by lowering the higher note one semitone. For example, in the key of C, the minor intervals are C to D♭ (minor second), C to E♭ (minor third), C to A♭ (minor sixth), and C to B♭(minor seventh). It isn’t possible to turn a fourth or fifth into a minor interval. This is because if you lower the higher note by one semitone, you’ve change the interval to a smaller one because you’ve lost one of the lettered notes in the interval. For example, in the key of C if you shorten a perfect fourth by one semitone, the top note is an E rather than F, so the interval is no longer a fourth. There’s no black key to use between E and F. A third, on the other hand, can be shortened so that instead of being from C to E, it’s from C to E♭. There are still three lettered notes in the interval – C, D, and E – but now we have a minor third instead of a major third.

The intervals that cannot be made minor are called perfect. These are the perfect unison, perfect fourth, perfect fifth, and perfect eighth.

Two other types of intervals exist: diminished and augmented. A diminished interval is one semitone smaller than a perfect interval or two semitones smaller than a major interval. An augmented interval is one semitone larger than a perfect or major interval.   All the intervals for the key of C are shown in Figure 3.28. The intervals for other keys could be illustrated similarly.

Figure 3.28 All intervals

You can create a compound interval by taking any of the interval types defined above and moving the upper note up by one or more octaves. If you’re trying to identify intervals in a score, you can count the number of lettered notes from the beginning to the end of the interval and “mod” that number by 7. The result gives you the type of interval. For example, if the remainder is 3, then the interval is a third. The mod operation divides by an integer and gives the remainder. This is the same as repeatedly subtracting 7 (the number of notes in an octave, not counting the repeat of the first note an octave higher) until you reach a number that is less than 7. Figure 3.29 shows examples of two compound intervals. The first goes from C4 to G5, a span of 12 notes. 12 mod 7 = 5, so this is a compound perfect fifth.   The second interval goes from E4 to G5#, a span of 10 notes. 10 mod 7 = 3, so this is a compound third. However, because the G is raised to G#, this is, more precisely, a compound augmented third.

Figure 3.29 Compound intervals

Intervals can be characterized as either consonant or dissonant. Giving an oversimplified definition, we can say that sounds that are pleasing to the ear are called consonant, and those that are not are called dissonant. Of course, these qualities are subjective. Throughout the history of music, the terms consonant and dissonant have undergone much discussion. Some music theorists would define consonance as a state when things are in accord with each other, and dissonance as a state of instability or tension that calls for resolution. In Section 3.3.2, we’ll look more closely at a physical and mathematical explanation for the subjective perception of consonance as it relates to harmony.

Intervals help us to characterize the patterns of notes in a musical composition. The musical conventions from different cultures vary not only in their basic scales but also in the intervals that are agreed upon as pleasing to the ear. In Western music the perfect intervals, major and minor thirds, and major and minor sixths are generally considered consonant, while the seconds, sevenths, augmented, and diminished intervals are considered dissonant. The consonant intervals come to be used frequently in musical compositions of a culture, and the listener’s enjoyment is enhanced by a sense of recognition. This is not to say that dissonant intervals are simply ugly and never used. It is the combination of intervals that makes a composition. The combination of consonant and dissonant intervals gives the listener an alternating sense of tension and resolution, expectation and completion in a musical composition.

## 3.1.6.3 Chords

A chord is three or more notes played at the same time. We will look at the most basic chords here – triads, which consist of three notes.

Triads can be major, minor, diminished, or augmented. The lowest note of a triad is its root. In a major triad, the second note is a major third above the root, and the third note is a perfect fifth above the root. In the root position of a triad in a given key, the tonic note of the key is the root of the triad. (Refer to Table 3.2 for the names of the notes in a diatonic scale.) The major triads for the keys of C, F, and A are shown in root position in Figure 3.30.

Figure 3.30 Major triads in root position

In a minor triad, the second note is a diatonic minor third above the root, and the third note is a diatonic perfect fifth above the root. The minor triads for the keys of C, F, and A are shown in root position in Figure 3.31.

Figure 3.31 Minor triads in root position

Chords can be inverted by changing the root note. In the first inversion, the root note is moved up an octave. In the second inversion, the mediant of the key becomes the root and the tonic is moved up an octave. In the third inversion, the dominant of the key becomes the root, and both the mediant and tonic are moved up an octave. The first and inversions are shown in Figure 3.32.

Figure 3.32 Inversions for major triad in key of C

A diminished triad has a root note followed by a minor third and a diminished fifth. An augmented triad has a root note followed by a major third and an augmented fifth. The diminished and augmented triads for the key of C are shown in Figure 3.33.

Figure 3.33 Diminished and augmented triads in key of C

We’ve looked at only triads so far. However, chords with four notes are also used, including the major, minor, and dominant sevenths. The major seventh chord consists of the root, major third, perfect fifth, and major seventh. The minor seventh consists of the root, minor third, perfect fifth, and minor seventh. The dominant seventh consists of the root, major third, perfect fifth, and minor seventh.   Dominant chords have three inversions. The dominant seventh for the key of C is shown with its inversions in Figure 3.34. (Note that B is flat in all the inversions.)

Figure 3.34 Dominant seventh chords for the key of C

Thus we have seven basic chords that are used in musical compositions. These are summarized in Table 3.9.

Table 3.9 Types of chords

All major keys give rise to a sequence of triads following the same pattern. To see this, consider the sequence you get in the key of C major by playing a triad starting on each of the piano keys in the scale. These triads are shown in Figure 3.35. Each is named with the name of its root note.

Figure 3.35 Triads in C major

All major keys have this same sequence of chord types – major, minor, minor, major, major, minor, and diminished.  For example, the key of D has the chords D major, E minor, F minor, G major, A major, B minor and C diminished. If we do a similar analysis for the minor keys, we find that they follow the pattern minor, diminished, augmented, minor, major, major, and diminished, as summarized in Table 3.10.

Table 3.10 Types of triad chords in major and minor keys
Chord number Chord type if the triad sequence
comes from a major key
Chord type if the triad sequence
comes from a minor key
I major minor
II minor diminished
III minor augmented
IV major minor
V major major
VI minor major
VII diminished diminished

## 3.1.6.4 Chord Progressions

So what is the point of identifying and giving names to intervals and chords? The point is that this gives us a way to analyze music and compose it in a way that yields a logical order and an aesthetically pleasing form. When chords follow one another in certain progressions, they provoke feelings of tension and release, expectation and satisfaction, conflict and resolution. This emotional rhythm is basic to music composition.

Let’s look again at the chords playable in the key of C, as shown in Figure 3.35. Chord progressions can be represented by a sequence of Roman numerals. For example, the right-hand part of “Twinkle, Twinkle Little Star” in the key of C major, shown in Figure 3.23, could be accompanied by the chords I   I   IV   I   IV   I   V   I in the left hand, as shown in Figure 3.36. This chord progression is in fact a very common pattern.

Figure 3.36 “Twinkle, Twinkle Little Star” with chords as Roman numerals

You can play this yourself with reference to the triads from the key of C major, shown in Figure 3.35. However, to make the chords easier to play, you’ll want to invert them so that the root note is either C or the B below C, making it easier for your hand to move from one note to the next. Thus, chord I can be played as C, E, G; chord IV as C, F, A (2nd inversion); and chord V as B, D, G (1st inversion), as shown in Figure 3.37.

Figure 3.37 “Twinkle, Twinkle Little Star” with chords in bass clef

A simple way of looking at chord progressions is based on tonality – a system for defining the relationships of chords based on the tonic note for a given key. Recall that the tonic note is the note that begins the scale for a key. In fact, the key’s name is derived from the tonic note. In the key of C, the tonic note is C. Triad I is the tonic triad because it begins on the tonic note. You can think of this as the home chord, the chord where a song begins and to which it wants to return. Triad V is called the dominant chord. It has this name because chord progressions in a sense pull toward the dominant chord, but then tend to return to the home chord, chord I. Returning to chord I gives a sense of completion in a chord progression, called a cadence. The progression from I to V and back to I again is called a perfect cadence because it is the clearest example of tension and release in a chord progression. It is the most commonly used chord progression in modern popular music, and probably in Western music as a whole.

Another frequently used progression moves from I to IV and back to I. IV is the subdominant chord, named because it serves as a counterbalance to the dominant. The I IV I progression is called the plagal cadence. Churchgoers may recognize it as the sound of the closing “amen” to a hymn. Together, the tonic, subdominant, and dominant chords and their cadences serve as foundational chord progressions. You can see this in “Twinkle, Twinkle Little Star,” a tune for which Wolfgang Amadeus Mozart wrote twelve variations.

The perfect and plagal cadences are commonly used chord progressions, but they’re only the tip of the iceberg of possibilities. “Over the Rainbow” from The Wizard of Oz, with music written by Harold Arlen, is an example of how a small variation from the chord progression of “Twinkle, Twinkle Little Star” can yield beautiful results. If you speed up the tempo of “Over the Rainbow”, you can play it with the same chords as are used for “Twinkle, Twinkle Little Star,” as shown in Figure 3.38. The only one that sounds a bit “off” is the first IV.

Figure 3.38 “Over the Rainbow” played in C with chords of “Twinkle, Twinkle Little Star”

It’s remarkable how the color of a melody can shift when the accompanying chords are changed only slightly. Figure 3.39 shows “Over the Rainbow” played in the key of E♭ with the chord sequence I   III   IV   I   IV   I   III   V   I For the key of E♭, these chords are E♭, G minor, A♭, E♭, A♭, E♭, G minor, B♭, E♭.  The use of G minor adds a melancholy tone which fits the song’s theme. We could also change the fourth chord, currently an E♭ major, to a G minor and add to this effect.

Figure 3.39 “Over the Rainbow” in the key of E♭

# 3.1.7 Dynamics and Articulation

Dynamics symbols tell how loud or quietly music should be played. These terms were brought into usage by Italian composers, and we still use the Italian terms and symbols. The terms are summarized in Table 3.11 along with the signs used to denote them on the staff. Additional ps and fs can be added to emphasize the loudness or quietness, but four ps or fs is usually the limit. The symbols are displayed below the staff in the area to which they are applied.

Table 3.11 Dynamics terms and symbols

Gradual changes in dynamics are indicated by crescendo and decrescendo symbols (Figure 3.40). The decrescendo can also be called a diminuendo. The crescendo indicates that the music should gradually grow louder. The decrescendo is the opposite. These symbols can be made longer or shorter depending on the time over which the change should occur. They are usually placed below the staff, but occasionally above.

Figure 3.40 Symbols for gradual changes in dynamics

Articulation marks (Table 3.12) indicate the manner in which a note is to be performed. A little dot above or below a note (depending on the direction of the note’s stem) indicates that it is to be played staccato – that is, played as a short note not held down and thus not linked directly in sound to the next note. A “greater than” sign above or below a note, called an accent, indicates that the note should be played louder, with special emphasis. A straight line above or below a note, called tenuto, emphasizes that a note is to be held for its full value. A dot with a semicircle above it, called a fermata, means that a note is to be held longer than its normal value. The articulation marks and dynamics symbols help a composer to guide the style and technique applied to the performance of a composition.

Table 3.12 Articulation marks