Introduction
In our previous lesson, we established the fundamental link between the physical property of frequency and the musical concept of pitch. You learned how to identify notes on a piano roll, understand their numerical representation via MIDI, and calculate their exact frequency using the formula for 12-tone equal temperament. We've mastered the building blocks; now we begin to assemble them.
This lesson delves into the relationship between two notes. This relationship, known as an interval, is the basis of all melody and harmony. Our goal is to define and identify all the fundamental intervals within an octave by their name and their size in semitones. We will use the piano roll as our primary analytical tool, reinforcing the practical skills needed for music production while connecting these musical concepts to their underlying mathematical and physical principles.
What is an Interval?
At its core, a musical interval measures the distance between two pitches. Given your background, it's useful to consider this from three complementary perspectives, as outlined in the resource we'll look at shortly:
- The Physical Perspective: An interval can be described by the frequency ratio of the two notes. As we will see, simple integer ratios form the basis of what our ears perceive as consonant.
- The Mathematical Perspective: On the logarithmic scale of pitch, an interval represents a fixed distance. In the system of 12-tone equal temperament (12-TET), this distance is conveniently measured in discrete steps.
- The Musical Perspective: This is the system of names (e.g., "Major Third," "Perfect Fifth") that musicians use to categorize and communicate these distances.
In our digital environment, the most direct way to measure an interval is by counting the number of semitones—the smallest step in the chromatic scale—between two notes on the piano roll grid. Each unique semitone count within an octave has a specific, conventional name.
Let's begin by formally defining these terms.
This text from the AudioLabs Erlangen "Fundamentals of Music Processing" course provides a rigorous, academic introduction to intervals. It aligns well with a scientific approach to the topic.
First, read the introduction to understand the different ways we can conceptualize intervals. Then, read the section on "Semitone Differences" to solidify the idea of using semitones as our unit of measurement. Don't worry about the mention of "cents" or "enharmonic equivalence" for now; we will return to those concepts later.
The Twelve Basic Intervals
Now that we have a formal definition, let's map out the twelve fundamental intervals that occur within a single octave. The piano roll provides an intuitive visual grid for this. If we start on a note—any note—and count the number of semitones up to another note, we can determine the interval's name.
The image below illustrates all twelve intervals starting from the note C3. The number of semitones is simply the number of grid lines (or piano keys) you move up from the starting note.

Let's trace a few examples from the diagram:
- C3 to C3: 0 semitones. This is a Perfect Unison.
- C3 to D3: 2 semitones. This is a Major Second.
- C3 to G3: 7 semitones. This is a Perfect Fifth.
- C3 to C4: 12 semitones. This is a Perfect Octave.
To have a complete reference, you should now study the full list of these intervals. The table in the "Intervals" resource we just viewed provides exactly this.
This table provides the definitive list of interval names and their corresponding semitone distances.
Focus on the first two columns of the table found within the webpage, labeled "Δ" and "Interval name". Commit these to memory. For example, a difference (Δ) of 4 semitones corresponds to a "Major Third". The other columns relating to Just Intonation (JI) and Pythagorean (Pyt) tuning are fascinating and we will touch on their significance next, but for now, focus on the names and semitone counts.
At this stage, you are expected to memorize this mapping. Given any number of semitones from 0 to 12, you should be able to state the corresponding interval name.
The Physics of Consonance and Dissonance
You might be wondering about the origins of these interval names. Why is a fifth "perfect" while a third is "major"? And why do certain intervals sound stable and resolved, while others sound tense? The answer lies in the physics of sound waves and their corresponding frequency ratios.
As we touched upon in our first module, combinations of notes whose fundamental frequencies form simple integer ratios tend to be perceived as consonant (harmonious, stable). Notes with complex or irrational ratios are perceived as dissonant (clashing, tense).
This video provides an excellent explanation of this phenomenon.
The Math Behind Music and Sound Synthesis
The video "The Math Behind Music and Sound Synthesis" by Gonkee connects the mathematical ratios of intervals to their perceived sound quality.
Please watch the segment from the discussion of consonance. Pay close attention to how the simplicity of the waveform created by adding two notes together relates to the simplicity of their frequency ratio.
Let's connect this back to our 12-TET intervals and their semitone counts. The frequency of a note semitones above a reference frequency is given by . The frequency ratio is therefore .
- Perfect Fifth (n=7): The ratio is . This is remarkably close to , a very simple integer ratio. This is why the fifth is a cornerstone of harmony.
- Perfect Fourth (n=5): The ratio is . This is very close to .
- Major Third (n=4): The ratio is . This is close to .
- Tritone (n=6): The ratio is . As an irrational number, this cannot be expressed as a simple integer ratio, contributing to its highly dissonant character.
This physical basis is key to understanding why these intervals form the building blocks of music. For the genres you're interested in, particularly industrial and noise, the deliberate use of dissonant intervals is a primary tool for creating tension and aggressive textures.
Practice: Identifying Intervals
Now, let's practice identifying intervals on the piano roll. The process is always the same:
- Choose a lower note as your reference.
- Count the number of semitones (grid steps) up to the higher note.
- Recall the name associated with that number.
Example 1:
- Notes: F4 to A#4 (or Bb4).
- Counting up from F4: F# (1), G (2), G# (3), A (4), A# (5).
- Distance: 5 semitones.
- Interval Name: Perfect Fourth.
Example 2:
- Notes: D5 to F#5.
- Counting up from D5: D# (1), E (2), F (3), F# (4).
- Distance: 4 semitones.
- Interval Name: Major Third.
Take a moment to identify the following intervals yourself:
- C4 to G4
- E5 to F5
- G#3 to D#4
...
Answers:
- 7 semitones = Perfect Fifth
- 1 semitone = Minor Second
- G#3 -> A(1) -> A#(2) -> B(3) -> C(4) -> C#(5) -> D(6) -> D#(7). 7 semitones = Perfect Fifth (Note that the interval name is the same even though the notes are different)
Conclusion
In this lesson, we have moved from considering notes in isolation to analyzing the crucial relationships between them. You have learned that these relationships, called intervals, are the fundamental units of melody and harmony.
Here are the key takeaways:
- An interval is the distance in pitch between two notes.
- In 12-TET, this distance is measured by counting semitones.
- Each interval from 0 to 12 semitones has a specific name, from Perfect Unison to Perfect Octave. You should now have these memorized.
- The perceived quality of an interval (consonance vs. dissonance) is directly related to the mathematical simplicity of the notes' frequency ratios.
You now possess the vocabulary and analytical framework to describe the melodic and harmonic distance between any two notes.
In our next lesson, we will dissect the naming convention itself. We'll explore the system of qualifiers—perfect, major, minor, augmented, and diminished—to understand precisely why an interval gets its specific name. This will add a layer of theoretical depth to the identification skills you've developed today.