The Daily Parker

Politics, Weather, Photography, and the Dog

V is for Voice Leading

Blogging A to ZWe're finally putting together a lot of what I've covered in this year's Blogging A-to-Z challenge. Today I'll touch on voice leading (known as "part writing" in the UK), which describes how individual voices in a composition work separately to create a musical whole.

We already talked about counterpoint, in which we saw how two vocal lines interact while moving independently of each other. That's the essence of voice leading. But when you add more voices, the rules become a bit more complex.

Open Music Theory has a good explanation of the problems that voice leading aims to solve:

The “fundamental musical problems” we will address in the study of counterpoint center around the way in which some basic principles of auditory perception and cognition (how the brain perceives and conceptualizes sound) play out in Western musical structure. For example, our brains tend to assume that sounds similar in pitch or timbre come from the same source. Our brains also listen for patterns, and when a new sound continues or completes a previously heard pattern, it assumes that the new sound belongs together with those others. ... These abilities are also what allows music to have the emotional effect that it does on so many people. Whether or not a composer or songwriter is aware of the science and psychology of hearing, a masterful composer mediates and plays with these basic concepts.

In short, voice leading "leads the ear" in service of the music as a whole.

The general rules are:

  1. Favor small intervals
  2. Avoid crossing lines
  3. Avoid parallel fifths and octaves

Here's a simple example that demonstrates how each voice can have its own life and still form a cohesive whole:

So what's going on in there? All four lines have their own melodies (particularly the soprano and tenor lines), I've avoided parallel 5ths and octaves in a couple of tricky spots while still maintaining a decent chord progression, and none of the lines cross—though they do, occasionally, trade notes. Notice the tenor D on the second beat of the 3rd measure followed by the alto D in the next beat.

(There's also a joke buried in there. Play each of the vocal lines separately and you'll find it. The joke explains why there's a bit of clunkiness between the second and third measures.)

But that's just me demonstrating a concept. Here's what a genius does, in the first of his nearly 400 surviving chorales:

(Bonus pdf file.)

U is for Unison

Blogging A to ZThe Blogging A-to-Z challenge entry today starts with a joke: what is the definition of a minor second? Two oboes playing in unison.

Sorry, oboes.

We already know what unison means: it's two voices sounding the same note. And earlier I mentioned that different instruments use different clefs. And we've covered key signatures. Now I'm going to tell you a dirt secret of the orchestra: unison sometimes looks like a bunch of completely different notes.

The problem comes from the way that certain brass and woodwind instruments work. Different instruments naturally play in different tunings. For example, if you play a natural scale on a French horn, you're actually playing (usually) an F or Bb scale. So we say that the horn is "in F" or "in B flat." Which leads to the part that string players and singers struggle to understand: music for the French horn is written as if C is F. Or Bb. In other words, horns fall into the class of transposing instruments, because they naturally transpose the notes written on the page.

To illustrate, here is how we write an F major scale played in unison—exactly the same notes—between a viola and a French horn in F:

The viola starts on F, but the horn starts on C. Except that the horn's written C is actually sounds like F.

It gets even crazier when you combine a bunch of instruments that transpose in different keys. Here's the opening of Brahms's Symphony #4 in e minor:

The flute, bassoon, and strings are in C, so when they play the note written as C they actually play a C. The clarinets are in A, so when they play what's written as C out comes an A. The key signature has to change, too; theirs is in C minor, because when they see a C the sound they make is actually E. Opposite issue for the French horns, which Brahms wanted in E: when they play the note written as C (as they do for four bars), they're actually playing G, which is also why their staff is in A minor.

It's all finally coming together, isn't it?

Coors Field, Denver

Sunday night I visited my 30th park. I have to say, Coors Field is better than Coors Beer.

The Phillies won, because apparently I am a curse on all the ballparks I visit. But that's OK. Being in Denver on 4/20, and having walked past the 4/20 Festival earlier in the day, I really didn't mind all that much.

It's hard to tell, but while I had a really great seat, the foul screen meant my photos weren't perfect:

The weather nearly was, though. And it was a fun game.

Just two parks left: Toronto on June 28th, and St. Louis on September 27th.

T is for Tritone

Blogging A to ZToday's Blogging A-to-Z challenge post sits right in the middle of everything.

The tritone is the interval between the perfect 4th and the perfect 5th. Depending on which direction you're going, it's either an augmented 4th or a diminished 5th. And it's always going somewhere.

In the C major scale, the natural tritone is between F and B (where it's an augmented 4th) or B and F (where it's a diminished 5th). B, remember, is the leading tone in the key of C, so it really, really wants to resolve to C. The F (subdominant) wants to resolve to E (the mediant). Therefore, if you have an augmented 4th, it wants to resolve to a minor 6th (which is also the tonic chord in first inverstion):

And if it's a diminished 5th, it resolves to the major 3rd:

Remember ethnic 6th chords? Tritones all the way down. Even in a basic I-V7-I progression, the V7 has the tonic chord's tritone in it:

The tritone is between the first and second lines from the top. Just as in the very first example on this post.

Quick links

The day after a 3-day, 3-flight weekend doesn't usually make it into the top-10 productive days of my life. Like today for instance.

So here are some things I'm too lazy to write more about today:

Now, to write tomorrow's A-to-Z entry...

S is for Syncopation

Blogging A to ZThe Blogging A-to-Z challenge will get a little funky today as we look at syncopation, which is nothing more than an unexpected rhythm.

Here's a simple example. Take this clunky melody:

Now let's syncopate it a little, by shifting some of the notes off the beat:

Instead of hitting 1, 2, 3, 4, 1, 2, 3, 4, now it hits 1, and, and, and, 2, and, and, 4. It's harder to dance to but more interesting.

More examples? How about Mozart's Symphony #40, third movement:

Or the Rolling Stones? Beethoven? Scott Joplin?

Syncopation is every——where!

R is for Rondo

Blogging A to ZToday's Blogging A-to-Z challenge post will take a look at common musical forms.

We've already seen some examples of common musical forms, even though I didn't call them out: the canon and the fugue. Both are imitative forms, though as you've seen the fugue is far more complex than the canon. "Row Row Row Your Boat" is a canon (but, of course, someone made a fugue out of it).

When we talk about other forms, we usually note large sections of music with letters. So a form of, say, A-B-A means that you have a theme first, then another theme, and then the first theme comes back.

The basic musical forms all show up in symphonies written between about 1760 and 1830, in the Classical and Early Romantic periods. Haydn codified the symphonic template, Mozart perfected it, and Beethoven took it up a notch.

The first movement of a Classical symphony usually uses sonata allegro form. It starts with an optional introduction, progresses to exposition, through development, then a recapitulation, and concludes with an optional coda. In short, A-B-A1, because the recapitulation usually doesn't strictly repeat the exposition.

The first movement of Mozart's Symphony #25 demonstrates this beautifully. The exposition starts immediately, stating the bold g-minor theme in several forms for the first 90 seconds or so. Development ensues, taking us around several related keys and themes (including the primary theme). The recap begins at 5:05, once he's brought it back to g minor. Note, also, that Mozart wrote this at 17.

Second and fourth movements often use rondo form, which is A-B-A, A-B-A-C-A, or A-B-A-C-A-B-A. The A just keeps coming around, you see. Here's Haydn's 49th symphony, second movement. It deviates from a typical classical symphony in that the second movement is fast, not slow as was common in the period. But it's a complete A-B-A1-C-A2 rondo, as well as an excellent example of the Sturm und Drang ("storm and stress") period in the late 1770s-early 1780s.

Third movements generally follow the minuet and trio form, which uses 3/4 time and a simple A-B-A or A-B-C-A form. Example: Brahms' Symphony #3, third movement. Even though Brahms wrote this decades after Mozart and Haydn had died, it still maintains the minuet and trio form—though with lusher orchestration and harmonies than either classical composer would have used.

Listen for these forms the next time you hear a symphony. They're in there.

Q is for Quaver

Blogging A to ZToday's Blogging A-to-Z challenge post explains how musicians keep time.

Through all the examples I've posted this month, you may have noticed that a note's stem has a relationship to how long the note sounds. They do. Starting with a whole note (open, with no stem), each change to the stem reduces the length of the note by half. This also works when you start with a whole rest, except a rest means "don't do anything here." Example:

(In the UK, those notes are called whole, half, quarter, quaver, semiquaver, hemisemiquaver, and hemisemidemiquaver. Don't ask me why.)

You can also add a dot after a note, which increases the length by 50%. The dotted quarter notes in this example are the same as three 8th notes:

On the same subject, let me draw your attention to the numbers (and sometimes letters) that follow the key signature in a staff. That guy, called the time signature, tells performers how to count.

The most common time signature is 4/4. That means there are 4 beats in each measure (the top number) and the quarter note gets one beat. It's so common that it can also be represented by the letter C, as in the top example above. Sometimes you'll see a C with a line through it. This is called cut time, or 2/2, in which there are two half-note beats per measure.

The second example above shows 6/8 time, in which there are six eighth notes to each measure. Typically musicians count 6/8 as two beats per measure, with the dotted quarter getting the beat, so it feels like a march.

The time signature 3/4 has the same number of eighth notes per measure, but since the quarter note gets the count, there are three quarter-note beats per measure. This is the time signature for waltzes.

Almost any combination of beats and notes can form a time signature. I've seen 7/4, 3/16, 1/1, 9/32...literally anything as long as the bottom number is divisible by 2 (or is 1). That said, the most common time signatures by far are 4/4, 6/8, 3/4, and 2/2.

And here, for your listening enjoyment, is a piece that flouts all the rules and somehow works—as humor:

I hate Scala

"It is no one's right to despise another. It is a hard-won privilege over long experience."—Isaac Asimov, "C-Chute"

For the past three months, I've worked with a programming language called Scala. When I started with it, I thought it would present a challenge to learn, but ultimately it would be worth it. Scala is derived from Java, which in turn is a C-based language. C#, my primary language of the last 18 years, is also a C-based language. 

So I analogized thus: C# : Java :: Spanish : Italian; therefore C# : Scala :: Spanish : Neapolitan Italian. So as with my decent Spanish skills making it relatively easy to navigate Italy, and my decent C# skills making it relatively easy to navigate Java, I expected Scala to be just a dialect I could pick up.

Wow, was I wrong. After three months, I have a better analogy: C# : Scala :: English : Cockney Rhyming Slang. Or perhaps Jive. Or maybe even, C# : Scala :: German : Yiddish. That's right: I submit that Scala is a creole, probably of Java and Haskell.

Let me explain.

Most C-based languages use similar words to express similar concepts. In Java, C#, and other C-based languages, an instance of a class is an object. Classes can have instance and static members. If you have a list of cases to switch between, you switch...case over them. And on and on.

Scala has a thing called a class, a thing called an object, a thing called a case class, and a thing called a match. I'll leave discovering their meanings as an exercise for the reader. Hint: only one of the four works the same way as in the other related languages. In other words, Scala bases itself on one language, but changes so many things that the language is incomprehensible to most people without a lot of study.

Further, though Scala comes from object-oriented Java, and while it can work in an object-oriented fashion with a lot of coercion, 

As in Yiddish or Gullah, while you can see the relationship from the creole back to the dominant language, no deductive process will get you from the dominant to the creole. "Answer the dog," a perfectly valid way to say "pick up the phone" in Cockney (dog <- dog bone <- rhymes with phone), makes no sense to anyone outside the East End. Nor does the phrase "ich hab' in bodereim," which translates directly from Yiddish as "I have (it) in the bathtub," but really means "fuck it." The fact that Yiddish uses the Hebrew alphabet to express a Germanic creole only adds to its incomprehensibility to outsiders.

These are features, not bugs, of Jive, Gullah, Yiddish, and other creoles and slangs. They take words from the dominant language, mix them with a bunch of other languages, and survive in part as a way to distinguish the in-group from the out-group, where the out-group are the larger culture's dominant class.

I submit that Scala fits this profile.

Scala comes from academic computing, and its creator, German computer scientist Martin Odersky, maintains tight control over the language definition. Fast adoption was never his goal; nor, I think, was producing commercial software. He wanted to solve certain programming problems that current computer science thinking worries about. That it elevates a densely mathematical model of software design into commercial development is incidental, but it does increase the barriers to entry into the profession, so...maybe that's also a feature rather than a bug?

Scala isn't a bad language. It has some benefits over other languages. First, Scala encourages you to create immutable objects, meaning once an object has a value, that value can never change. This prevents threading issues, where one part of the program creates an object and another part changes the object such that the first part gets totally confused. Other languages, like C#, require developers to put guardrails around parts of the code to prevent that from happening. If all of your objects are immutable, however, you don't need those guardrails.

A consequence of this, however, is that some really simple operations in C# become excruciating in Scala. Want to create a list of things that change state when they encounter other things? Oh, no, no, no! Changing state is bad! Your two-line snippet that flips a bit on some objects in a list should instead be 12 lines of code (16 if it's readable) that create two copies of every object in your list through a function that operates on the list. I mean, sure, that's one way to do it, I suppose...but it seems more like an interview question with an arbitrary design constraint than a way to solve a real problem.

Second, this same characteristic makes the language very, very scaleable, right out of the box. That is actually the point: "Scala" is a portmanteau of "Scaleable" and "Language," after all. That said, C# is scaleable enough to run XBox, NBC.com, Office Online, and dozens of other sites with millions of concurrent users, so Scala doesn't exactly have a monopoly on this.

Not to mention, Scala gives frustrated Haskell programmers a way to show off their functional-programming and code-golf skills in a commercial environment. Note that this makes life a lot harder for people who didn't come from an academic background, as the code these people write in Scala is just as incomprehensible to newbies as Haskell is to everyone else.

All of this is fine, but I have developed commercial software for 25 years, and rarely have I encountered a mainstream language as ill-suited to the task of producing a working product in a reasonable time frame than this one. Because the problem that I want to solve, as a grizzled veteran of this industry, is how I can do my job effectively. Scala is making that much more difficult than any language I have ever dealt with. (There are a number of other factors in my current role making it difficult to do my job, but that is not the point of this post.)

Maybe I'm just old. Maybe I have thought about software in terms of objects with behavior and data for so long that thinking about it in terms of functions that operate over data just doesn't penetrate. Maybe I've been doing this job long enough to see functional programming as the pendulum swinging back to the 1980s and early 1990s, when the implementationists ruled the day, and not wanting to go back to those dark ages. (That's another post, soon.)

This cri de coeur aside, I'll continue learning Scala, and continue doing my job. I just really, really wish it had fewer barriers to success.

Sears sues Eddie Lampert

While waiting for the Mueller Report to download (spare a moment to pity the Justice Department's servers), an alert came in from Crain's:

The bankrupt estate of Sears Holdings Corp. sued Eddie Lampert and his hedge fund ESL Investments Inc., claiming they wrongly transferred $2 billion of company assets beyond the reach of creditors in the years leading up to the retailer’s bankruptcy.

“Had defendants not taken these improper and illegal actions, Sears would have had billions of dollars more to pay its third-party creditors today and would not have endured the amount of disruption, expense, and job losses resulting from its recent bankruptcy,” lawyers for the estate said in a court filing.

The complaint, filed as part of the retailer’s ongoing bankruptcy case, asks that the transactions be ruled fraudulent transfers and says creditors should be compensated.

Lawyers for the estate also allege that ESL stripped Sears of the real estate under 266 of the retailer’s most profitable stores, undervaluing the land by at least $649 million. “Moreover, the culpable insiders arranged for Sears to lease the properties back under blatantly unfair terms,” according to the complaint.

No kidding.

It's interesting to me how people who claim that the government has no right to interfere in private affairs seem to make that claim to avoid scrutiny of shady behavior. And Lampert seems to be one of the shadiest.