I’m having an ongoing discussion with my brother about the mathematics involved in the intervals of music, mathematics I don’t claim to understand. All I really understand is the trumpet, and how a trumpet manages to play so many notes with just three buttons. So, since Oppo seems to have a rather wide and eclectic range of interests, I thought I’d share an explanation of that here. It might be a bit TL;DR, but I find it fascinating, and thought somebody else here might find it interesting also. Maybe go get yourself a cup of coffee.
People have been making noise by blowing through things for centuries, and examples of the earliest form of an instrument sounded by buzzing one’s lips through an amplifying device dates to the Egyptians and even before that to people who blew through conch shells. By the Baroque period (for simplicity, let’s say 1600-1750), trumpets had evolved to what might be thought of giant bugles, and only a limited number of notes were available (a bit more on that later). It wasn’t until the 1800s that work began on a system of valves that could alter the length of the trumpet by diverting the air flow through an additional length of tubing. The Germans developed a system that used a rotary valve, while the French worked on the piston valve, the up-and-down system we are most familiar with today, at least on this side of the Atlantic.
If you were to blow through a trumpet and not press any of the valves down, the air would go directly through the horn and you could produce a collection of notes that we call the harmonic series. The lowest note of the series is called the fundamental, and it has a specific frequency. Each note in the series above the fundamental is called a partial, and each partial is a multiple of the frequency of the fundamental. At the lower end of the series, the notes are relatively far apart. But as the notes get higher the partials get closer together. If you go high enough, you can basically play a scale (notes on adjacent lines and spaces on the staff) without using any valves. That’s how the natural trumpets of Bach’s day, with no valves, were able to play a melody. 
If you listened to the Handel recording (and you really should, it’s quite lovely), you will hear that the lower notes that Steele-Perkins played sounded a bit like a bugle. As he went higher, though, he could play a scale. That’s because he was working his way up through the harmonic series.
As we said, it’s a series of notes that bear a mathematical relationship to the lowest playable note. Here is the harmonic series for a modern trumpet in the key of C. All of these notes are playable with no valves depressed (open), which means that these are all the notes you can play with your trumpet at its shortest length.
When you push down the valve of the trumpet, the column of air is diverted through an adjacent length of pipe before continuing out of the bell, thereby making the instrument longer. The longer the tube, the lower the instrument (see: Tuba). The second valve has the shortest attached tube, followed by the first valve, then the third. The third alone is essentially equal to the length of the first and second valves combined, though it is rarely used alone.
The three valves can be depressed in seven combinations we call fingerings, and by following a prescribed set of fingering combinations you can lengthen the horn by one half step at a time and cover exactly half an octave. Here are the valve combinations as they would be on a trumpet pitched in C (the picture above shows a trumpet pitched in B-flat, but why there are differently pitched trumpets is an entirely different discussion for a different day and lots more coffee).
As with the open instrument, each combination of valves generates its own harmonic series based on the lowered note. If you work your way through the combinations and descend half an octave, then stack all the harmonic series together for each valve combination, you have covered the entire chromatic scale (every black and white note on the piano keyboard) and you have an chromatic instrument using just three buttons instead of the the four fingers required on a string instrument (but who wants to play a viola?), or the 1o fingers required on a woodwind instrument (wait, aren’t flutes made of metal?). Percussion instruments, in general, go BOOM.
The bottom line of the chart shows the harmonic series of the trumpet with all the valves (or pistons, to use the French term) depressed.  This is the horn at its greatest length, and the notes available to that valve combination are shown from left to right (the fundamental is omitted, since it’s generally not a usable note, and the chart begins with the second partial). As you move upward in the chart, you are shortening the horn by half steps, with each lowest note and its own harmonic series shown left to right. Now, if you stack up all the different notes in each harmonic series and trace all of those notes up to the top line, you see that you have covered all the notes of the chromatic scale.
You will also notice that there is a bit of overlap. For example, the A on the second space can be played either 1+2 or 3. The fourth line D-sharp (E-flat) can be played either 2 or 2+3. We call these alternate fingerings, and while they both produce the same note they each have a slightly different tuning and timbre, so one fingering is generally preferred over the other, but it’s nice to have an option from time to time.
When a trumpet plays a given note, all of the upper notes of that note’s harmonic series are present in the vibrating column of air, though they are not necessarily sounding.  These are called overtones (be sure to check out at least the first half of the video above). When two trumpets are playing together, those overtones interact to make a whole bunch of vibrations and, at certain points, those overtones overlap so that both trumpets are generating the same overtones while playing different notes. And it is those overtones that must be in tune to create a resultant tone. This is a note that exists in the air, you can hear it in your ear, but nobody is actually playing that sound. It is being created by the interactions of other notes and vibrations which we cannot hear. When you hear that resultant tone, you know that you and your friend are really, really, really in tune. And those overtones can overlap not only in consonant harmonies like 6ths and 3rds or 4ths, 5ths and octaves, but also dissonances like 2nds and 7ths. As I’ve told my students, even dissonance must be in tune.
So, we’ve been speaking only about the valved brass instruments. But what about the trombone? With no valves, the trombone should theoretically be the most perfectly in-tune brass instrument. (Having sat in front of trombones for more than 30 years, I can assure you that is not always the case.) However, the principle of the instrument is the same as regards the harmonic series. With the slide all the way in (first position), you can play the fundamental note of the instrument (which happens to be B-flat). As you extend the slide through the positions (a total of 7 which, interestingly, is the same number of valve combinations on the trumpet), you are lengthening the instrument and lowering the fundamental to obtain a different harmonic series for each position. I’m not going to do another big chart like the trumpet chart. It would take too long and look about the same anyway.
Just like the trumpet, there are notes that overlap between the different positions, and the player will choose the slide position that works best for a given note in a given passage. However, each position is not the same distance apart. The distance from 1st to 2nd position is, let’s say, x, while the distance from 2nd to 3rd is x + (a little bit). From 3rd to 4th is (x + (a little bit)) + (a little bit more). Each position is progressively farther away than the previous one. If you look at a guitar fretboard, you will see the same thing. Each fret is a half step apart, but the frets get farther apart as you go lower on the instrument. Certainly, there is some math involved in this, too, but I was told once that if you can count to three you can play music, so that’s all I concern myself with.
If you’ve made it this far, you now have copious amounts of new knowledge which, combined with $3, will get you a cup of bad coffee at Starbucks. But this also underscores the difficulty of playing a brass instrument. With so many different notes available for one valve combination, you can see why it’s so easy to miss notes. And it’s even harder on the French horn, since they have significantly more tubing than the trumpet does, which means they are often playing higher in the harmonic series where the notes are much closer together. So, next time you hear a horn player frack a note, have some pity on them. The struggle is real.
Thanks for reading, and enjoy your coffee.
 I could do it on a modern trumpet, but the notes would be in the stratosphere. Bach’s trumpets were about eight feet long, or about twice the length of a modern trumpet. Therefore, the scale on Bach’s trumpet occurred an octave lower than it would on my trumpet.
 The piston valve was invented by a Frenchman named Francois Périnet, while the rotary valve, like the one seen on a French horn, was an earlier invention by a man named Heinrich Stölzel. Also, the French horn is not French, it’s German. Neither is the English horn English. It’s French. But that’s another story.
 There is an entire industry of trumpet manufacturers who work to make these overtones, as they are called, more or less present in the sound. In a gross generalization, more overtones makes for a brighter, more vibrant sound, while fewer overtones make for a duller or darker sound.
Additional reading: https://asa.scitation.org/doi/pdf/10.1121/1.4898416
This is me playing a trumpet.