Ranges of musical instruments are broken down into octaves for easy clarification of range.
Octave (P8): Two notes whose tuning ratio is 2:1 or 1200 cents apart.
When two notes have a ratio of 2:1, we call them the same name; thus, an octave is more colloquially known as the distance between two notes of the same name (La1La2, Do4Do5, Mi2Mi3). The octave is also the distance between the first and second harmonic in the harmonic overtone series, a phenomenon found in nature that sets up the foundation for Western Classical Harmony.
hz: the number of sound waves per second of any pitch. The higher the note (in pitch), the larger it's frequency (or hz) will be as the sound waves move faster for higher pitches.
cents: the distance between two pitches
Each octave can be broken down into 12 semitones/half steps/minor seconds. If we arrange these in a scale, we get a CHROMATIC SCALE. Chromatic scales can be spelled with sharps or flats, or a mixture of both. In Equal Temperament each half step is exactly 100 cents apart.
An INTERVAL is the difference between two pitches. All intervals are defined by the number of halfsteps they contain.
Inverse Interval Pairs
 Each interval has an inverse.

An interval and its inverse must always add up to 9.

The inverse of Major is minor.

The inverse of Augmented is diminished.

Inverse intervals also have inverted scale degrees

(M3 = sd’s 1 and 3, m6 = sd’s 3 and 1).


Perfect intervals remain perfect when inverted.
Harmonic vs. Melodic Intervals:

Harmonic: Two notes played “in harmony” at the same time

Melodic: Two notes played separately as a melodic line
Interval Classification
Like with the octave, whose ratio is 2:1, all other intervals also have ratios that express the difference in sound waves/second (hz) of the two notes. Musicians and theorists then classify intervals into three groups defined by their ratios: Perfect, Consonant and Dissonant.
HARMONIC OVERTONE SERIES
A natural phenomenon that is present in any resonating body/sound. Similar in concept, to other natural, recurring patterns like the Fibonacci Series, the harmonic overtone series will always follow the same pattern:
The harmonic overtone series was first written about by Pythagorus (yes  the same guy as a2 + b2 = c2) and can be found in any resonating body  whether you strike it with a hammer (like a piano, or percussion instrument), vibrate air in a tube (like a wind instrument), or bow a string (like a violin).
â€‹
Below, you'll see what it looks like on a string instrument.
â€‹
Imagine the diagram is a string on a guitar, violin, cello, piano, or any other stringed instrument. The first line of the diagram shows the pitch of the “fundamental”  or of the open string.
If you place your finger in the middle of the string (1:2 ratio) you get an octave.
If you place your finger at the 1/3rd of the string, you get a Perfect Fifth.
So on, and so forth....
Here a some videos pertaining to the harmonic overtone series that are a fun dive:
A great, short video on harmonics.
MELODYNE/PETER NEUBACKER
Melodyne is a software used by audio engineers that allows one to isolate a single pitch, or part of a pitch, within a recording and alter the pitch. It's totally crazy! And Peter Neubäcker's journey to creating it is also pretty insane  check out this short documentary about him and his work.
WHAT IS EQUAL TEMPERAMENT?
Equal temperament is the method of splitting the distance between an octave (1200 cents) equally between the twelve chromatic pitches between the octave. Thus, each half step is exactly 100 cents apart  and all equal in size.
â€‹
While musicians have known about equal temperament for hundreds of years, it's use was not widespread until the midlate 1800's when music became increasingly chromatic, and fixedpitch instruments like the piano and mallet percussion instruments pushed music, and musicians, towards equal temperament (this is a severe oversimplification...to understand more about the move to equal temperament, I recommend Ross Duffin's book How Equal Temperament Ruined Harmony and Why You Should Care.)
Unfortunately, if one tunes with equal temperament (where all 12 semitones of the octave are exactly 100 cents apart) the ratios of the intervals are not “pure” or the same as they would be using the “just” scale (Pythagorean, harmonic overtone series tuning). This has frustrated musicians for centuries as you can see the difference in the charts here can be quite dramatic.
Harmonic overtone series broken down by temperament difference by cents from equal temperament
You may think, huh  the difference in these numbers is so small, but even these tiny differences cause huge changes in how music sounds. A Major Third in equal temperament sounds quite dissonant compared to a pure, Pythagoran, third.
SO WHY USE EQUAL TEMPERAMENT IF IT CREATES ALL OF THESE ISSUES?
again, Ross Duffin's book How Equal Temperament Ruined Harmony and Why You Should Care is a great place to understand more about this
There's a fundamental hiccup in how western classical harmony is setup that gets highlighted in the tuning of fixed pitch instruments....
Let's look at how it works on a piano, or any keyboard instrument...
On an 88 key piano there are seven octaves.
As previously mentioned, each octave has a ratio of 2:1. If you multiply this ratio by seven (the number of octaves on the piano) you get the number 128.
â€‹
Alternatively, to travel seven octaves by fifths, you need to repeat your ratio twelve times. Each fifth has a ratio of 3:2, therefore, if you multiply this ratio by twelve (the number of fifths on the piano) you get the number 129.746.
At this point you should be asking yourself...wait a second...I've gone the exact same distance on the piano, but my math is not adding up!
This is all because of our love of pure octaves and pure fifths  intervals that ring so beautifully in tune. It can sound quite unpleasant to our ears if an octave is out of tune, and so our goal (usually) is to try and make sure that every octave on a piano rings "pure" at a 2:1 ratio.
Well tempered clavier
WHAT IS EQUAL TEMPERAMENT?
Equal temperament is the method of splitting the distance between an octave (1200 cents) equally between the twelve chromatic pitches between the octave. Thus, each half step is exactly 100 cents apart  and all equal in size.
â€‹
While musicians have known about equal temperament for hundreds of years, it's use was not widespread until the midlate 1800's when music became increasingly chromatic, and fixedpitch instruments like the piano and mallet percussion instruments pushed music, and musicians, towards equal temperament (this is a severe oversimplification...to understand more about the move to equal temperament, I recommend Ross Duffin's book How Equal Temperament Ruined Harmony and Why You Should Care.)
Unfortunately, if one tunes with equal temperament (where all 12 semitones of the octave are exactly 100 cents apart) the ratios of the intervals are not “pure” or the same as they would be using the “just” scale (Pythagorean, harmonic overtone series tuning). This has frustrated musicians for centuries as you can see the difference in the charts here can be quite dramatic.
Harmonic overtone series broken down by temperament difference by cents from equal temperament
You may think, huh  the difference in these numbers is so small, but even these tiny differences cause huge changes in how music sounds. A Major Third in equal temperament sounds quite dissonant compared to a pure, Pythagoran, third.
SO WHY USE EQUAL TEMPERAMENT IF IT CREATES ALL OF THESE ISSUES?
again, Ross Duffin's book How Equal Temperament Ruined Harmony and Why You Should Care is a great place to understand more about this
There's a fundamental hiccup in how western classical harmony is setup that gets highlighted in the tuning of fixed pitch instruments....
Let's look at how it works on a piano, or any keyboard instrument...
On an 88 key piano there are seven octaves.
As previously mentioned, each octave has a ratio of 2:1. If you multiply this ratio by seven (the number of octaves on the piano) you get the number 128.
â€‹
Alternatively, to travel seven octaves by fifths, you need to repeat your ratio twelve times. Each fifth has a ratio of 3:2, therefore, if you multiply this ratio by twelve (the number of fifths on the piano) you get the number 129.746.
At this point you should be asking yourself...wait a second...I've gone the exact same distance on the piano, but my math is not adding up!
This is all because of our love of pure octaves and pure fifths  intervals that ring so beautifully in tune. It can sound quite unpleasant to our ears if an octave is out of tune, and so our goal (usually) is to try and make sure that every octave on a piano rings "pure" at a 2:1 ratio.
However, if we try to do the same thing with fifths (or other intervals) we run into mathematical problems like the one seen above where we "overshoot" our goal of 128.
This overshot, or "extra" is called a "comma". Musicians have been figuring out ways to deal with this "comma" for centuries, often hiding it in lesser traveled places on the keyboard to try and preserve as many pure fifths and thirds as they possibly could, but...over time (solidified in midlate 1800's) musicians moved towards distributing the comma equally over all 12 notes of the octave. This meant that while the octave was perfectly in tune with a 2:1 ratio, all the other intervals were slightly out of tune (some more than less).
Here are those charts from earlier that show the difference in both cents, and ratio between the Pythagorean or "just scale" and the equal temperament scale one more time...
Here are some other diagrams from Ross Duffin's book that illustrate comma's in different ways...
Eek! In this one, you can see how tuning by pure Major thirds falls SHORT of an octave
In this one, you can see how trying to travel the same distance by Pure 5ths/Octaves+M3 doesn't quite work...
And in this one, you can clearly see the "overshoot" of the comma when traveling around the circle of fifths...
SO WHAT ABOUT BACH'S "WELL TEMPERED KLAVIER"?
â€‹
It is a common misconception/mistranslation of Bach's solo piano works titled "Das wohltemperierte Klavier" to the "Equally Tempered Keyboard" in English, when it should, be the "Well Tempered Keyboard". Bach knew about equaltemperament, but did not choose to use it when performing as it was considered to great a compromise, to not have pure fifths and thirds available. Moreover, many instruments in the baroque era were not capable of playing with equal ease in all 24 keys, but rather in keys up to 4 sharps and 4 flats, so having a tuning system that allowed one to play in all 24 keys was not widely viewed as useful. It was more useful to have a temperament that allowed you to play really well in the keys you were playing in.
â€‹
What made Bach such a badass, is that he decided to write a set of keyboard pieces in ALL 24 KEYS that would be playable with THE SAME TUNING SYSTEM, or temperament. Normally, a performer might choose to retune in between pieces to maximize the temperament for each piece, but Bach used his ingenuity to get around this in two major ways.
1. The SQUIGGLE
While scholars had presumed that Bach had a special tuning system that worked particularly well for the WellTempered Klavier, in recent decades, scholarship has done much research into the squiggle at the top of the front page of the manuscript of the WTC  a squiggle, that when decoded, gives you a tuning system that allows one to play in all 24 keys.
â€‹
2. Bach's COMPOSITIONAL BRILLIANCE
Using the temperament of "the squiggle", Bach then wrote each prelude/fugue in a way that would either highlight the beauty of the pure intervals, hide the "comma", or sometimes...even highlight the "crunchiness" that the comma created.
â€‹
For example, the very first prelude, in Do Major, starts off the entire book with a Do Major triad, spaced perfectly the way it would occur in the harmonic overtone series:
Do, Do, Sol, Do, Mi (sol do mi). When tuned well, the harpsichord would ring in the most fantastic way during this opening chord.
Into the SQUIGGLE?
Check out this Bach squiggle swag...
Bach Squiggle Leggings
Bach Squiggle and Crest Stag Racerback shirt
...and listen to the difference in 3 temperaments for the C Major Prelude from the Well Tempered Klavier Book 1