Sunday, May 9, 2010

Simple Linear Transformations of the Octave

A few weeks ago, a colleague in the music department sent me a page he had written describing some remarkable counting properties of the twelve pitches of the musical octave, with the circle of fourths and circle of fifths most remarkable.   Here is a generalization of his ideas.  There is some cool group theory on Z12,  the set of integers 0,1,2,3,4,5,6,7,8,9,10,11 lurking here, but that will wait for a future post.  In the meantime, suppose we enumerate the twelve chromatic tones of a musical octave as in the following table:

C  C#  D  D#  E  F  F#  G  G#  A  A#  B  C
0   1   2   3   4   5   6    7   8   9   10   11   0

Notice that we will count modulo12  (mod 12) so that the C at the octave,which would have been numbered 12, becomes 0 instead.  Dave Benson refers to this as "clock arithmetic" in his comprehensive work Music: A Mathematical Offering.

The Chromatic Scale
We could generate the ascending chromatic scale with a very simple formula:

f(x)= x +1 (mod 12).

Notice that from any starting pitch x, every pitch of the chromatic scale can be expressed by n iterations of the function f.  That is,

 f (f (...f (x)))= x + n for n =1, 2, 3,....


Because the chromatic scales contains all twelve pitches, we can start with any choice of x  and eventually reach every tone in the octave. Another way to say this is that it takes twelve iterations of the generating function f to return to the starting pitch (modulo the octave). Notice the shift term “1” in f(x)is relatively prime to 12.

The Whole Tone Scales are generated by f (x)= x +2 (mod 12): 

0, 2, 4, 6, 8, 10, 0
and
1, 3, 5, 7, 9, 11, 1.

The shift term “2” in the generating function divides 12 evenly: 12÷2 =6.  Notice that six iterations of the generating function are required to return to the starting pitch, and that we need two distinct whole tone scales to reach all twelve tones.

The Diminished Seventh Arpeggios
are generated by f (x)= x +3 (mod 12):

0, 3, 6, 9, 0
1, 4, 7, 10, 1
and
2, 5, 8, 11, 2

The shift term “3” in the generating function divides 12 evenly: 12 ÷ 3 =4. Notice that four iterations of the generating function are required to return to the starting pitch, and that we need three distinct diminished seventh arpeggios to reach all twelve tones.

The Augmented Arpeggios are generated by f (x)= x +4 (mod 12):

0, 4, 8, 0
1, 5, 9, 1
2, 6, 10, 2
and
3, 7, 11, 3.

The shift term “4” in the generating function divides 12 evenly: 12 ÷ 4 =3. Notice that three iterations of the generating function are required to return to the starting pitch,and that we need four distinct augmented arpeggios to reach all twelve tones.

The Circle of Fourths is generated by f (x)= x +5 (mod 12): 

0, 5, 10, 3, 8, 1, 6, 11, 4, 9, 2, 7, 0.

The shift term “5” in the generating function is relatively prime with 12.
Notice that twelve iterations of the generating function are required to return
to the starting pitch, and that we need only one distinct circle of fourths to
reach all twelve tones.

The The Tritone Arpeggios are generated by f (x)= x +6 (mod 12):

0, 6, 0
1, 7, 1
 2, 8, 2
3, 9, 3
4, 10, 4
and
5, 11, 5.

The shift term “6” in the generating function divides 12 evenly: 12 ÷ 6 =2. Notice that two iterations of the generating function are required to return to the starting pitch,and that we need six distinct tritone arpeggios to reach all twelve tones.

The Circle of Fifths
is generated by f (x)= x +7 (mod 12):

0, 7, 2, 9, 4, 11, 6, 1, 8, 3, 10, 5, 0.

The shift term “7” in the generating function is relatively prime with 12.
Notice that twelve iterations of the generating function are required to return
to the starting pitch, and that we need only one distinct circle of fifths to
reach all twelve tones. Because x +7 = x - 5 (mod 12) we see that the
ascending circle of fifths is equivalent to the descending circle of fourths.

We could continue with generating functions f (x)= x +k
(mod 12), for k =8, 9, 10, 11. However,we know that because x +8 = x - 4 (mod 12), we would simply generate the descending augmented arpeggios.
Likewise x + 9=x - 3 (mod12) generates the descending diminished seventh arpeggios, x +10 = x - 2 (mod 12) generates the descending whole tone scale, and x +11 = x - 1 (mod 12) generates the descending chromatic scale.

Sunday, May 2, 2010

Coffee sounds

I was at a dinner last week with physicists and mathematicians from the College, along with a visiting scientist who was on campus to give a lecture. During dinner, I suggested that it was possible to identify by ear the difference between pouring hot water and pouring cold water. As we ate our dessert, I did a small demonstration. I poured ice-cold lemonade into a china cup, then poured hot coffee into an identical cup. A few of the diners didn't notice a difference. Most of us did hear the two liquids differently, but no one could accurately describe what we had heard: "more tinkly", "more splashy", "higher", "lower" were some of the descriptive words we suggested.

This weekend I conducted a more careful experiment, making a sound recording of each.
I poured very hot water (fresh from the tea kettle) from my teapot into a mug:  pouring hot water
Then I poured chilled water (fresh from the fridge) from the same teapot into the same mug:  pouring cold water

Do you hear a difference?

My wife said she thinks the cold water sounds higher pitched.  I agreed (she has a very good ear), but I was unsure.  I loaded these recorded sound files into Audacity and computed the power spectra.

 In the following figure, the hot water spectrum is shown in the upper view, with the cold water spectrum in the lower.

The first few peaks (114 Hz, 175 Hz, 358 Hz, 444 Hz, 536 Hz, 650 Hz) are common to both spectra.  I think this must be due to the physical properties of the teapot spout, the mug, and my kitchen.  Then comes the difference:  the strongest peak for the hot water is 895 Hz, while the strongest peak for the cold water is lower, at 780 Hz.   Overall, the strongest frequency of the hot water is 15% higher.  In terms of musical pitch, the MIDI digital music encoding format has a neat way to identify a pitch, given its frequency.  The standard reference pitch at 440 Hz is the musical note "A" above middle C on the piano.  MIDI calls this pitch number 69.  Every other pitch number is determined by the formula

p = 69 + 12\cdot\log_2 {(f/440)}
\,.

For us then, the hot water has a frequency component with pitch number 12.2 half-steps above A440, while the cold water has a strong frequency component 9.9 half-steps above  A440 ---  a difference of about one whole step.  This seems like a small difference to discern in two sequential experiments! And it is counter to our perception that the cold water had a higher pitch.  Maybe something else is going on.

I listened to the recordings a few more times, and realized that the last few seconds of each one are a lot different:


The last 2.5 seconds of
hot water.

The last 2.5 seconds of
cold water.

Notice that the end of the cold water sound much higher pitched than the end of the hot water.
Here are spectrum plots for the final 2.5 seconds  (upper view is hot water, lower view is cold water):

Notice that all the peaks up to about 1300Hz are the same in each case.  In the cold water spectrum, there are pronounced peaks at  about 2700 Hz, 4100 Hz and 5000 Hz.  There are none of these high frequency peaks in the hot water spectrum.

There is a difference at the beginning of the pour as well, with the cold water having a lower frequency sound.  The frequency difference  in the strongest peaks we saw in the full spectral decomposition is prominent in the first 2.5 seconds,  as illustrated by these final spectrum plots:




None of this explains why hot and cold pouring water have different sounds.  A quick Google search shows that this issue has been the subject of discussion boards from time to time.  The proposed physical causes are many and varied:  Temperature dependent changes in water viscosity, surface tension, density, and gas content.  There are suggestions that the mechanics of the pourer are different for hot and cold waters (like maybe we're naturally more careful with hot water).  Maybe the sound waves travel differently in the hot, swirling, steamy air inside the hot-water cup.  I'm eager to know the cause, but I'm not in a position to work it out now.  Maybe a later post!



Thursday, April 29, 2010

GLCA New Directions Grant Award

Eric  BarthChair of Mathematics and Computer Science Department and Associate Professor of Mathematics Eric Barth, Ph.D., has received a grant from the Great Lakes Colleges Association (GLCA) to explore formal connections between two areas of intense interest to him: mathematics and music. With his GLCA New Directions Initiative grant, Professor Barth will work to develop mathematical and computational models for music theory and analysis. “My goal is to elucidate patterns and correlations that emerge from collections of musical compositions, with the aim of identifying characteristic properties in a composer’s work not apparent from minute analysis of individual motifs and isolated pieces.” Barth’s research, titled “Scientific Computation to Computational Musicology,” draws on his undergraduate training in classical and jazz music performance, Ph.D. work in numerical mathematics, and research background in statistical mechanics. Barth earned a B. Music degree and both M.A. and Ph.D. degrees in mathematics from University of Kansas. He spent three years as a Howard Hughes Medical Institute Research Associate at the Courant Institute of Mathematical Sciences at New York University before coming to “K” in 1997. Each year, he teaches courses in differential equations and complex variables, as well as several sections of calculus and one or two physics courses. He also plays tenor saxophone with the nearby Gull Lake Jazz Orchestra. The GLCA New Directions Initiative is funded by a generous grant from the Andrew W. Mellon Foundation. The Initiative’s focus is to support the renewal and continued professional growth of liberal arts faculty members. A particular emphasis is to help faculty members think outside traditional boundaries and divisions of their discipline and of typical faculty work, in order to broaden intellectual perspectives, stimulate innovation in pedagogy, and pursue singular explorations.