the online magazine for bass players

Search Menu

Math and Music – Equations and Ratios

Previously in the “math and music” lesson we derived equations for expressing intervals as functions of relative frequencies. This week we’re going to define conventions for interval sizes and then derive three variables where we can determine the composition of any frequency ratio. Guess what – all intervals can be described as different combinations of the octave, perfect fifth and major third – the first three overtones.

In the last lesson we talked about the frequency ratios of common intervals. The standard convention is that interval ratios are greater than 1 and less than 2. A ratio of 2:1 is an octave, so it makes sense that all the other intervals are defined to be smaller than an octave. Following the overtone series we get these basic ratios: 1:1 is our starting tone, 2:1 is an octave above that, 3:1 is a fifth above the octave, 4:1 is the second octave and 5:1 is a third in the second octave. We want to express the fifth and third as frequencies within the first octave – therefore the ratio has to be greater than 1:1 (our starting tone) and less than 2:1 (the octave). Therefore, we can divide the frequency ratio by the number of octaves necessary to bring it into the first octave range. For example, the 3:1 ratio is a perfect fifth in the second octave. Therefore we only need to bring it down by one octave to have the ratio be between 1 and 2. So if a fifth in the second octave is 3:1 and the second octave is 2:1 then 3:2 would be a fifth in the first octave. We can define this as the following:

Math and Music - Equations and Ratios: Figure 1

This equation shows how a prime ratio can be transposed into a single octave. From this equation is follows that:

Math and Music - Equations and Ratios: Figure 2

Therefore we can frame the precise definition for our interval ratio as follows: a basic interval is an interval whose ratio is p divided by two the n-th power, where p is prime and n is chosen so that 2 to the n-th power is the greatest power of two less than p. The first three basic intervals from this definition are consonant and very important in the foundation of our musical definitions: the octave, perfect fifth and major third, 2:1, 3:2 and 5:4 respectively.

We’re going to set some variables based on these intervals. These variables will make it easier for use to define complex equations later on. Remember that the size on an interval is the logarithm of its ratio (see the “Math and Music – Intervals” lesson). Therefore we can define the following variables, a, v and t:

Math and Music - Equations and Ratios: Figure 3

Now that we have those three variables defined, we can prove a method to determine the composition of any other interval as a combination of those three. Here’s how it will work: we’ll use three new variables, m, n and q to multiple against our originals (a, v and t). The sum of these will be the size of the unknown interval we’re trying to determine.

Math and Music - Equations and Ratios: Figure 4

To give an example we can now express intervals as functions of a, v, and t and determine the ratios quickly – such as the sum of a perfect fifth (v) and a major third (t):

Math and Music - Equations and Ratios: Figure 5

This can go both ways:

Math and Music - Equations and Ratios: Figure 8

This means if we start at some pitch – any pitch – go up two octaves (2*a) then up on major third (t) and down three perfect fifths (3*v) we’ll end up at a pitch whose ratio is (40/27) multiplied by our original pitches value. This may not seem like much at first – but we’ve formed a precise language for describing interval relationships and calculating the composition of any interval from our fundamental values.

This is great in terms of raw theory – but how does it come into play with how we tune our instruments or understand music? It has to do with the value of measurement applied to the intervals and logarithms. We’re going to define that value based on Western equal tempered tuning. In our definitions of a, v and t we did not specify a base for the logarithms. Let’s define a base b such that the following is true:

Math and Music - Equations and Ratios: Figure 6

Let’s think of (b/1) as the frequency ratio of an interval. Therefore, the sum of a intervals having the ratio of (b/1) is the interval whose ratio is 2 – an octave. The same applies for (3/2) and (5/4) – the sum of v intervals with the ratio of (b/1) would be (3/2), and the sum of t intervals with the ratio of (b/1) would be (5/4). Therefore b is a unit of measure! In equal tempered tuning each note is an equal division of the octave – 12 chromatic tones in an octave mean that each note is (1/12) of the interval value of the octave. We can define this as follows:

Math and Music - Equations and Ratios: Figure 7

In music we often talk about cents a cent is based on this value of (1/12)a – it is one one-hundreth of the size:

Math and Music - Equations and Ratios: Figure 9

All of our logarithms are therefore defined with the base of the frequency ratio of a single cent. That ratio would be 2 to the power of (1/12oo):

Math and Music - Equations and Ratios: Figure 10

What have we accomplished? We now have:

  1. a method for describing any interval or its ratio in terms of an octave, perfect fifth and major third
  2. a concrete numerical value for tuning ratios (a definition of cents)

Believe it or not, this is how our music is defined – our intervals and the relationships between notes can be reduced to combinations of the first three overtones – an idea which is absolutely incredible when you think about it.