Category Archives: Music

The speed of sound, Buxbaum’s correction

Ernst Mach showed that sound must travel at a particular speed through any material, one determined by the conservation of energy and of entropy. At room temperature and 1 atm, that speed is theoretically predicted to be 343 m/s. For a wave to move at any other speed, either the laws of energy conservation would have to fail, or ∆S ≠ 0 and the wave would die out. This is the only speed where you could say there is a traveling wave, and experimentally, this is found to be the speed of sound in air, to good accuracy.

Still, it strikes me that Mach’s assumptions may have been too restrictive for short-distance sound waves. Perhaps there is room for other sound speeds if you allow ∆S > 0, and consider sound that travels short distances and dies out far from the source. Waves at these, other speeds might affect music appreciation, or headphone design. As these waves were never treated in my thermodynamics textbooks, I wondered if I could derive their speed in any nice way, and if they were faster or slower than the main wave? (If I can’t use this blog to re-think my college studies, what good is it?)

I t can help to think of a shock-wave of sound wave moving down a constant area tube of still are at speed u, with us moving along at the same speed as the wave. In this view, the wave appears stationary, but there is a wind of speed u approaching it from the left.

Imagine the sound-wave moving to the right, down a constant area tube at speed u, with us moving along at the same speed. Thus, the wave appears stationary, with a wind of speed u from the right.

As a first step to trying to re-imagine Mach’s calculation, here is one way to derive the original, for ∆S = 0, speed of sound: I showed in a previous post that the entropy change for compression can be imagines to have two parts, a pressure part at constant temperature: dS/dV at constant T = dP/dT at constant V. This part equals R/V for an ideal gas. There is also a temperature at constant volume part of the entropy change: dS/dT at constant V = Cv/T. Dividing the two equations, we find that, at constant entropy, dT/dV = RT/CvV= P/Cv. For a case where ∆S>0, dT/dV > P/Cv.

Now lets look at the conservation of mechanical energy. A compression wave gives off a certain amount of mechanical energy, or work on expansion, and this work accelerates the gas within the wave. For an ideal gas the internal energy of the gas is stored only in its temperature. Lets now consider a sound wave going down a tube flow left to right, and lets our reference plane along the wave at the same speed so the wave seems to sit still while a flow of gas moves toward it from the right at the speed of the sound wave, u. For this flow system energy is concerned though no heat is removed, and no useful work is done. Thus, any change in enthalpy only results in a change in kinetic energy. dH = -d(u2)/2 = u du, where H here is a per-mass enthalpy (enthalpy per kg).

dH = TdS + VdP. This can be rearranged to read, TdS = dH -VdP = -u du – VdP.

We now use conservation of mass to put du into terms of P,V, and T. By conservation of mass, u/V is constant, or d(u/V)= 0. Taking the derivative of this quotient, du/V -u dV/V2= 0. Rearranging this, we get, du = u dV/V (No assumptions about entropy here). Since dH = -u du, we say that udV/V = -dH = -TdS- VdP. It is now common to say that dS = 0 across the sound wave, and thus find that u2 = -V(dP/dV) at const S. For an ideal gas, this last derivative equals, PCp/VCv, so the speed of sound, u= √PVCp/Cv with the volume in terms of mass (kg/m3).

The problem comes in where we say that ∆S>0. At this point, I would say that u= -V(dH/dV) = VCp dT/dV > PVCp/Cv. Unless, I’ve made a mistake (always possible), I find that there is a small leading, non-adiabatic sound wave that goes ahead of the ordinary sound wave and is experienced only close to the source caused by mechanical energy that becomes degraded to raising T and gives rise more compression than would be expected for iso-entropic waves.

This should have some relevance to headphone design and speaker design since headphones are heard close to the ear, while speakers are heard further away. Meanwhile the recordings are made by microphones right next to the singers or instruments.

Robert E. Buxbaum, August 26, 2014

Musical Color and the Well Tempered Scale

by R. E. Buxbaum, (the author of all these posts)

I first heard J. S. Bach’s Well Tempered Clavier some 35 years ago and was struck by the different colors of the different scales. Some were dark and scary, others were light and enjoyable. All of them worked, but each was distinct, though I could not figure out why. That Bach was able to write in all the keys without retuning was a key innovation of his. In his day, people tuned in fifths, a process that created gaps (called wolf) that prevented useful composition in affected keys.

We don’t know exactly how Bach tuned his instruments as he had no scientific way to describe it; we can guess that it was more uniform than the temper produced by tuning in fifths, but it probably was not quite equally spaced. Nowadays electronic keyboards are tuned to 12 equally spaced frequencies per octave through the use of frequency counters.  Starting with the A below “middle C”, A4, tuned at 440 cycles/second (the note symphonies tune to), each note is programmed to vibrate at a wavelength that is lower or higher than one next to it by a factor of the twelfth root of two, 12√2= 1.05946. After 12 multiples of this size, the wavelength has doubled or halved and there is an octave. This is called equal tempering.

Currently, many non-electric instruments are also tuned this way.  Equally tempering avoids all wolf, but makes each note equally ill-tempered. Any key can be transposed to another, but there are no pure harmonies because 12√2 is an irrational number (see joke). There is also no color or feel to any given key except that which has carried over historically in the listeners’ memory. It’s sad.

I’m going to speculate that J.S. Bach found/ favored a way to tune instruments where all of the keys were usable, and OK sounding, but where some harmonies are more perfect than others. Necessarily this means that some harmonies will be less-perfect. There should be no wolf gaps that would sound so bad that Bach could not compose and transpose in every key, but since there is a difference, each key will retain a distinct color that JS Bach explored in his work — or so I’ll assume.

Pythagoras found that notes sound best together when the vibrating lengths are kept in a ratio of small numbers. Consider the tuning note, A4, the A below middle C; this note vibrates a column of air .784 meters long, about 2.5 feet or half the length of an oboe. The octave notes for Aare called A3 and A5. They vibrate columns of air 2x as long and 1/2 as long as the original. They’re called octaves because they’re eight white keys away from A4. Keyboards add 4 black notes per octave so octaves are always 12 notes away. Keyboards are generally tuned so octaves are always 12 keys away. Based on Pythagoras, a reasonable presumption is that J.S Bach tuned every non-octave note so that it vibrates an air column similar to the equal tuning ratio, 12√2 = 1.05946, but whose wavelength was adjusted, in some cases to make ratios of small, whole numbers with the wavelength for A4.

Aside from octaves, the most pleasant harmonies are with notes whose wavelength is 3/2 as long as the original, or 2/3 as long. The best harmonies with A4 (0.784 m) will be with notes with wavelengths (3/2)*0.784 m long, or (2/3)*0.784m long. The first of these is called D3 and the other is E4. A4 combines with D3 to make a chord called D-major, the so-called “the key of glory.” The Hallelujah chorus, Beethoven’s 9th (Ode to Joy), and Mahler’s Titan are in this key. Scriabin believed that D-major had a unique color, gold, suggesting that the pure ratios were retained.

A combines with E (plus a black note C#) to make a chord called A major. Songs in this key sound (to my ear) robust, cheerful and somewhat pompous; Here, in A-major is: Dancing Queen by ABBA, Lady Madonna by the BeatlesPrelude and Fugue in A major by JS Bach. Scriabin believed that A-major was green.

A4 also combines with E and a new white note, C3, to make a chord called A minor. Since E4 and E3 vibrate at 2/3 and 4/3 the wavelength of A4 respectively, I’ll speculate that Bach tuned C3 to 5/3 the length of A4; 5/3*.0784m =1.307m long. Tuned his way, the ratio of wavelengths in the A minor chord are 3:4:5. Songs in A minor tend to be edgy and sort-of sad: Stairway to heaven, Für Elise“Songs in A Minor sung by Alicia Keys, and PDQ Bach’s Fugue in A minor. I’m going to speculate the Bach tuned this to 1.312 m (or thereabouts), roughly half-way between the wavelength for a pure ratio and that of equal temper.

The notes D3 and Ewill not sound particularly good together. In both pure ratios and equal tempers their wavelengths are in a ratio of 3/2 to 4/3, that is a ratio of 9 to 8. This can be a tensional transition, but it does not provide a satisfying resolution to my, western ears.

Now for the other white notes. The next white key over from A4 is G3, two half-tones longer that for A4. For equal tuning, we’d expect this note to vibrate a column of air 1.05946= 1.1225 times longer than A4. The most similar ratio of small whole numbers is 9/8 = 1.1250, and we’d already generated one before between D and E. As a result, we may expect that Bach tuned G3 to a wavelength 9/8*0.784m = .88 meters.

For equal tuning, the next white note, F3, will vibrate an air column 1.059464 = 1.259 times as long as the A4 column. Tuned this way, the wavelength for F3 is 1.259*.784 = .988m. Alternately, since 1.259 is similar to 5/4 = 1.25, it is reasonable to tune F3 as (5/4)*.784 = .980m. I’ll speculate that he split the difference: .984m. F, A, and C combine to make a good harmony called the F major chord. The most popular pieces in F major sound woozy and not-quite settled in my opinion, perhaps because of the oddness of the F tuning. See, e.g. the Jeopardy theme song, “My Sweet Lord,Come together (Beetles)Beethoven’s Pastoral symphony (Movement 1, “Awakening of cheerful feelings upon arrival in the country”). Scriabin saw F-major as bright blue.

We’ve only one more white note to go in this octave: B4, the other tension note to A4. Since the wavelengths for G3 was 9/8 as long as for A4, we can expect the wavelength for B4 will be 8/9 as long. This will be dissonant to A4, but it will go well with E3 and E4 as these were 2/3 and 4/3 of A4 respectively. Tuned this way, B4 vibrates a column 1.40 m. When B, in any octave, is combined with E it’s called an E chord (E major or E minor); it’s typically combined with a black key, G-sharp (G#). The notes B, E vibrate at a ratio of 4 to 3. J.S. Bach called the G#, “H” allowing him to spell out his name in his music. When he played the sequence BACH, he found B to A created tension; moving to C created harmony with A, but not B, while the final note, G# (H) provided harmony for C and the original B. Here’s how it works on cello; it’s not bad, but there is no grand resolution. The Promenade from “Pictures at an Exhibition” is in E.

The black notes go somewhere between the larger gaps of the white notes, and there is a traditional confusion in how to tune them. One can tune the black notes by equal temper  (multiples of 21/12), or set them exactly in the spaces between the white notes, or tune them to any alternate set of ratios. A popular set of ratios is found in “Just temper.” The black note 6 from A4 (D#) will have wavelength of 0.784*26/12= √2 *0.784 m =1.109m. Since √2 =1.414, and that this is about 1.4= 7/5, the “Just temper” method is to tune D# to 1.4*.784m =1.098m. If one takes this route, other black notes (F#3 and C#3) will be tuned to ratios of 6/5, and 8/5 times 0.784m respectively. It’s possible that J.S. Bach tuned his notes by Just temper, but I suspect not. I suspect that Bach tuned these notes to fall in-between Just Temper and Equal temper, as I’ve shown below. I suspect that his D#3 might vibrated at about 1.104 m, half way between Just and Equal temper. I would not be surprised if Jazz musicians tuned their black notes more closely to the fifths of Just temper: 5/5 6/5, 7/5, 8/5 (and 9/5?) because jazz uses the black notes more, and you generally want your main chords to sound in tune. Then again, maybe not. Jimmy Hendrix picked the harmony D#3 with A (“Diabolus”, the devil harmony) for his Purple Haze; it’s also used for European police sirens.

To my ear, the modified equal temper is more beautiful and interesting than the equal temperament of todays electronic keyboards. In either temper music plays in all keys, but with an un-equal temper each key is distinct and beautiful in its own way. Tuning is engineering, I think, rather than math or art. In math things have to be perfect; in art they have to be interesting, and in engineering they have to work. Engineering tends to be beautiful its way. Generally, though, engineering is not perfect.

Summary of air column wave-lengths, measured in meters, and as a ratio to that for A4. Just Tempering, Equal Tempering, and my best guess of J.S. Bach's Well Tempered scale.

Summary of air column wave-lengths, measured in meters, and as a ratio to that for A4. Just Tempering, Equal Tempering, and my best guess of J.S. Bach’s Well Tempered scale.

R.E. Buxbaum, May 20 2013 (edited Sept 23, 2013) — I’m not very musical, but my children are.