top of page

From Pythagoras to Bach

How engineering and mathematics influenced music


Pythagoras. The ancient Greek philosopher, famously known for introducing triangle theories to the world. Perhaps, a lesser known fact is that much of the music we hear on Spotify today owes its roots to this philosopher and his obsession with giving form and structure to music filling the streets of ancient Greece. Pythagoras was in fact of the belief that musical notes could be arranged according to mathematical structure according to the laws dictated by physical nature.


You see, if we get a metal rod and strike it, it will produce a note which has, as its main tone, a frequency that is dictated by the length of the rod. In signal processing, this would be referred to as the fundamental frequency of the note. The note will have overtones or harmonics, which give richness to the tone. One of these overtones would have exactly double the frequency, or in musical terms, is an octave higher than the fundamental tone. If we then get a second metal rod whose length is half of our first rod, then the main tone, or fundamental frequency of this rod would be the octave higher version of our original note. Therefore, any rod whose length is half of some other rod will produce a note that is identical but at an octave higher version of the original rod. What if we now get another rod which is 2/3 the length of our first rod? This new rod will produce an entirely different note. But this new note is also contained in the harmonics or overtones of the original rod! And this happens because 2/3 is a naturally occurring harmonious mathematical ratio.


The creation of new notes from the relationships of the 2/3 ratio fascinated Pythagoras who was of the belief that music is sent to humans from the heavens and so, the best way to create beautiful music was to observe the natural laws of physics. Pythagoras' influence on Western music was immense. By starting with a length and dividing this length into 2/3 again and again, we get an infinite sequence or spiral of notes!


Where does this magical 2/3 ratio come from?

To understand the reason for the 2/3 ratio, we need to have some understanding on how sound is produced.


Let us imagine that we have a string, tied on both ends as shown in Figure 1.



Figure 1: A string tied at both ends and held taut.


When this string is plucked, a wave is produced that moves along the string. Since the string is tied at both ends, this wave will eventually reach the end of the string and travel back in the opposite direction, interfering with the original, or incident wave. If however, the string is plucked at just the right frequency, the interference between the incident and reflected waves are such that, at specific points the wave appears to be standing still, creating what is known as a standing wave pattern as shown in Figure 2. The points where the wave appears to stand still are called the nodes of the standing wave, while the points were the wave appears to move between peaks are called antinodes.


At the fundamental vibration of the string, we will obtain a single antinode in the middle of the string. At this antinode position, the string vibrates from rest up to a maximum upward position and down to a maximum downward position, creating the appearance of a single loop in the string. This would be equivalent to one-half a wavelength. That is, L = 𝜆/2, where

𝜆 is the wavelength.



Figure 2: A standing wave with one loop.

We can, however, have other standing waves being produced in the same string. For example, we may have a standing wave pattern that consists of two loops, with a node at the centre of the string as shown in Figure 3. Such a pattern, is referred to as the second harmonic pattern and here, the length of the string corresponds to two-halves of a wavelength, that is, L = 2𝜆/2.



Figure 3: A standing wave with one loop, corresponding to the second harmonic.


With the same reasoning, we can create the third harmonic pattern, shown in Figure 4, which consists of a standing wave pattern that has three loops or three-halves of a wavelength, that is L = 3𝜆/2.


Figure 4: A standing wave with three loops, corresponding to the third harmonic.


And this is where the 2/3 ratio is comes from. By selecting a new length of rod equal to 2/3 the original length, Pythagoras was ensuring that the fundamental wavelength of the new rod corresponds to the third harmonic pattern of the original rod!


The Pythagorean comma

The subdivision of lengths into 2/3 ratios creates a satisfying pattern of notes right up to the twelfth note in the sequence and then hits a snag with the thirteenth note. At this point, the note produced by the 2/3 ratio comes close, but not quite the same as the original starting note. And when we hear the sounds produced by the two notes together, the result is quite jarring. This effect became known as the Pythagorean comma.


To solve the problem of the Pythagorean comma, Pythagoras took a very pragmatic approach. He decided that the note sequences should stop by the twelfth note and any note after the thirteenth should be ignored.


A persistent nuisance

Ignoring problems is, of course, not a very good way to deal with them! The 2/3 ratio divisions were causing issues even within the first 12 notes. You see, when arranged in our spiral sequence, the distance between the notes was not exactly the same and this non-sameness became worse as the notes went higher in the sequence, causing some strange clashes when tones were heard together. To play it safe, musicians limited themselves even more, using the first seven notes of the sequence, forming what musicians now recognise as the basic scale.


For many years, right up to the Middle Ages in fact, European music limited itself to the use of these seven notes. Music at the time was rather simple, consisting of single notes over a drum beat, so these seven notes were sufficient. Church musicians, however, wanted to go a step further. They wanted to create combinations of tones to enrich sounds and bring people closer to the heavenly angels. And here lies the problem. Not all note combinations sounded good together. Some combinations sounded devilish! And so, medieval hymn composers stuck to fourths and fifths which were deemed to be sufficiently heavenly (listen here for an example). Any attempt to deviate from these tones was to tempt the nature and frowned upon.


John Dunstable: Let's tempt nature!

By 1416, the British composer John Dunstable was getting a bit fed up with sticking to fourths and fifths and, in Canterbury cathedral, started experimenting with intervals of thirds and sixths. Dunstable, however, had a trick up his sleeve. He asked singers to fine-tune the tones deviating from Pythagoras' 2/3 length ratio to produce notes that are not directly from nature's repertoire, but which sound better together (an example of Dunstable's work can be heard here).


Musicians soon realised that the music produced could retain its heavenly qualities while becoming more interesting and so, the practice caught on, paving the way for music to enter the wonderful Renaissance era with renewed interest in the relationship between maths and arts. To parallel the new depths that perspective brought into paintings, musicians were trying to bring more depth to their music by combining notes in new ways.


From structure to chaos

With this new experimentation, the problem that Pythagoras chose to ignore came back to haunt musicians, who soon realised that the problem they conveniently ignored was going to be a major nuisance. To grasp why, we need to introduce the concept of keys.


Let's imagine we have a starting note from which we create our family of seven notes based on the 2/3 ratio. If we pick any note from this family of notes, we can build a new family of notes based on 2/3 ratios from this new starting note. This family of notes is referred to as a key in musical terms. We can create keys for every singe note from our original family of notes. The problem is that, with the uneven spacing between the notes, the sounds produced by most of these keys do not go well together. For a long time this was not that much of an issue particularly for stringed instruments or for voice because musical pieces were written in one key from start to finish, so the instrument could be tuned to the key required.


Problems intensified when composers wanted to start using more than one key in their music. To make things worse, the composers started to introduce their own fine tuning of the instruments - something known as temperament. This became an issue when different composers started calling for different temperaments and a tuning that worked for one musical piece did not necessarily work for another. To meet with the demands of different composers, instrument players started to have a hard time tuning their instruments. While the task was not impossible for stringed instruments, keyboard instruments are more difficult to tune because of their structure. To cope with all the different notes that composers wanted, keyboard makers were introducing new notes to the instruments, but the clashes were sometimes so harsh, that they were called wolf tones since the combined sound was closer to howling wolves than heavenly angels.


Bach enters the scene

The KISS (keep it simple, stupid!) principle is well known among the engineering design and revolves around keeping the concept that the simplest design is often the most effective, more engaging and more likely to stay around. Tempering of instruments was the exact opposite! Until, that is, the concept of equal temperament took root. The idea was to depart from the 2/3 natural ratio and to artificially divide the intervals into 12 equally-spaced intervals and as a result, rather than having 12 different keys each with their own unique patterns, these would collapse into one single mathematical-based pattern of notes. This equal temperament would mean that all notes of all keys would be able to fit together within the same piece of music. For a long time, however, equal temperament was seen as too much of a wishful dream, for how could instrumentalists tune their instruments to mathematical perfection when tuning was happening all by ear?


Here is where Bach shook things up. With quite a lot of time on his hands, he composed the Well Tempered Clavier demonstrating to the world that a prelude and a fugue in all twelve keys could be played in one sitting and on one single keyboard which contains all the notes necessary and where these notes produced no wolf-like howling. Suddenly, this mathematical perfection was no longer a dream, but something which was within reach.


Engineering meets art (again)

Bach demonstrated to the world the benefits of equal temperament. But tuning was still happening by ear, and to achieve equal temperament accuracy and precision were essential. The engineering advances that came along with the Victorian era ensured that the mathematical ratio:


which Bach determined by trial and error, could be measured with exactness. String tensions could be measured to a fraction of a Newton. Keyboards were given iron boards that could withstand string tensions for longer and as a result, keyboards could be tuned with accuracy and maintain their tuning for longer. Wind instruments also benefitted from these engineering advances. Holes could be bored into pipes at the precise location and with the exact size. This engineered precision and accuracy was key to ensuring true equal temperament in instruments.


Thus, with advances in engineering, Western composers were given the tools and flexibility to apply their musical genius in combining instruments and harmonies to create the most heavenly of music through artificially engineered tones (Adagio sostenuto, from Rachmaninov's piano concerto no 2, Largo from Dvorak's New World Symphony, the second movement from Beethoven's 7th Symphony are among my favourites).


To hear and experiment with the Pythagorean and Equal Temperament scales, you may access a demo Python code on Google Colab here.


Our story's end

It would be convenient to end our narrative here. Only it does not. Because there are other narratives parallel to the abridged history outlined here. In fact, Chinese composers famously knew about equal temperament, but turned their back to it, favouring instead to remain in tune with nature. But, rather than ignore the problem faced by the Pythagorean comma, non-Western musicians adapted to it with the result of some interesting sound combinations (listen to Fisherman's Song at Dusk and Nami Nami for examples). This however, will involve a longer discussion on cultural influences.


It is not the story's end for engineering influences in music either. The narrative presented here, focused only on acoustic instruments and their tuning. Advances in electronic engineering and signal processing paved the way for digital versions of these instruments. Advances in computer algorithms and artificial intelligence are also brining about changes in the way music is re-mixed, composed and experienced. This all goes to show that strong relationship between engineering and art!




179 views0 comments

Recent Posts

See All

Comments


bottom of page