Friday, June 28, 2019

Tau Day Post: A Return to Computer Music

Table of Contents

1. Pappas Question of the Day
2. That Time of the Year Again
3. Tau Day and Summer School
4. Ingenuity with Tau Day Pies
5. Tau Day Links
6. More Tau Day Music
7. The Sweet Spot
8. BACH and CAGE Again
9. The Arabic Lute
10. Conclusion

Pappas Question of the Day

It turns out to be bad timing for the Pappas calendar and blogging this week. This is the only post that I'm making this week, but as it turns out, there is Geometry on the Pappas calendar everyday this week -- except today. But I wish to post a Pappas problem today, so let me choose one of the problems from earlier this week.

This week on her Mathematics Calendar 2019, Theoni Pappas wrote:

A sector of a circle with an arc of pi/12 radians is 1/? of the circle.

Well, there are two ways to solve this problem. One is to recall that the entire circumference is 2pi radians, and so we can use dimensional analysis:

(pi/12)radians * 1 circumference/2pi radians = pi/(12 * 2pi) of the circle = 1/24 of the circle

Therefore the ? should be replaced by 24 -- and of course, this problem must have come from the 24th, last Monday.

The other method would be easier, if we could only read the answer directly from the fractional radian measure. The measure is pi/12 -- but no, this doesn't mean that it's 1/12 of the circle. Instead, since the circumference is 2pi radians, we multiply both the numerator and denominator by 2:

(pi/12)radians * 2/2 = (2pi/24)radians

Indeed, this problem would have been more straightforward if the 2pi were written with a single symbol, such as tau. Then the radian value would have been tau/24, and then we could read the 24 straight off.

That Time of the Year Again

Hmm, today's date isn't the 24th, but the 28th. And now I hear the sound of all of my readers double-checking the date....

You guessed it -- another Tau Day is upon us. This is what I wrote last year about tau:

But what exactly is this constant "tau," anyway? It is not defined in the U of Chicago text -- if it were, it would have appeared in Section 8-8, as follows:

Definition:
tau = C/r, where C is the circumference and r the radius of a circle.

Now the text tells us that C = 2pi * r, so that C/r = 2pi. Therefore, we conclude that tau = 2pi. The decimal value of this constant is approximately 6.283185307..., or 6.28 to two decimal places. Thus the day 6/28, or June 28th, is Tau Day.

It was about ten or fifteen years ago when I first read about Pi Day, and one old site (which I believe no longer exists) suggested a few alternate Pi Days, including Pi Approximation Day, July 22nd. One day that this page mentioned was Two Pi Day, or June 28th. But this page did not suggest giving the number 2pi the name tau or any another special name.

Now about eight years ago -- on another Pi Day, March 14th -- I decided to search Google for some Pi Day webpages. But one of the search results was strange -- this webpage referred to a "half tau day":

http://halftauday.com/

"The true circle constant is the ratio of a circle’s circumference to its radius, not to its diameter. This number, called τ (tau), is equal to 2π, so π is 12τ—and March 14 is thus Half Tau Day. (Of course, since τ=6.28, June 28, or 6/28, is Tau Day itself.) Although it is of great historical importance, the mathematical significance of π is simply that it is one-half τ."

The author of this link is Michael Hartl. Here's a link to his 2019 "State of the Tau" address:

https://tauday.com/state-of-the-tau

According to this link, Hartl and his friend Juan Ferreiro translated his Tau Manifesto this year into Spanish. He also adds that just as Pi Day is Einstein's birthday, Tau Day is the birthday of both physicist Maria Mayer and rocket scientist Elon Musk.

Oh, by the way, here's one argument in favor of tau that I've rarely seen addressed by tauists -- that is, advocates of tau. It's pointed out that there's one formula in which pi shines:

A = pi r^2

This formula would be less elegant if it were written using tau:

A = (1/2) tau r^2

Tauists often respond by saying, "well, the 1/2 reminds us of the proof of the area formula" (for example, using the area of triangles) or "the 1/2 reminds us of other quadratic forms."

But actually there's a much stronger argument in favor of tau. The formula for the area of a sector of central angle theta is:

A = (1/2) theta r^2

Oh, so this formula contains a 1/2 no matter what! The full circle area is given when theta = tau. (I see that this formula actually is buried in the Tau Manifesto, but still the other arguments appear first in the Manifesto.)

Tau Day and Summer School

In past years, I've often pointed out that both Tau Day and Pi Approximation Day can be used as alternatives to Pi Day for summer school classes. Therefore, if I were teaching summer school, today would have been a Tau Day party in my classes.

Different districts have different schedules, so let's assume that this is a district with summer school on Fridays. The idea I had for my own classes was that Fridays -- during the time left over if the students finished early -- would become somewhat relaxed. (Indeed, my policy on cell phones would have been that they're only allowed on Fridays after the test is complete.)

When many of the students have completed the test, music break would begin. On instruction days, the song I'd sing would be based on that day's lesson. But on Fridays after the test, I could sing a song that's more fun instead. For example, last Friday I would've played a song from Square One TV, such as "Square Song." I choose this song (really a rap) only because it was originally posted to YouTube twelve years ago on June 21st (as you know how I like to celebrate YouTube anniversaries).

Today I would have played Vi Hart's Tau Day tune, "Song About a Circle Constant." These songs are fun to sing after a long, hard test -- and I could even generate a discussion about why we'd give 2pi a special name like tau. And in a summer Algebra I class, these songs about squares and circles can serve as a preview to the Geometry that they'll hopefully take in the fall (provided they pass the summer class, of course).

I can keep up the tau = 2pi idea and let the food prize be pie. Recall that back on Pi Day, I purchased three full-sized pies for two classes. Notice that pi can be rounded down to 3.

So let's round tau down to six and buy personal pies for the top six students (in each of the two periods that summer teachers typically have). Actually, we could round tau up to seven, and then give the seventh pie to the most improved student -- that is, the student whose score rises the most from the first unit test (from last Thursday) to the second unit test.

This is actually something I regret not doing in my old middle school class at the charter school -- I awarded four Red Vines to the students who earned A's on my tests, but gave nothing to the most improved student. I can't help but think back to the day when the "special scholar" (from my Phi Approximation Day post) earned her first C on a test. I gave her one piece of candy that day anyway, but under this plan, the most improved student would have earned (almost) as much candy as the ones who got A's. Perhaps this would have helped me establish better rapport with her. Instead, she felt that she wasn't good enough unless she earned A's -- and then proceeded to cheat to get those A's.

Instead of pies, I could give out cupcakes instead -- just like the cupcakes mentioned in Michael Hartl's State of the Tau address. By the way, since I didn't actually teach any summer school today, what did I really eat today? Well, I ate at Tau-co Bell, of course. I probably should have ordered some "tau-cos," but instead I tried the $5 Chicken Nachos Box. According to the advertisement, this box contains two times as much meat as before -- just as tau is two times pi.

(Today I also ate a personal 7-Eleven lemon pie to celebrate the date.)

Ingenuity with Tau Day Pies

Last year, I gave an example of a Tau Day pie distribution from an actual summer school class in one of my districts -- a class that met and took a test on Tau Day that year. (Don't worry about what class this is -- this is given only as an example of pie distribution.)

Score     # of Students
92          1
88          1
84          1
80          2
76          3
72          5

Well, that's actually 13 students -- so only one pie is left. (Most likely, it would have depended on whether it's first or second period in which the 72's are scored.)

Of course, this is a summer class, so it's expected that most of the scores are low. Only one student earns an A on the test. His overall grade is also the highest at 84% -- a middling B.

As for the pies awarded to students whose grades improved the most, I must admit that most scores dropped from last week's to this week's test. I suppose this is expected -- even as a student teacher, I noticed that graphing linear functions (Chapter 4 of Glencoe) is always more difficult that just solving linear equations (Chapter 2).

Actually, the student who earned 92% is tied for the most improved student -- on last week's test, his score was only 76%. (The student he's tied with improved from 60% to 76%, so both have an increase of 16 points.) Depending on which period the students are in (including the 13th student who earned a 72%), the 14th and final pie would go to either the student who improved from 60% to 68%, or the one who maintained a score of 60%. (Due to the difficulty of the second test, even maintaining the grade counts as a major accomplishment.)

Well, that's how the grades in the actual class went. In many ways, it's better to award food based on the number of pies I brought as opposed to saying in advance, "Everyone with an A or B gets a pie!" (which might result in my having too few or too many pies). You might argue that this is sort of like grading on a curve (except that the letter grades don't change based on how much food I bring).

Tau Day Links

Here are this year's Tau Day links:

1. Vi Hart:


Naturally, we begin with the two Vi Hart videos that we just discussed above.

Oh, and by the way, Vi Hart adds a new Tau Day video for this year -- "Suspend Your Disbelief":



2. Numberphile:


His Tau vs. Pi Smackdown is a classic, and so I post this one every year.

3.Michael Blake:


This is a perennial favorite. Blake uses a rest to represent 0. Like Vi Hart, he ends on the digit 1, but this is ten extra digits past Hart's final 11.

4. SciShow



This video explains some more uses for tau. Michael Hartl mentions it in this year's "State of the Tau" address, linked above.

5. The Coding Train:



Here Dan uses geometric probability to approximate the values of pi and tau. Here's a simple program that does the same on Mocha:

http://www.haplessgenius.com/mocha/

10 A=0:B=0
20 B=B+1
30 X=RND(0)
40 Y=RND(0)
50 IF X*X+Y*Y<1 THEN A=A+1
60 PRINT 4*A/B,8*A/B
70 GOTO 20
RUN

Estimates for pi appear in the left column and estimates for tau appear in the right column. This program has an infinite loop, so press Esc when you feel that the approximations are good enough.

6. MusiMasta



Here is a new song based on the digits of tau.

7. Samuel El Pesado:


Oh, this is a video that was first posted seven years ago. But once I created this blog I couldn't find the video again until last year. Here a group of high school students blow up a pi(e) for Tau Day! (Happy early Fourth of July!)

8. Arifmetix


Here's another quick tau song. Apparently, this song assigns other Greek letters to other even multiples of pi.

More Tau Day Music

And now you're probably saying, here we go again! Even after my summer school class is cancelled, first I start whining about summer school again, and now I go right back to music -- a topic that I wouldn't discuss unless I had a class to sing songs in.

But I can't help thinking about music again on Tau Day. Recall that on Phi, e, and Pi Days, I coded Mocha programs for songs based on their digits. Seeing the Vi Hart and Michael Blake songs again makes me want to code a tau song on Mocha.

And besides, last year I wrote about music on Tau Day. It was around this time last year when I first read the Pappas book about musical scales. On Tau Day, I wrote about 12EDO, our usual scale, and its relationship to 5-limit ratios. A few days later, I wrote about the Indian sruti scale and 22EDO, and then I kept writing about more EDO scales until I stumbled upon the Mocha computer emulator and realized that EDL scale, not EDO scales, fit Mocha's sound command.

This is also the first day devoted to a constant since I wrote about those EDL scales. So it's logical to write a tau song in one of these new EDL scales, but which one should we choose?

Recall that Vi Hart uses a major tenth to represent 0. The ratio for a major tenth is 5/2 (found by multiplying the major third 5/4 by the octave 2/1). The ratio 5/2 is equivalent to 15/6, which is good because now the digits 2-9 fit between Degrees 15 and 6:

A Tau Day scale:
Digit     Degree     Ratio     Note
1           15             1/1        tonic
2           14             15/14    septimal diatonic semitone
3           13             15/13    tridecimal ultramajor second (semifourth)
4           12             5/4        major third
5           11             15/11    undecimal augmented fourth
6           10             3/2        perfect fifth
7           9               5/3        major sixth
8           8               15/8      major seventh
9           7               15/7      septimal minor ninth
0           6               5/2        major tenth
-            5               3/1        tritave

This scale doesn't fit in an octave. Instead, we can think of this scale as fitting a tritave (3/1) instead, just like the Bohlen-Pierce scale. On Mocha, we can't actually play the full tritave since Degree 6, not 5, is the last degree playable in Mocha. But Degree 6 is the last degree needed for the tau song.

Indeed, this span occurs in real songs. Most real songs have a span of more than an octave -- we explored some holiday songs six months ago and found out how spans of a ninth or tenth appear to be fairly common. On the other hand, a twelfth, or tritave, is too wide. One famous song with a span of a tritave is our national anthem, "The Star-Spangled Banner." This song is considered one of the most difficult national anthems, and the reason is its tritave span. This tells us that while EDL scales based on an octave might be insufficient (as we'd want to venture a note or two beyond the octave), EDL's based on the tritave are more than enough.

Let's fill in Kite's color names for the EDL scale that we've written above, 15EDL. Notice that while octave EDL's must be even, tritave EDL's must be multiples of three, so they could be odd:

The 15EDL tritave scale:
Digit     Degree     Ratio     Note
1           15             1/1        green F
2           14             15/14    red F#
3           13             15/13    thu G
4           12             5/4        white A
5           11             15/11      lavender B
6           10             3/2        green C
7           9               5/3        white D
8           8               15/8      white E
9           7               15/7      red F#
0           6               5/2        white A
-            5               3/1        green C

The names of some of these intervals are awkward. First of all, 15/14 is often called the "septimal diatonic semitone." But the name "diatonic semitone" ordinarily refers to a minor second, not an augmented unison -- even though the notes are spelled as the latter (gF-rF#). The reason that the name "diatonic" is used is that it's close to the diatonic semitone 16/15 (wE-gF) in cents. The name "septimal diatonic semitone" for 15/14 forces 15/7 (an octave higher) to be a "septimal minor ninth," even though it's spelled as an augmented octave.

Here we call 15/13 a "tridecimal ultramajor second." In terms of cents, it's even wider than the 8/7 supermajor second, hence the term "ultramajor." The alternative name "semifourth" for 15/13 is akin to the name "trienthird" for 14/13. Two "semifourths" (which would be 225/169) sounds very much like a perfect fourth (4/3 = 224/168).

Finally, here we call 15/11 an "undecimal augmented fourth." And indeed, we spell the interval as an augmented fourth (gF-luB). But it's actually narrower than 11/8, which we called a "semiaugmented fourth" (the difference is the comma 121/120). It might be better to call 15/11 a "subaugmented fourth" instead to emphasize that 15/11 is narrower than 11/8.

Here's what a Mocha program for the tau song might look like. (As usual, don't forget to click the Sound box to turn on the sound.)

NEW
10 N=16
20 FOR X=1 TO 52
30 READ A
40 SOUND 261-N*(16-A),4
50 NEXT X
60 DATA 6,2,8,3,1,8,4,3,10,7
70 DATA 1,7,9,5,8,6,4,7,6,9
80 DATA 2,5,2,8,6,7,6,6,5,5
90 DATA 9,10,10,5,7,6,8,3,9,4
100 DATA 3,3,8,7,9,8,7,5,10,2,1,1

This song ends at the same point as Vi Hart's song. If you want to add ten more notes to match Michael Blake's song, change 52 in line 20 to 62 and add digits 53-62:

110 DATA 6,4,1,9,4,9,8,8,9,1

Notice that unlike the songs for pi and other constants, I didn't need to set up an extra loop to code in the scale itself. Instead, the expression 16-A subtracts the digit from 16 to obtain a Degree in the range from 15 to 6 (though we had to represent 0 as 10 to make this formula work for zero).

Except for digits 1 and 0, the 15EDL scale doesn't exactly match the major scale used in the Hart and Blake videos. Notice that 15EDL that contains a just major triad on the root note -- the first even EDL containing the just major triad is 30EDL. But the just major triad for 15EDL is digits 1-4-6, while for Hart and Blake, 1-3-5 is a major triad. Moreover, in 15EDL, digits 7 and 8 are a major sixth and seventh respectively, as opposed to 6 and 7 in the Hart and Blake videos. Again, this reflects the nature of EDL scales, where the higher steps are wider than the lower steps.

This song uses a major tenth for 0, but suppose we wanted to follow Blake and rest on 0 instead. We might add the follow line:

35 IF A=10 THEN FOR Y=1 TO 400:NEXT Y,X

Making our song simulate Hart's is more complex -- that is, if we want to add the three verses of her song and all the other details. The easiest fix is to insert 4 in line 60, since Vi sings the note 4 to represent the decimal point. For Vi, 6-4-2 is a minor triad on ii, but for us, 6-4-2 corresponds to Degrees 10-12-14, which is a type of diminished triad (as I explained the day I posted about 14EDL).

Also, Hart doesn't sing all the notes as quarter notes, but varies the lengths -- so we'd need to add numbers representing lengths to the DATA lines. If at the very least, we want to sing the digits three times, with each verse containing more digits (just like Vi) then add the following lines:

15 FOR V=0 TO 2
20 FOR X=1 TO 9.5*V*V-.5*V+15
55 RESTORE: NEXT V

The strange formula here is an interpolating polynomial that passes through the points (0, 15), (1, 24), and (2, 52), to match the number of digits she sings in each verse.

Here are the roots of all the 15EDL scales available to us in Mocha:

Possible 15EDL root notes in Mocha:
Degree     Note
15            green F
30            green F
45            green Bb
60            green F
75            gugu Db
90            green Bb
105          rugu G
120          green F
135          green Eb
150          gugu Db
165          lugu C
180          green Bb
195          thugu Ab
210          rugu G
225          gugu Gb
240          green F
255          sugu E

Notice that Vi Hart plays her song in either A or G major, while Michael Blake's is in C major. The closest available key to Hart's A is thugu Ab (N=13 as thu notes are sharper than they look -- white A is at Degree 192) while the nearest key to Hart's G is rugu G (N=14). Meanwhile, the closest key to Blake's C is lugu C (N=11).

By the way, when I was looking for Tau Day videos I stumbled upon two more videos detailing the relationship between math and music. One is by 3Blue1Brown, and that video itself mentions another video. I post both of them here:



The Sweet Spot

The full Mocha Sound system starts at Sound 1 = Degree 260. Thus in a way, the Mocha Sound system can be described as a 260EDL scale. But this is a lot of notes, and so the EDL scales that I describe on the blog contain much fewer notes.

What exactly is the "sweet spot" of EDL scales? In other words, we seek out EDL's that contain enough -- but not too many -- notes to compose songs in.

In the past, I declared the sweet spot to be 12-22EDL. We started with 12EDL because the highest playable note in Mocha is Sound 255 = Degree 6, and one octave below this is Degree 12 -- thus 12EDL is the simplest fully playable EDL in Mocha. The next even EDL's also contain octaves, so these are 14EDL, 16EDL, 18EDL, 20EDL, and 22EDL. But then 24EDL contains 12EDL as a subset, since 24 has 12 as a factor. A song written in 24EDL is likely to emphasize the 12EDL subset, which is why I considered 22EDL to be the last EDL in the sweet spot.(Notice that last year, I never actually posted anything in 22EDL, and so 12-20EDL ended up being the sweet spot on the blog.)

Even though 24EDL might reduce to 12EDL, 26EDL doesn't reduce as simply. I was considering sneaking 26EDL into the sweet spot as well, if only because 260EDL -- the entire Mocha system -- has 26 as a factor. In other words, the range 12-26EDL is completely based on the highest and lowest playable notes in Mocha, our EDL instrument. This doesn't necessarily mean that this range makes the most musical sense.

In recent posts, I mentioned that the composer Sevish actually posted a song to YouTube that is written partly in 10EDL. Earlier, I considered 12EDL to be the simplest EDL in the sweet spot, but I can understand the allure of a scale like 10EDL. After all, we do have pentatonic scales and many songs written in them. (Of course, we also have a few songs with four notes, as well as the Google Fischinger player with four-note scales. But 8EDL doesn't really have the correct four notes.) Just as we did for the tritave-based 15EDL above, we'll have to cheat and end our scale on Degree 5, even though this last note isn't really playable in Mocha.

So we may want to include 10EDL in the sweet spot, since there is a real musician (Sevish) writing music in 10EDL. As far as I know, no one has written music in 20EDL, so perhaps this is a reason not to include 20EDL in the sweet spot. Meanwhile, I do see evidence for 18EDL being used as a scale in real music -- the interval 18/17, "the Arabic lute index finger." This name suggests that at one time, Arabic lutes (ouds) were fretted to divide the string in eighteenths for 18EDL.

The idea of 10-18EDL as the sweet spot also reminds me of one justification for bases 10-18 as the sweet spot for number bases (decimal through octodecimal). A few posters at the Dozenal Forum have mentioned the idea of "seven plus or minus two" (that is, the range 5-9) as the ideal length of lists that humans can handle. Thus bases 10-18 contain 5-9 pairs of digits, and the 10-18EDL scales contain 5-9 notes. Indeed, the most commonly played scales contain five (pentatonic) to nine (melodic minor) notes as well.

That settles it -- 10-18EDL is the sweet spot based on real music. Let's write out all of the scales in the sweet spot, using Kite's new color notation (as Kite has changed it since last Tau Day).

The 10EDL Octave:
Degree     Ratio     Cents     Note
10            1/1         0            green C
9              10/9       182        white D
8              5/4         386        white E
7              10/7       617        red F#
6              5/3         884        white A
5              2/1         1200      green C

The 12EDL Octave:
Degree     Ratio     Cents     Note
12            1/1         0            white A
11            12/11     151        lavender B
10            6/5         316        green C
9              4/3         498        white D
8              3/2         702        white E
7              12/7       933        red F#
6              2/1         1200      white A

The 14EDL Octave:
Degree     Ratio     Cents     Note
14            1/1         0            red F#
13            14/13     128        thu G
12            7/6         267        white A
11            14/11     418        lavender B
10            7/5         583        green C
9              14/9       765        white D
8              7/4         969        white E
7              2/1         1200      red F#

The 16EDL Octave:
Degree     Ratio     Cents     Note
16            1/1         0            white E
15            16/15     112        green F
14            8/7         231        red F#
13            16/13     359        thu G
12            4/3         498        white A
11            16/11     649        lavender B
10            8/5         814        green C
9              16/9       996        white D
8              2/1         1200      white E

The 18EDL Octave:
Degree     Ratio     Cents     Note
18            1/1         0            white D
17            18/17     99          su D#
16            9/8         204        white E
15            6/5         316        green F
14            9/7         435        red F#
13            18/13     563        thu G
12            3/2         702        white A
11            18/11     853        lavender B
10            9/5         1018      green C
9              2/1         1200      white D

Actually, let's go ahead and sneak 20EDL and 22EDL into our sweet spot anyway (just as I wanted to sneak 24EDL and 26EDL back when 12-22EDL was our sweet spot). Here 20EDL and 22EDL may be useful only because they are the first EDL's with something resembling a "leading tone" -- the last ascending note that leads into the octave:

The 20EDL Octave:
Degree     Ratio     Cents     Note
20            1/1         0            green C
19            20/19     89          inu C#
18            10/9       182        white D
17            20/17     281        su D#
16            5/4         386        white E
15            4/3         498        green F
14            10/7       617        red F#
13            20/13     746        thu G
12            5/3         884        white A
11            20/11     1035      lavender B
10            2/1         1200      green C

The 22EDL Octave:
Degree     Ratio     Cents     Note
22            1/1         0            lavender B
21            22/21     81          red B
20            11/10     165        green C
19            22/19     254        inu C#
18            11/9       347        white D
17            22/17     446        su D#
16            11/8       551        white E
15            22/15     663        green F
14            11/7       782        red F#
13            22/13     911        thu G
12            11/6       1049      white A
11            2/1         1200      lavender B

Let's add two more tritave scales in this range -- since I already wrote 15EDL earlier in this post, let's add 18EDL and 21EDL:

The 18EDL Tritave:
Degree     Ratio     Cents     Note
18            1/1         0            white D
17            18/17     99          su D#
16            9/8         204        white E
15            6/5         316        green F
14            9/7         435        red F#
13            18/13     563        thu G
12            3/2         702        white A
11            18/11     853        lavender B
10            9/5         1018      green C
9              2/1         1200      white D
8              9/4         1404      white E
7              18/7       1635      red F#
6              3/1         1902      white A

The 21EDL Tritave:
Degree     Ratio     Cents     Note
21            1/1         0            red B
20            21/20     84          green C
19            21/19     173        inu C#
18            7/6         267        white D
17            21/17     366        su D#
16            21/16     471        white E
15            7/5         583        green F
14            3/2         702        red F#
13            21/13     830        thu G
12            7/4         969        white A
11            21/11     1119       lavender B
10            21/10     1284      green C
9              7/3         1467      white D
8              21/8       1671      white E
7              3/1         1902      red F#

END

BACH and CAGE Again

Yes, I'm aware that we're done with Hofstadter's book -- and I wrote that we wouldn't be reading his book past the summer solstice. But there's already music in the post, and Hofstadter mentions computer-generated music in his post. I can't help but wish to code several of the songs in his book into BASIC using Mocha.

I especially liked the author's jukebox that played BACH and CAGE -- that is, the notes B-A-C-H (in German -- same as Bb-A-C-B in American notation) and C-A-G-E. But one thing I found inelegant is the way he cavalierly interchanges the factors 3 and 3 1/3 to suit his needs. Let's recall that song:

Record B-1 (BACH): down 1, up 3, down 1
Record C-3 (CAGE): down 3, up 10, down 3
Record B-10 (BCAH): down 10, up 33, down 10

Suppose we had skipped directly from B-1 to B-10 -- it's suddenly not obvious why we multiply the downward intervals by 10 and the upward interval by 11. The real reason, of course, is that otherwise the notes wouldn't spell out BACH and CAGE. But what sequence of notes would play if we were to type in other letter-number combinations, such as B-4 or F-7? (Does the 4 in B-4 mean 4, or 4 1/4, or something else?) Again, the whole idea was just to spell BACH and CAGE, not create a full jukebox.

It would look much nicer if "3" could really mean three (rather than 3 1/3), and if there were no rounding needed. But we're limited by the number of semitones -- that is, degrees of our standard scale 12EDO -- between the notes of BACH and CAGE. This leads me to wonder -- is there another EDO, besides 12EDO, where this multiplication works out exactly?

Since 12EDO almost works, the correct EDO is likely to be one of 12EDO's neighbors, such as 11EDO or 13EDO, or maybe even 10EDO or 14EDO. We've previously written programs that convert EDO to EDL so that we can play these alternate EDO scales in Mocha.

Let's look at our goal again, except we write the indicated multiplication without rounding:

Record B-1 (BACH): down 1, up 3, down 1
Record C-3 (CAGE): down 3, up 9, down 3
Record B-10 (BCAH): down 10, up 30, down 10

The first thing we notice is that the notes A-C in BACH are the same as C-A in CAGE. Since the CAGE record is C-3 (multiplying by 3), this implies that A-C must be three steps. This is already the case in 12EDO.

But now we look at the C-A in BCAH. These two notes are just shy of three octaves apart -- so clearly if we add the A-C interval to this, we get three full octaves. Since C-A is 30 steps and A-C is three steps, we obtain 33 steps for three octaves. So each octave is 11 steps, indicating 11EDO.

Now we notice that the B-A in BACH is one step, while B-C in BACH is 10 steps. So these two intervals add up to 11 steps, or one octave. But recall that B is the German B (American Bb), so we really have Bb-A (minor 2nd) plus Bb-C (minor 7th) adding up to an octave. This is a problem, since the inversion of the minor 2nd is supposed to be the major 7th, not the minor 7th.

Of course, this is 11EDO, so one note is missing from from 12EDO. Who's to say that, for example, our scale from C-C skips the note B? A minor 7th (C-Bb) plus a minor 2nd would be an octave. The problem, though, is that the name BACH already distinguishes between notes Bb and B (that is, B and H in German). Unless we're prepared to change this to BACB or HACH, this is a no go.

We might notice that the interval A-G (in CAGE) ought to be a minor 7th, just as B-C (in German, Bb-C American) is also a minor 7th. But A-G is listed as nine steps, while Bb-C is ten steps.

There is actually a common solution to both of these problems. Instead of BCAH, we write the final sequence of notes as HCAB. This already looks nicer, since HCAB is a full reversal of BACH, while BCAH only reverses two of the letters:

Record B-1 (BACH): down 1, up 3, down 1
Record C-3 (CAGE): down 3, up 9, down 3
Record H-10 (HCAB): down 10, up 30, down 10

Now all the intervals work. A minor 2nd is one step, and its inversion the major 7th is 10 steps. A major 2nd is two steps and its inversion the minor 7th is nine steps. A minor 3rd is three steps and its inversion the major 6th is eight steps.

We might wonder what these 11EDO intervals actually sound like. Let's check out Xenharmonic:

https://en.xen.wiki/w/11edo

Compared to 12edo, the intervals of 11edo are stretched:
  • The "minor second," at 109.09 cents, functions melodically and harmonically very much like the 100-cent minor second of 12edo.
  • The "major second," at 218.18 cents, works in a similar fashion to the 200-cent major second of 12edo, but as a major ninth, it may sound less harmonious. Its inversion, at 981.82 cents, can function as a "bluesy" seventh relative to 12edo's 1000-cent interval, although it is still about 13 cents away from 7/4.
  • The "minor third," at 327.27 cents, is rather sharp and encroaching upon "neutral third."
  • The "major third," at 436.36 cents, is quite sharp, and closer to the supermajor third of frequency ratio 9/7 than the simpler third of 5/4.
  • The "perfect fourth," at 545.455 cents, does not sound like a perfect fourth at all, and passes more easily as the 11/8 superfourth than the simpler perfect fourth of 4/3.

In other words, the 2nds and 7ths are nearest their 12EDO equivalents, the 4th and 5th are the farthest away from 12EDO, and the 3rd and 6th are somewhere in between. It's not mentioned here, but notice that a just minor 3rd (6/5) is 316 cents, so the minor 3rd is actually slightly more accurate in 11EDO than in 12EDO. On the other hand, as stated above, the major third is much worse in 11EDO than in 12EDO.

It's a good thing that no major thirds appear in the song (unless you count the C and E in CAGE, but those are nonconsecutive.) Indeed, notice that C-E is also three steps, just like A-C or E-G (which is forced since the original interval B-H is one step, just like A-B and H-C). But once again, neither 3\11 nor 4\11 is actually a major third (as a true 5/4 is almost exactly halfway in between).

When we run our EDO-to-EDL conversion program, we find that 162EDL is the best EDL in which to approximate 11EDO. A full octave of 11EDO falls on the following degrees:

162, 152, 143, 134, 126, 118, 111, 104, 98, 92, 86, 81

We see that Degree 162 is white middle C, and so this octave runs from C-C. Since C-E has been reduced to three steps, our 11EDO must omit one of the three notes Db, D, or D#. For this program, I decide to omit the note Db.

NEW
10 DIM A(8),L$(3),N(3)
20 FOR X=1 TO 8
30 READ A(X)
40 NEXT X
50 DATA 8,9,11,12,14,15,6,10
60 FOR X=1 TO 3
70 PRINT "LETTER (A-H) #";X
80 INPUT L$(X)
90 PRINT "NUMBER (1-13) #";X
100 INPUT N(X)
110 NEXT X
120 FOR X=1 TO 3
130 CLS
140 PRINT "PLAYING RECORD #";X
150 R=ASC(L$(X))-64
160 SOUND 261-INT(162/2^(A(R)/11)+.5),4
170 SOUND 261-INT(162/2^((A(R)-N(X))/11)+.5),4
180 SOUND 261-INT(162/2^((A(R)+2*N(X))/11)+.5),4
190 SOUND 261-INT(162/2^((A(R)+N(X))/11)+.5),4
200 NEXT X

Once again, use the up-arrow for ^ and the dollar sign $ for strings. As usual, don't forget to click the Sound box to turn on the sound.

In Hofstadter's story, the jukebox is three plays for a quarter (25 cents), so we must input three letters and three numbers. The INPUT command requires us to hit the Enter key after each one.

It's possible to code other songs from Hofstadter as well. The Crab Canon, where songs can go forward and backward, might be interesting. The easiest to code, of course, is Cage's 4'33":

10 CLS
20 PRINT "MOVEMENT #1"
30 FOR X=1 TO 18480
40 NEXT X
50 CLS
60 PRINT "MOVEMENT #2"
70 FOR X=1 TO 89600
80 NEXT X
90 CLS
100 PRINT "MOVEMENT #3"
110 FOR X=1 TO 44800
120 NEXT X

Trial and error suggests that an empty FOR loop runs about 560 times per second. This is based on the three movements at :33, 2:40, 1:20.

The Arabic Lute

Returning to EDL scales, I've mentioned how fascinated I am by the name "Arabic lute index finger" for the interval 18/17, and its suggestion that the oud must have been fretted to 18EDL.

The following YouTube video is all about refretting a guitar to experiment which tuning makes the song sound better. The piece, written by Cage -- I mean Bach -- is called "Air." (Hofstadter gives "Air on G's String" as the title of one of his dialogues, but I don't know whether it's related to the "Air" piece in the video.)


Of the four tunings, one is just intonation, one is standard 12EDO, and the others are compromises between JI and 12EDO, called "well temperament."

In the comments at YouTube, many people found JI to be the best-sounding near the beginning, where many major chords are played. JI is based on pure ratios, such as the 4:5:6 major triad. But near the end, the piece became more melodic than harmonic. At this point, the best-sounding tuning according to the commenters became 12EDO, whose equal step sizes make melodies sound nice. The two well-temperaments are intermediate in both the harmonic and melodic sections. (The first tuning is closer to JI and thus sounds better harmonically, while the last tuning is closer to 12EDO and thus sounds better melodically.)

Notice that EDL scales are based on ratios and thus are closely related to JI. It's a shame, though, that Mocha can only play one note at a time -- it's melodic rather than harmonic. (Last year on Tau Day, I did mention the Atari computer that could play EDL-based harmony .)

The fretting is quite complex for all of the tunings except 12EDO. Actually, a fretting based on EDL's (which our hypothetical oud has) would look even simpler. Like 12EDO, the frets would at the same position for all the strings. The only difference is that the frets would be equally spaced apart -- exactly 1/18 of the length of the whole string. (That's what 18EDL -- 18 equal divisions of length -- really means after all.)

Imagine if the guitars in the video were fretted to 18EDL. Let's keep the standard EADGBE tuning, except we assume that all of these are white notes (Kite colors). This means that the interval between consecutive strings (E-A, A-D, and so on) is the perfect fourth 4/3. Then all of the notes fretted at the first fret (by the index finger, of course) are colored 17u ("su"), Second fret notes become white, third fret notes are green, and fourth fret notes are red.

Now let's try playing some chords using this tuning. We start with an E major chord -- a basic open chord that beginning guitarists learn to play. This chord is played as:

EBEG#BE
wE-wB-wE-suG#-wB-wE

The JI 4:5:6 would require G# to be yellow rather than su, but yellow (an "over" or "otonal" color) isn't available in EDL (which is based on "under" or "utonal" colors). Fortunately, the su 3rd (about 393 cents) lies about halfway between the yellow 5/4 3rd and the 12EDO major 3rd. Thus this E major chord will probably sound like one of the well temperaments from the video.

EDL's are supposed to be better at playing under/utonal chords, which minor chords are. So let's try playing E minor rather than E major:

EBEGBE
wE-wB-wE-wG-wB-wE

Now all the notes end up white. Chords with all white notes are considered dissonant -- this chord is known as the Pythagorean minor chord.

Let's try some A chords now. We begin with A major:

xAEAC#E
wA-wE-wA-wC#-wE

This is another dissonant all-white chord -- the Pythagorean major chord. We move on to A minor:

xAEACE
wA-wE-wA-suB#-wE

The first fret on the B string isn't even C -- officially it's su B#. This note is 13 cents flatter than green C -- the note that belongs in an A minor chord. It probably won't sound terrible in a chord only because at 303 cents, the interval wA-suB# is only three cents wider than the 12EDO minor 3rd and sound indistinguishable from it.

So far, we have the passable (or "well tempered") E major and A minor chords, and dissonant Pythagorean E minor and A major chords. Moving on to D major, an obvious problem arises:

xxDADF#
wD-wA-gD-wF#

Now the two D notes aren't even the same color, so now we have dissonant octaves. Changing this from D major to D minor doesn't eliminate the dissonant octave on D.

So why are we having so much trouble with these basic chords? If we return to A minor, we notice that the third fret on the open A string indeed plays the green C needed for A minor. But the A string can't be used for green C, because it's too busy sounding the white A! In other words, most of the time, two or three notes we need to make chords sound on the same string.

The following link describes how actual Arabic lutes may have been tuned:

https://larkinthemorning.com/blogs/articles/the-oud-the-arabic-lute

Notice that even on that blog, there's still no mention of the "Arabic lute index finger," the interval 18/17, or 18EDL fretting. But we do see that instead of EADGBE, traditional tunings for ouds include DGADGC, ADEADG, and EABEAD.

But unfortunately, even with EABEAD, some JI chords remain difficult to finger and play. One of these days I'd like to solve the mystery of the Arabic lute, its index finger, and 18EDL.

Conclusion

Last year I sneaked the traditionalists' debate into the Tau Day post. I won't do so this year -- luckily for you, the traditionalists have been inactive lately (except for Ze'ev Wurman making a recent comment at the Joanne Jacobs website -- the topic was a slavery assignment in a middle or upper elementary history class).

If I timed this correct, this post should appear on exactly 6/28 at 3:18 -- as in tau = 6.28318. In other words, Happy Tau Day everybody!

1 comment:

  1. Most of the time I don’t make comments on websites. but I'd like to say that this article really forced me to do so. Really nice post!
    arabic oud instrument

    ReplyDelete