Monday, June 28, 2021

Tau Day Post (Lemay Lesson 15 Part 2: Modifiers, Access Control, and Class Design)

Table of Contents

1. Introduction: That Time of the Year Again
2. Tau Day and Summer School
3. Ingenuity with Tau Day Pies
4. A Rapoport Math Problem
5. Lemay Lesson 15 Part 2: Modifiers, Access Control, and Class Design
6. Tau Day Links
7. More Tau Day Music
8. The Sweet Spot
9. The Arabic Lute
10. Conclusion

Introduction: That Time of the Year Again

Hmm, today's date is June 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 fifteen or twenty 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 ten 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 2021 "State of the Tau" address:

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

According to this link, Hartl and his friends translated his Tau Manifesto this year into French and Portuguese. He also mentions some computer languages where a tau constant has been built in (but unfortunately, none of those languages are Java).

Oh, I notice that Hartl also has a "parable" where he compares using pi (instead of tau) to counting your age in "thines" (half-years, instead of years). Even though "thines" are weird, notice that "thine" is an Anglish word (in Old English it means "yours" -- Hartl chose it because "year" sounds like "ye are") that can be used to replace "semester" (the half-year of the school year).

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.)

This is my annual Tau Day post. So what exactly does this mean for our summer projects?

  • I'm skipping Stewart today. That's why I posted Chapter 15 yesterday -- I wanted to take a day off from Stewart for today's Tau Day post.
  • I will definitely do Java today. We will finish Lemay Chapter 15 today.

So that's why did I posted yesterday, even though it's rare to post twice in a row in the summer. So that was my Tau Day Eve post yesterday. This is my Tau Day post.


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.

Last year, I wrote about what a Tau Day party would look like at summer school. Of course, this year is awkward due to the coronavirus. Most schools that are bothering to have summer school this year are holding it online -- and the few that are holding face-to-face instruction will likely discourage handing out party food that involves a lot of touching. (Indeed, I wonder whether teachers will be allowed to have food parties even by next Pi Day.)

I was considering just cutting this part out of today's post. But I decided to keep this part anyway, just to remember the good times when we had classroom parties.

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 special days, I could sing a song that's more fun instead.

On Tau Day, I would have played Vi Hart's Tau Day tune, "Song About a Circle Constant." These songs are fun to sing on special days -- 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 Eve, I purchased three full-sized pies (and two pizzas) 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. Either individual pies or individually wrapped cupcakes might be suitable for a class party in the coronavirus era.

By the way, since I didn't actually teach any summer school, 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 Nachos Bell Grande Party Platter (which is different from last summer's special). According to the advertisement, this platter contains two boxes of nachos -- 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

Three years ago, 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).

A Rapoport Math Problem

The Geometry drought continues. Actually, it's not really a drought at all -- of the last ten days in June, a whopping eight of them have questions related to Geometry. It's just that the only two days without a Geometry in late June are -- you guessed it! -- the two days on which I'm blogging.

Let me do one of those eight Geometry problems today. Since it's Tau Day, I choose a problem related to circles -- and of course, we'll use tau to solve it.

Within the past week on her Daily Epsilon on Math 2021, Rebecca Rapoport wrote:

What is the ratio of the area to the circumference?

(Here is the given info from the diagram: it's a circle with radius 50.)

Let's use tau to solve this problem. The circumference of the circle is 50tau. As for the area, the formula is (1/2)tau r^2 = (1/2)tau(50)(50). So the ratio is:

A/C = (1/2)tau(50)(50) / (50tau) = (1/2)50 = 25

So the desired ratio is 25 -- and of course, this problem comes from last Friday, the 25th.

If we were to use pi to solve this problem instead of tau, we obtain 50(2pi) for the circumference and pi(50)(50) for the area. So the ratio is:

A/C = pi(50)(50) / (50(2pi)) = 50/2 = 25

Of course, we obtain the same answer either way.

Lemay Lesson 15 Part 2: Modifiers, Access Control, and Class Design

Here is the link to today's lesson:

http://101.lv/learn/Java/ch15.htm

Lesson 15 of Laura Lemay's Teach Yourself Java in 21 Days! is called "Modifiers, Access Control, and Class Design." Here's where we left off:

Why Nonprivate Instance Variables Are a Bad Idea

In most cases, having someone else accessing or changing instance variables inside your object isn't a good idea. Take, for example, a class called circle, whose partial definition looks like this:

class Circle {
   int x, y, radius;

   Circle(int x, int y, int radius) { 
      ...
   }

   void draw() { 
      ... 
   }
}

Hey -- today we celebrate circle measurement, and Lemay is giving us a Circle class. Of course, that's another reason why I really wanted to finish this Lemay chapter today. Anyway, she wants us that if radius is public, other classes can change it without you knowing, leading to errors. So instead, we create accessor methods:

Creating accessor methods for your instance variables simply involves creating two extra methods for each variable. There's nothing special about accessor methods; they're just like any other method. So, for example, here's a modified Circle class that has three private instance variables: xy, and radius. The public getRadius() method is used to retrieve the value of the radius variable, and the setRadius() method is used to set it (and update other parts of the class that need to be updated at the same time):

class Circle {
   private int x, y radius;
   
   public int getRadius() {
     return radius;
   }
   public int setRadius(int value) {
       radius = value;
       draw();
       doOtherStuff();
       return radius;
   }

    ....
}

Once again, this is familiar to me as a C++ coder:

The idea behind declaring instance variables private and creating accessor methods is so that external users of your class will be forced to use the methods you choose to modify your class's data. But the benefit of accessor methods isn't just for use by objects external to yours; they're also there for you. Just because you have access to the actual instance variable inside your own class doesn't mean you can avoid using accessor methods.

We know move on to class methods:

You learned about class variables and methods early last week, so I won't repeat a long description of them here. Because they use modifiers, however, they deserve a cursory mention.

To create a class variable or method, simply include the word static in front of the method name. The static modifier typically comes after any protection modifiers, like this:

public class  Circle {
    public static float  pi = 3.14159265F;

    public float  area(float r) {
        return  pi * r * r;
    }
}

Hold on a minute -- today is Tau Day, not Pi Day. Get that pi out of there and change it to tau:

public class  Circle {
    public static float  tau = 6.28318531F;

    public float  area(float r) {
        return  0.5 * tau * r * r;
    }
}

Both class variables and methods can be accessed using standard dot notation with either the class name or an object on the left side of the dot. However, the convention is to always use the name of the class, to clarify that a class variable is being used, and to help the reader to know instantly that the variable is global to all instances. Here are a few examples:

float circumference = 2 * Circle.pi * getRadius();

Ah hmm -- let's also change that to tau:

float circumference = Circle.tau * getRadius();

Lemay warns us about static here:

The word static comes from C and C++. While static has a specific meaning for where a method or variable is stored in a program's runtime memory in those languages, static simply means that it's stored in the class in Java. Whenever you see the word static, remember to mentally substitute the word class.

Anyway, we finally get to our first listing:

Listing 15.1. The CountInstances class, which uses class and instance variables.
 1: public class  CountInstances {
 2:    private static int   numInstances = 0;
 3: 
 4:     protected static int getNumInstances() {
 5:         return numInstances;
 6:    }
 7: 
 8:     private static void  addInstance() { 
 9:         numInstances++;
10:     }
11: 
12:    CountInstances() {
13:         CountInstances.addInstance();
14:    }
15: 
16:     public static void  main(String args[]) {
17:         System.out.println("Starting with " + 
18:           CountInstances.getNumInstances() + " instances");
19:         for (int  i = 0;  i < 10;  ++i)
20:             new CountInstances();
21:       System.out.println("Created " + 
22:           CountInstances.getNumInstances() + " instances");
23:    }
24:}

This program works and tells us that we started with 0 instances and created 10 instances. Something similar works in C++ as well.

We now move on to the keyword final:

Although it's not the final modifier I'll discuss today, the final modifier is used to finalize classes, methods, and variables. Finalizing a thing effectively "freezes" the implementation or value of that thing.

Earlier in her book, Lemay tells us that final is similar to const in C++, but not quite:

To finalize a class, add the final modifier to its definition. final typically goes after any protection modifiers such as private or public:

public final class  AFinalClass {
    . . .
}

Indeed, I've never heard of declaring an entire class const in C++, so that's one difference between this and final in Java:

A finalized variable means its value cannot be changed. This is effectively a constant, which you learned about early in Week 1. To declare constants in Java, use final variables with initial values:

public class  AnotherFinalClass {
    public static final int aConstantInt    = 123;
    public final String aConstantString = "Hello world!";
}

This is more like C++. In fact, that tau from earlier really should be declared final:

public class  Circle {
    public static final float  tau = 6.28318531F;

    public float  area(float r) {
        return  0.5 * tau * r * r;
    }
}

The last topic in this lesson is abstract classes:

Whenever you arrange classes into an inheritance hierarchy, the presumption is that "higher" classes are more abstract and general, whereas "lower" subclasses are more concrete and specific. Often, as you design hierarchies of classes, you factor out common design and implementation into a shared superclass. That superclass won't have any instances; its sole reason for existing is to act as a common, shared repository for information that its subclasses use. These kinds of classes are called abstract classes, and you declare them using the abstract modifier. For example, the following skeleton class definition for the Fruit class declared that class to be both public and abstract:

public abstract class Fruit {
...
}

We do something similar in C++, although the keyword here is virtual rather than abstract. For example, our Circle object might be a subclass of Shape, which also has Square as a subclass. At that point we can declare Shape to be abstract -- there are no shapes, just circles and squares (that is, we could say Circle c = new Circle(); but not Shape a = new Shape();.

We reach our first listing here:

Listing 15.2. Two classes: one abstract, one concrete.
 1:public abstract class  MyFirstAbstractClass {
 2:    int  anInstanceVariable;
 3:p
 4:      public abstract int  subclassesImplementMe(); // note no definition
 5:
 6:      public void  doSomething() {
 7:          . . .    // a normal method
 8:      }
 9:}
10:
11:public class  AConcreteSubClass extends MyFirstAbstractClass {
12:    public int  subclassesImplementMe() {
13:        . . .    // we *must* implement this method here
14:    }
15:}

But we can't actually run this code, since it's incomplete.

So that will be our project for today, since I like to end each Lemay chapter with my own code. Let us implement Shape, Circle, and Square as I described earlier:

public abstract class Shape {
public abstract float perimeter();

public static void main(String args[]) {
Circle myCircle = new Circle();
myCircle.setRadius(7);
Square mySquare = new Square();
mySquare.setLength(7);
System.out.println("The perimeter of myCircle is " + myCircle.perimeter());
System.out.println("The perimeter of mySquare is " + mySquare.perimeter());
}
}
public class Circle extends Shape {
private int radius;
public static final float tau = 6.28318531F;

public int getRadius() {
return radius;
}

public int setRadius(int r) {
radius = r;
return radius;
}

public float perimeter () {
return tau * radius;
}
}
public class Square extends Shape {
private int length;
public static final float sides = 4.0F;

public int getLength() {
return length;
}

public int setLength(int s) {
length = s;
return length;
}

public float perimeter () {
return sides * length;
}
}
Output:
The perimeter of myCircle is 43.9823
The perimeter of mySquare is 28.0

Last year, we created our own version of the Approximating Tau applet, using the Graphics that Lemay has taught us so far. I repost it again this year.

The program in the video takes uses the Monte Carlo method to approximate the circle constant, either pi or tau. It chooses a point at random and displays it on the graph if it lies within a circle, which has radius 200. We can't draw a single point -- instead, we must drawLine with the same point as its endpoints.

Here is the program I wrote:

import java.awt.Graphics;

public class ApproximatingTau extends java.applet.Applet {
int r = 200;

int total = 0;
int circle = 0;

double recordTau = 0;

public void paint(Graphics g) {
for (int i = 0; i < 10000; i++) {
int x = (int)Math.floor(Math.random() * r);
int y = (int)Math.floor(Math.random() * r);
total++;

int d = x * x + y * y;
if (d < r * r) {
circle++;
g.drawLine(x,y,x,y);
}

double tau = (double)8 * (double)circle / (double)total;
System.out.println(tau);
double recordDiff = Math.abs(2*Math.PI - recordTau);
double diff = Math.abs(2*Math.PI - tau);
if (diff < recordDiff) {
recordDiff = diff;
recordTau = tau;
System.out.println(recordTau);
}
}
}


}

Since our coordinates must be positive, only a quarter of the circle is graphed. And just like the Lemay listings earlier, each time I change the size of the applet window, new random points are graphed, so I can continue to get more estimates. Each time, tau works out to be approximately 6.3.

Tau Day Links

Here are this year's Tau Day links:

1. Vi Hart:



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

By the way, since one of my summer projects is to post song lyrics, I ought to post the lyrics for Vi Hart's Tau Day song:

A SONG ABOUT A CIRCLE CONSTANT by Vi Hart

First Verse:
When you want to make a circle, how is it done?
Well, you probably will start with the radius 1.
Then use a compass or a string, and a paper or the ground.
And if the radius is 1, how far did you go around?
It's tau, 6.28.
Yeah, it's tau, 6.28318530717958.

Second Verse:
If you pick a certain distance, and you pick a certain spot,
And you put the two together, then what have you got?
It makes a very special shape, and now you are the inventor,
If you take all the points a certain distance from your center.
And you've got a great collection, and it is a great invention.
And it makes a lovely circle, well depending on dimension.
Because it's 1, 2, 3, then there's 4 and even more.
But for a circle, how much circle's there if you take the distance and compare?
It's tau, 6.28.

Yeah, it's tau, 6.28318530717958647692528.

Third Verse:
I know what you are thinking, what about that other guy?
The one that's sometimes pronounced "pee," and it's sometimes pronounced "pie"?
I mean, it's fine if you are building, but does not belong in math.
All the equations make more sense when you use "taw" or you use "taff."
Well, you get the same answers no matter which way.
We get further from truth when we obscure what we say.
You know that math makes sense when it's beautiful and pure.
So please don't make it ugly with your bad notation and awful curriculum.
Use tau, 6.28.

Yeah, use tau, 6.283185307179586476925286766559005768394338798750211.

By the way, in the original video, Vi Hart sings the words "awful curriculum" and writes the phrases "Alternate Interior Angle Equality Theorem!" and "Reflexive Property of Congruence" as examples of an awful curriculum. This sounds like something that can be fixed in a Shapelore class. (Wow, I keep bringing up Java and Shapelore in today's Tau Day post!)

In Shapelore, we can change AIA to "Otherside Inside Angle Worthlink Provedsaying," and the reflexive property to "Self Law of Sizeshapesameness." If Vi Hart's complaint is that the old names are too long (that is, with too many words), then unfortunately the new names are just as long. My idea is just to replace old words with new words that students understand, such as otherside for "alternate" and self for "reflexive."

2. TAU: Pi Day Protest


In past years, I've posted another version of this video where these same students are blowing up a pie for Tau Day. But that video is no longer on YouTube, so I'm posting the old version instead. (And yes, I know that in this past month there have been more important things to protest than pi vs. tau.)

3. Bri the Math Guy:


This is a new video for this year. It also discusses the tau vs. pi debate.

4. Numberphile:


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

5.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.

6. Mathstreet Boys



This is "Larger Than Pi," a parody of the Backstreet Boys' "Larger Than Life." Michael Hartl mentions it in this year's "State of the Tau" address, linked above.


7. 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

I don't know enough Java to be able to write this. In the video, the presenter appears to be creating a Java applet that approximates tau. Yet when tried entering the code I see into my compiler, I kept getting the following errors:

  • The two methods under setup -- size and background -- mean nothing to my compiler.
  • Laura Lemay tells us to have a paint method that takes a Graphics object, but instead we see a draw method that takes no such object.
  • The random method doesn't work the way it appears on the video. The presenter seems to be using random like randint in TI-BASIC, but my Math.random() is more like the function rand in TI-BASIC. It returns a random double between 0 and 1.
  • I have no point method. There is a drawLine method, but it takes ints -- that is, neither the doubles my random() returns nor the floats that x and y are specified to be.
Perhaps after I learn some more Java, I can go back and create a tau applet that actually works.



As I wrote two days ago, the probability of a randomly-chosen point lying in the circle is pi/4 = tau/8.

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.

8. Matsakis Minute



Here is a new video based on the merits of tau.

More Tau Day Music

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. So it's logical to write a tau song in one of these new EDL scales, but which one should we choose?

[2021 update: I'm keeping some of this music discussion from last year.]

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.

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#

[2021 update: Last year on Tau Day, I mentioned that I was considering writing one of my songs from the old charter school, "Roots," in 24EDL. Instead, I wrote it in 16EDL. Meanwhile, "Diagrams" was written in 20EDL.]

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 sounds 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 had a traditionalists' debate on Tau Day, but this year I omit it.

Last year, I predicted that I'd be vaccinated by Tau Day. As it turned out, I received the vaccine a little before Tau Day.

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