A flat is not g sharp (2)

8–. Translated from the original Interlingua by the author.


This is the continuation of the previous article, which is about notes that appear in two musical contexts, thereby change roles, and sometimes as a result get a different name: a note ‘a flat’, A♭, becomes ‘g sharp’, G♯.

On keyboard instruments (piano, organ, accordion) and instruments that have a neck with fixed frets (guitar, mandolin, viola da gamba, banjo), a ‘g sharp’ is identical to an ‘a flat’. They have the same pitch. On fretless instruments however, like on a violin or violoncello, it is possible to make such notes different. Other examples of such enharmonically equal notes are: e sharp / f / g double flat, b flat / a sharp, e flat / d sharp, d flat / c sharp, g flat / f sharp, b sharp / c / d double flat.

But how to differentiate them? Is a ‘g sharp’ higher than an ‘a flat’, or lower? And why? And how much lower or higher? This is the subject of this second article in the series.

Greeks and others

The answer depends on the intonation system, the way of determining the pitches, the frequencies, of notes in the musical scale that is used.

Already the Ancient Greeks thought about those questions in music theory. As I had understood it, Pythagoras (Πυθαγόρας; yes, the same guy who posited that famous theorem about the sides of a triangle) had described a theory of scales, in which only the factors 2 and 3 are allowed, so the octave (2:1), and the fifth (3:2) and fourth (4:3) are the constructive elements of scales and intervals.

But in fact, as I read in 2020, very little is known with certainty about the life of Pythagoras, and not a single text of his hand has survived. Among scientists there are two schools with opposing view: some, notably Walter Burkert, see/saw Pythagoras as the founder of a religion, some kind of shaman, and when he thought about mathematics and music, his objectives were in speculative cosmology, numeric symbolism, and magical techniques.

Other scientists, the most influential of which is the Russian Leonid Zhmud (Леонид Яковлевич Жмудь), argue that the shamanistic elements were added later, by comedy writers wanting to mock Pythagoras, and by similar tendencies in the period of the Roman Emperors. The true historical Pythagoras, according to Zhmud, was a philosopher concerned with astronomy, geometry, mathematics and music theory.

Be that as it may, the fact remains that with the numbers 2 and 3 you can construct musical intervals. If you stack two fifths and ‘subtract’ an octave, you get a major second with the frequency ratio 9:8, because 3/2 * 3/2 / 2/1 = 1.125. Repeating the recipe results in a major third of 81:64.

We see that the elegance of using only two factors, 2 and 3, doesn’t always lead us to elegant ratios with low numbers. This is even worse when we look at the interval between the fourth (at 4:3) and the major third we just found: 4/3 / 81/64 = 256:243!

About another Greek, who lived about 200 years later, Aristoxenos de Tarento (Greek: Ἀριστόξενος ὁ Ταραντῖνος), I thought to have understood that he allowed one more factor than Pythagoras, namely also 5, and thus arrived at simpler ratios: 5:4 for the major third, and 6:5 for the minor third, which in the Pythagorean system is 32:27.

But in the Wikipedia I don’t find this factor 5 clearly mentioned: read about his life and works in English, of about his life in German, those who can and want to. Later on, Boethius (477–524), Gioseffo Zarlino (1517–1590), and Hermann von Helmholtz (1821–1894), in his 1863 work: “Die Lehre von den Tonempfindungen als physiologische Grundlage für die Theorie der Musik”, ‘The study of tonal sensations as the physiological basis for the theory of music’, have more evidently worked on this subject. And many others too.

An intonation that uses the factors 2, 3 and 5 in English is nowadays also called 5-limit tuning. One could also consider the addition of the factors 7 (7-limit tuning), 11, and even 17. In my opinion, that is applied in oriental music (Arab, Turkish, Greek).

Dissonant notes


Intuitively it seems plausible, that intervals with a frequency ratio consisting of small integers are consonant, and sound better than when the ratio integers are larger, which results in dissonance. Buy why? There are two explanations.

But first now let’s listen. (See also the tablature.) We hear a perfect fifth, containing the notes ‘d’ and ‘a’ (146.7 and 220 Hz), then the same but with the ‘a’ about a fifth of a semitone (about 22.6 cents) higher, then lower. The first interval sounds pleasant, the other two clearly do not.

What follows in the sound sample is the interval ‘prime’, i.e. the same note twice, but with one of them out of tune. This too doesn’t sound good. You can hear the beats (Wikipedia in German, and in French): slow fluctuations of the total amplitude. You can hear it but also see it: here is Screenshot from Audacity, of out-of-tune notes a screenshot from the program audacity. Beats are essentially a form of interference. This is the first explanation of dis­sonance: the two notes with almost equal frequencies reinforce and attenuate each other, while they alternate between in phase and in antiphase. Slow beats can still sound somewhat agreeable, but not if they’re faster.

An example of beats can be heard at the end (0m11s) of the fragment, that I already referred to at the end of the previous article. It contains an imitation of the lowest guitar string, at 82.5 Hz. A signal that is not purely sinusoidal always contains harmonics: frequencies that are an exact multiple of the fundamental. So harmonic number 5 has a frequency of 5 x 82.5 = 412.5 Hz.

There is also a note g sharp, on the highest string of the guitar, with the Pythagorean ratio 81:64, but two octaves higher, giving 81:16. Its frequency is therefore 417.65625 Hz. The difference is 5.15625 Hz. (Technical limitations of the example, created by a program that activates a Yamaha OPL chip, like that of the Soundblaster, emulated by DOSBox, causes the real difference to be 4.74 Hz.)

Five is equal to 80:16, and the Pythagorean ratio is 81:16, so we hear the difference of 81:80, the so-called Didymean comma (Spanish Wikipedia), as a beat frequency.

Difference tones

The other explanation of the phenomenon of dissonance has to do with non-linear distortion. If the propagation or amplification of a signal to a certain extent is non-linear, i.e. depends on the momentaneous amplitude, the result is the emergence of sum and difference frequencies.

The principle of difference frequencies is used in radio technology (or was used, traditional radio now gradually becoming obsolete): frequencies in the medium wave band between 531 and 1602 kHz are transformed to a fixed intermediate frequency of 455 kHz (or 452, 460 etc.), by applying, with non-linearity, the signal of an oscillator tunable between 986 and 2057 kHz. Building a narrow filter for a single radio station is much easier when the frequency is always the same, than creating a tunable filter.

This makes a superheterodyne receiver.

The same principle is applied a second time for regaining the audio signal that was modulated onto the carrier: the non-linearity of a diode, or of an appropriately biased transistor, generates difference frequencies between the carrier and the sidebands, which together make the signal originally modulated.

Superheterodyne receivers are also employed for the FM band (FM = frequency modulation; in German UKW, Ultrakurzwelle, ultra short wave band): 118.7 minus 10.7 MHz equals 108.0, and 98.2 minus 10.7 equals 87.5 MHz.

Back to the music: harmonic distortion caused by non-linearity is everywhere: in amplifiers, loudspeakers, and even in the human ear, especially in the presence of lots of decibels. In Hi-Fi this is an undesirable phenomenon, avoided as much as possible. But for the electric guitar, what were originally shortcomings of equipment, have become means of giving the instrument its unique sound. Several different sounds in fact, depending on the amount of distortion and the musical style, from blues and jazz to pop, up to heavy metal.

It has its price though: dissonance. The beats have a difference frequency, audible as variations in the amplitude of the original tones. The difference frequency itself is not present in the sound spectrum. In the case of distortion however, it is.

But a 5 hertz tone is inaudible, is it not? The hearing range is about 20 to 20,000 Hz (for children; less high for adults as they age). How can an inaudible tone be a problem? The answer is in the harmonics. What happens between the fifth harmonic of 82.5 Hz, and the major third (plus two octaves), also happens between the tenth and second harmonics of the two notes (difference frequency is 10.3125 Hz), between the fifteenth and third (15.46875), and it continues like that until in the hearing range.

A note of which the fundamental is missing, as perhaps are some of its lower harmonics, or they are hardly audible, still sounds as that note. In fact, even notes well within the hearing range are difficult to hear if only the fundamental is present, i.e. the signal, the wave, is exactly sinusoidal.

In the demonstration there are 110 Hz notes. 110 Hz is not very low, it is the 5th string of a guitar, A. Number 6, E, is the lowest. When someone plays the nota A on a guitar, it is clearly audible. But in the demonstration where it comes from a Soundblaster (emulated, but emulated well), at first you hear very little. A note that you hear well only results after turning on the Soundblaster’s FM synthesis, whereby frequency modulation in the OPL2 or OPL3 chip adds higher harmonics to the note.


Music theory is important, but the music itself even more. How do the Pythagorean intonation, and the intonation according to Aristoxenos or Zarlino actually sound? Let us listen to an example. In the sample there are four major chords consisting of three notes each, so we have four triads. The notes are g-b-d. The first follows Pythagoras’s method, the second allows also the factor 5. Then the two triads are repeated.

After that there is the same thing, but with minor chords, g-b♭-d.

Finally, you can hear the same eight triads, now in equal temperament, in equidistant tuning.

What sounds better? For the major chord, I clearly prefer Zarlino, so the second and fourth in the series of four. For the minor chord, I’m in doubt, but then also prefer the Zarlino version.

Technical intermezzo

I created my examples using a program I wrote already in 1992 and 1993, for playing guitar tablatures on a Soundblaster sound card, later also on a Gravis Ultrasound. I recently (September, October 2020) retested and improved the program, and it is now possible to specify notes as exact fret positions (integer number, e.g. 2, 3, 5 etc.), but also as decimal numbers to get intermediate intervals, and even as ratios of integers. Le program facilitates a duet of two guitars.

Because modern computers no longer possess Soundblaster cards, I tested the program in DOSBox, a system that emulates the old MSDOS including an Adlib or Soundblaster card.

The tablature for the triads just discussed looks like this. That for the dissonant notes is here. The examples at the end of the previous article (link) are as follows: equidistant  1  and  2 , Zarlino  1  and  2 , Pythagoras  1  and  2 , again Pythagoras, but specified in a different way,  1  and  2 .

The pitches of the notes are reduced to 24 steps per octave, which of course includes the 12 semitones of the equidistant scale of equal temperament. Alternatively however, it is also possible to use a subdivision of 53 equal distances. This repartition miraculously contains quite good approximations for almost all of the pitches defined by ratios of integers, as used for the Pythagorean and Zarlinesque tuning systems.

An additional source of imprecision is that in the Soundblaster (more correctly: in Yamaha’s OPL family chips) the frequency of notes is determined by a 10-bit number, so by 1024 distinct values. (In addition, there are 3 bits for specifying the octaves.) For maximum accuracy, one normally uses the values 512 through 1023, because the ratio of 511 and 510 is double that of 1021 and 1020. The resolution thus varies between 3.38 cents (513/512) and 1.69 cents (1023/1022).

Inter­val Ratio Fre­quen­cy (Hz) Cents rel. to 220 Hz Ap­proxi­mation, parts / octave Fre­quen­cy
(Hz, Δ cents)
Factor Yamaha OPL Fre­quen­cy
(Hz, Δ cents)
prime 1:1 195.556 −203.910 −9/53 195.571 (+0.136) 516 195.720 (+1.455)
minor third 32:27 231.770 90.225 4/53 231.815 (+0.341) 611 231.754 (−0.119)
minor third 6:5 234.667 111.731 5/53 234.867 (+1.476) 619 234.788 (+0.896)
major third 5:4 244.444 182.404 8/53 244.265 (−1.271) 644 244.271 (−1.231)
major third 81:64 247.500 203.910 9/53 247.480 (−0.136) 652 247.305 (−1.364)
fifth 3:2 293.333 498.045 22/53 293.345 (+0.068) 773 293.201 (−0.783)

The formula of the Yamaha OPL chips is:
14318180/4/72 * factor * 2^(20 − octave).

Back to the question

Still, after so many words were written and calculations done, it is not clear which is higher, a g sharp or an a flat. Here are the calculations, accepting factors 2 and 3, or also 5.


In the table below I have listed the frequency ratios of a Pythagorean major scale (called Pythagorean, although we do not know if it was really devised by Pythagoras). I have shifted it to make in start at the note ‘a’ instead of ‘c’. From major to minor, from Ionian to Aeolian (although those name in fact perhaps aren’t correct: see Modalité grégorienne and Octoéchos).

Note Ratio rel. to
the note c
Ratio rel. to
the note a
Cents above
the note a
a 27:32 1:1 0.0
b 243:256 9:8 203.9
c 1:1 32:27 294.1
d 9:8 4:3 498.0
e 81:64 3:2 702.0
f 4:3 128:81 792.2
g 3:2 16:9 996.1
a♭ 128:81 4096:2187 1086.3
g♯6561:4096 243:128 1109.8
a 27:16 2:1 1200.0

The note a♭ (a flat) I calculated from ‘f’, by superimposing the ratio of the Pythagorean minor third, 32:27. So 4:3 x 32:27 = 128:81, and 128:81 x 32:27 = 4096:2187.

The g♯ (g sharp) I calculated from ‘e’, by superimposing the ratio of the Pythagorean major third, 81:64. So 81:64 x 81:64 = 6561:4096, and 3:2 x 81:64 = 243:128.

The a flat is lower than the g sharp. I put this in tablatures like this:

The result sounds like this. Not really good.


Now the same thing using an intonation by Aristoxenos or Zarlino or who knows who exactly invented it. Shifting the scale of ‘c’ doesn’t work well here, because it puts the small (10:9) and big (9:8) distances of the major second in non-optimal position. Therefore I first set up the scale from ‘a’, and the scale from ‘c’ is there only as an illustration.

Note Ratio rel. to
the note c
Ratio rel. to
the note a
Cents above
the note a
a 5:6 1:1 0.0
b 15:16 9:8 203.9
c 1:1 6:5 315.6
d 10:9 4:3 498.0
e 5:4 3:2 702.0
f 4:3 8:5 813.7
g 3:2 9:5 1017.6
g♯25:16 15:8 1088.3
a♭ 8:5 48:25 1129.3
a 5:3 2:1 1200.0

The note a♭ (a flat) I calculated from ‘f’, by superimposing the perfect minor third ratio, 6:5. So 4:3 x 6:5 = 8:5, and 8:5 x 6:5 = 48:25.

The g♯ (g sharp) I calculated from ‘e’, by superimposing the perfect major third ratio, 5:4. So 5:4 x 5:4 = 25:16, and 3:2 x 5:4 = 15:8.

The a flat is higher than the g sharp. I put this in tablatures like this: parts  1  and  2 .

The result sounds like this. Also not really good. Bizarre, in fact. But not changing the a flat, letting it keep the pitch it had before, sounds very much worse!

Equal temperament

At times I thought Leonid Kogan slightly raised his note, which might mean that this violinist followed the Pythagorean method, but it seems more likely that this is an illusion, that in reality there is no difference. So the orchestra and the solo instrument play in equal temperament? I find this demonstration, with the 12 notes per octave of a piano, the best.

Mathematical theory of musical intonation is one thing, music is another.

Addition 19 January 2022: See also the article Enharmonic in the English Wikipedia, which in subsection Examples in practice gives a lot of additional interesting examples. Kudos and thanks.