Search This Blog

Wednesday, April 24, 2013

12 Semitones 十二律 again

I struggled with the 12 semitones in the previous post. It's a little easier to explain with music jargon and freshmen math.

Given any note, another node within the same octave that goes well with it is 1.5 times its frequency, in music it's called the perfect fifth. What I tried to say was if we begin with a root note and its perfect fifth, we'll naturally end up with 12 semitones.

It's self evident on a string instrument the pitch and length relationship is logarithmic, every semitone is a multiple of the previous note, the math is:
(ratio of note to the previous notes) raised to the (number of semitones)th power = 2 (frequency doubles to the same note in the next octave).

Now, let x be the number of semitones, and y be the order of the perfect fifth (in relation to the root), to get 1.5 times the frequency, we have this equation:

2 ^ (y/x) = 1.5

Stick this equation into Wolfram, we get:

y=0.585 x

The only reasonable (small) integer ratio that comes very close to this is 7/12 (=0.583). There! The perfect fifth is 7th note out of 12 semitones.

Since the octaves are circular, if we keep adding 7 semitones to get to the next perfect fifth in modulo 12 math, we'll get the sequence of 0, 7, 2, 9, 4, 11, 6, 1, 8, 3, 10, 5.  Align 0 with C in western notation of C, C#, D, D#, E, F, F#, G, G#, A, A#, B. it maps into C, G, D, A, E, B,  F#, C#, G#, D#, A#, F -- Circle of Perfect Fifths (with the 5 pentatonic notes leading the way).

There are integer ratios like 10/17 (=0.588) that works well also. For the Chinese, 12 was probably a natural choice, not only 12 is smaller and less odd than 17, there was already 12 months to a year, 12 hours to a day, 12 地支 to count things, etc.


Tuesday, April 23, 2013

A 2,500 Year Musical Journey

The best known Chinese history book was written by 司馬遷 which is simply called 史記 or Records of History. The reason for such a generic name was because no name was given in the first place!  But once this momentous book was completed, it became the Records of History. That's how important this work is in the Chinese culture.  Not only the Grand Historian (which also became a proper noun) was historically accurate and fair, the writing was equally superb, 2,100 years after the 5,000,000 words were written. My classmates and I studied the biography about an assassin 荊軻 from this book verbatim in our Chinese subject class in Hong Kong secondary school. In my opinion, it must rank as one of the best biographies or short stories ever written.

After gaining a tiny bit of knowledge in music recently, by chance, I came across this biography again and I was astounded by the musical details. In a famous scene where the assassin was sent off to kill the tyrant, a good friend 高漸離 came and played two songs to bid him goodbye, 司馬遷 wrote:

 太子及賓客知其事者,皆白衣冠以送之。至易水之上,既祖,取道,高漸離擊築,荊軻和而歌,為變徵之聲,士皆垂淚涕泣。又前而為歌曰:「風蕭蕭兮易水寒,壯士一去兮不復還!」復為聲慨,士皆瞋目,發盡上指冠。於是荊軻就車而去,終已不顧。

I won't bother to translate the lyrics of the songs and how they moved everyone to tears, what's important is the key of the first song was in 變徵 (徵 flat, i.e., key of F) and the second in 羽 (key of A).  So does it mean ancient Chinese music was not necessarily pentatonic since the F note is not in the traditional pentatonic scale (C, D, E, G, A)?  Did we use the 12 semitones and were they equal temperament (evenly spaced on the log scale) as in modern chromatic Western music? It turns out the answers to these questions can be found in the same book.

Skip the following paragraph  if you know music ...
I had zero interest in music until very recently. You have to start somewhere when you try to learn something new. In music, even the experts can say nothing more than that music is a universal language and thus requires no explanations. For some reason (or maybe because we all shared a single ancestor), we all like the C tone (DO in DO RE ME). Whether it's Mozart or a little random melody you make up, the last note would almost always be C.  In Chinese, the C note is called 宮, palace or home, perhaps for this reason. In frequency, C is 261.6 Hertz.

When you double the frequency of C, you again have the C note of the next octave which is still recognizable as C. Between C and the higher C, there are 11 white and black keys on the piano and the complete cycle contains the 12 distinct semitones, if I call the lower C 0 and count to 11, I'll be next to the key of C  (the period is 12).  The 7 white keys (or the C Major scale) in this system would be 0, 2, 4, 5, 7, 9, 11. The minor scale is just a different pattern of 7 notes.

Just when I think I can recognize the C note and use it as an anchor, it turns out the C note is not much of an anchor at all. The relative positions of the notes or the pattern is far more important that the absolute positions, one can start from any piano key, black or white, follow the 0, 2, 4, 5, 7, 8, 11 pattern and you'd think you're hearing DO RE ME FA SO LA TE. Someone that's around music a lot may be able to tell what key a song is in, for the rest of us, we can only tell that sometimes a song feels different in  different keys.

Harmony is important in Western tonal music because chords (playing several notes at the same time) generate pleasing harmonics. A major chord is 0, 4, 7 semitone intervals (4 is almost exact 1.25 time the frequency, and 7 close to 1.5 times) and a minor chord is 0, 3, 7 (1.2X and 1.5X).  (e.g. using the C note as the 0 position root, C major chord is C-E-G, and C minor chord C-D#-G). This is the main reason to have all the 12 chromatic keys on the keyboard, to produce harmonious sounds when several keys are struck at the same time. "Traditional" Chinese music is commonly known, or misunderstood by me, to be pentatonic (pattern 0, 2, 4, 7, 9) and one note at a time.

This is all I have to say about notes, scales, and chords before we go back to 司馬遷's Records of History 史記 and see how Chinese people tuned their musical instruments 2,000 years ago. The Chinese knew how the pitch of a string is inversely proportional to its length. Furthermore, if the string is shortened by 50%, we move up exactly one octave.  The algorithm to calculate the string length for each note was described in Records of History, it's called "Lose and Gain 1/3" (三分損益) method.

One starts with the number 81 which is 9x9, a favorite Chinese number that also produces some nice integers doing 1/3 fractions:
81
54 which is 81 - 1/3 of 81
72 which is 54 + 1/3 of 54
48 which is 72 - 1/3 of 72
64 which is 48 + 1/3 of 48

Let's peg 81 to the C note at 261.6 Hz
then use the ratio of the next length 54 to 81, since it's inversely proportional, 261.6 X 81/54
=392.4Hz.

Carry out this simple calculation for the first 5 notes, we get:
81 = 261.6 Hz    C 宮
54 = 392.4 Hz    G 徵
72 = 294 Hz       D 商
48 = 441.45 Hz  A 羽
64 = 331.08 Hz  E  角

Very, very close to the mathematically correct 261.6, 392, 293.7, 440, 329.6 frequencies of the pentatonic tones of C, G, D, A, E.

The algorithm continues to generate the 7 major diatonic notes and the rest of the 12 semitones (very good approximations using only 1/3 fractions) in near equal temperament.  And most surprisingly, at least for someone naive in music, the 12 semitones in the order of the Circle of Fifths! 

The Circle of Fifths (actually only 4 white keys away) first published in the 17th century in the West, this is the diagram every student of modern music theory is familiar with:





Clearly, ancient Chinese music was similar to modern western music as recorded by the Grand Historian 2,100 years ago. Nonetheless, it was no small wonder when it was confirmed in 1977 by the excavation of the still perfectly tuned bells of Marquis Yi.  This huge five octave, 12 semitone instrument was made 2,500 years ago, several hundred year before the Grand Historian was born. 

This gigantic instrument has the coverage of a modern grand piano with all the white and black keys minus one octave. The reason there are fewer bells than notes is because a lot of the bells chime 2 non-interfering notes (depending on whether it's struck in the front or on the side). 2,500 years ago, this much bronze was a GDP busting undertaking, I can imagine the importance of this musical instrument and how it must have had been the Terracotta Army 兵馬俑 sized project of its time. When this instrument was played (by many musicians striking multiple bells at the same time, that is, playing chords), it is a live demonstration of chromatic tonal music one can obviously hear and feel the resonance.




The 5 octave bells of Marquis Yi, the big ones weigh hundreds of kilos each



All this music stuff is quite mind-boggling to me until I started to ignore the little music knowledge that I  have acquired. Without the baggage, everything then is quite logical. The big decision after the root note (say the middle C) is established is to make another node that's 1.5 times its frequency to generate pleasing harmonics, and if you carry this out onto the next octave for the 3rd note (effective doing modulo 12 addition of +7). Why 12 notes?  because after 12 times, you'll come pretty close to an integer multiple of C again. All it takes is fudging the numbers a tiny bit to taste (for example, mathematically correct equal temperament by flattening each tone a little). My guess is, the history of Chinese and Western music began with the note C, then the next harmonious note at 1.5 the frequency -- G was fixed, everything after that is just trying to make things neat, either mathematically or harmonically.  Although the chord progression 12 semitones are not exactly 1 octave (like the 12 lunar months don't exactly add up to a year),  it is most logical that many cultures ended up with a 12 semitone system independently. I was only confused by my own preconceived notion that Western music is more precise or advanced. 

This suggests that tonal harmony was the first priority in the Chinese system.  Otherwise the math is simpler.  If we set out to calculate the 12 equal temperament semitones, every notes is 1.0595 times the frequency of the note before it. Do this 12 times, you'll get 2.00 (exactly one octave). Even without a calculator, a little trial and error should yield the 1.0595 ratio in a short time. The Lose and Gain 1/3 Method strongly suggests chord progression (or harmony) was paramount in the calculation of the 12 semitones (十二律). However, the convenient number 12 is not exact, using the Circle of Fifths to visualize, this method overshoots the next C slightly after F. The Western solution is to flatten each semitone slightly to make the circle close. I don't know enough to say, but I suspect that the Chinese system may be similar to the Greek system that a wolf note is used to close the circle. This is somewhat similar to the calendar systems, in the western Gregorian Calendar, each month (obviously a unit related to the moon) is stretched to the point it has little to do moon phase in order to line up the solar year, while the Chinese calendar preserves the moon phase and uses an occasional leap month to prevent the new year from deviating more than 1/2 month from the spring equinox.     


I cannot offer a theory for why we picked the 7 or 5 notes out of 12 for scale in most cultures, maybe the granularity is too fine to tell the 12 semitones apart, maybe fingering is just too difficult, or maybe it's something innate and we respond more strongly to certain patterns of frequencies. I am stretching badly here...  

In the 2,500 years since the Bells of Marquis Yi were forged, we could only make non-functional ornamental replicas of the bells, before the excavation, the dual tone bells were thought to be a myth.  
In the last 100 years, the Western system had been adopted and today even traditional Chinese music is played with instruments tuned to Western standards and sheet music written in Western notations. In some way, the Chinese music has lost some of its uniqueness; in another way the music is going back to where it began. The upshot of wholesale Westernization is that one can freely mix Chinese instruments with Western which is a very good thing.



Here's the original text from Records of History, instead of using letters, each semitone has its own 2 character name. Additionally, the 5 pentatonic notes also have the more familiar 1 character names  宮, 商, 角, 徵, 羽:

律數:九九八十一以為宮。三分去一,五十四以為徵。三分益一,七十二以為商。三分去一,四十八以為羽。三分益一,六十四以為角。黃鍾長八寸七分一,宮。大呂長七寸五分三分。太蔟長七寸分二,角。夾鍾長六寸分三分一。姑洗長六寸分四,羽。仲呂長五寸九分三分二,徵。蕤賓長五寸六分三分。林鍾長五寸分四,角。夷則長五寸三分二,商。南呂長四寸分八,徵。無射長四寸四分三分二。應鍾長四寸二分三分二,羽。生鍾分:子一分。醜三分二。寅九分八。卯二十七分十六。辰八十一分六十四。巳二百四十三分一百二十八。午七百二十九分五百一十二。未二千一百八十七分一千二十四。申六千五百六十一分四千九十六。酉一萬九千六百八十三分八千一百九十二。戌五萬九千四十九分三萬二千七百六十八。亥十七萬七千一百四十七分六萬五千五百三十六。

(There were errors in the original text, and both the algorithm and some numbers are recorded here. The errors seemed to be introduced when the text was transcribed, the algorithm existed 100s of years before the book.)