Pitch Memory Survey


I posted a short survey of how people remember pitches without a reference note. This came about when a Redditor asked what key people sing “Happy Birthday” in (the correct answer being the key that the first/loudest singer chooses).

I, like most people, don’t have perfect pitch, and if someone sits at a piano and plays a popular song, I can’t tell what key they’re playing unless I see their hands. My “movable do” adapts immediately. Problem one for this survey is that, for me (and I’m assuming most others), tonality is “sticky.” Play C – G7 and ask me to sing a song, and it’s likely to come out in C or A minor. After a little longer maybe a closely related key like G or F.

I try to fight that in the survey by asking participants to listen to this “music” between questions. This is one track of Cm – Bdim7 slowly pitch shifted up two whole tones and another of Em – D#dim7 slowly pitch shifted down two whole tones, just trying to disorient the listener.

Anyway, the “answers” are below, but remember there’s no harm in being “wrong”. Perfect pitch memory/recognition is helpful at some tasks in music transcription, but relative pitch is the crucial one that allows you to enjoy and create the vast majority of Western music, recognize when notes are sharp/flat, etc.

Continue reading  

Deerhoof “Cast Off Crown” Chords


  This guitar part is loosely in E major, with a borrowed II chord, and a brief
  modulation to D major.

      ii    V    IV   II     iv of D   I of D
    F#m/C#  B    A   F#/C#   Gm/D      D

  This section is roughly E mixolydian. I believe the guitar is playing power chords
  but it may just be octaves sometimes. The bass and guitars here sound a bit
  improvised, moving independently but transforming these simple power chords into
  more complex harmonies (right):
    E      D5/G  E5/A  A5/B  => (Gadd9  Aadd9  B7sus)

    E      D5/B  E5/C  F5/D  => (Bm7    CM7    Dm7)

    C/G    Bb5/C C/F   F5/Eb => (C7sus  F      F7)

    C      Bb5/G C5/F  D5    => (Gm7    FM7    D)

    E      D5/G  E5/A  A5/B  => (Gadd9  Aadd9  B7sus)


  At 0:22 a blast of bluesy 7th chords in E, with a temporary dissonant C7#9 chord
  (distortion makes this chord hard to identify). These bar lengths are ad-libbed
  (31 beats total) and sometimes the chord changes on an eight note:

    8          6      7       10
    E7         A7     C7#9    F#m7

  The guitar falls out and some simple melodies outline E and A chords.


  This section is in D dorian, but playfully borrows A and D from mixolydian. The
  Cm7 is a bit like a Neapolitan Eb chord (there's a real one later). These "add13"
  and "add11" are just B notes. Probably played as 5th fret of the G string and
  open B string.

    Dm7add13              Cm7         A7     D7add13     Dm7add13  G7add11
    Hey mister hey mister out of this picture.       I'm only the  sister.

  Now a long string of secondary dominant resolutions. This section lacks a strong
  tonal center, but roughly starts out in E dorian:

    V/V    V            i
    F#11   B11          Em7
    Royal- ty I learned I will become

  Now shifts to G major, though it doesn't fully resolve:

    V/V                     v/V              V7
    A7                      Am7              D13
    queen of the cast-offs. I will thrice refuse.

  This D13 is a real 13th [D F# A C E G B] (across multiple guitars), not just a D7
  with added 13th. I think the F# is only in the vocal.

V2) (same progression)

  At 1:27 the bass plays out of sync with the guitars in a wonderful way. Following
  a bar of Dm, the guitars play Cm7 and A7 over a full bar, but the bass seems to
  hold the Dm and cram the last two chords into the last 2 beats:

  guitars:    Dm7                  Cm7           A7
  bass:       D           D        D        Eb E C     A
           Oh lover oh lover,      where is the  thun- der?
  So the bass ends up playing D and E natural under Cm7, and C natural under A7.
  Maybe a mistake (?), but sounds amazing, as if those last 3 bass notes are 3
  different chords.

B) (1:56)

    F#m/C#  B  A  F#/C#  Gm/D  D

  Here the verse progression transposed up a whole step with some small
  variations. Before the B chord we have a real F Neapolitan.

    Em7        FM7  B  E7        Em7   A7

    G#11  C#11         F#m       B7  Bm7  E7


  To end we get the intro guitar, not tuned up, but rather *down* a whole step.
  I think this is done for two reasons: So the bridge's E7 can lead into the Em
  (this major to minor change is almost thematic to the song), and so that we're
  spit out in the key of the verses.:

    Em/B   A   G  E/B   Fm/C  C    Dm

Deerhoof “Criminals of the Dream” Chords


  See B2 section below. Starts in Eb major, ends in E major.

  A vocal melody is interrupted by a A-G-G bassline, making it sound like
  A7 harmony, but this is a trick. As the bass continues alone we start to
  hear this as what it is: 2-1-1 in G major. The guitars come in with G
  chords to confirm.


  The verses starts in G mixolydian, with bass as a pedal. You can see the
  pattern they're building in the progression:

    G  C/G
    G  F/G  C/G
    G  C/G  F/G  C/G
    G       C/G  F/G  C/G

  A bit of the pattern is then repeated in Eb mixolydian:

    Eb           Db   Ab

V2) (with vocals)

  A lot happens in these 4 chords. The Bb is the V of Eb (shifting from
  mixolydian to ionian). The Db teases that we're back in Eb mixo, but
  instead of leading to Ab, we get harmonic planing down to a C major. The
  melody still has Eb, giving it a jazzy sharp 9 sound, and makes the
  following F chord sound like it functions as the V of Bb. So really the
  C is the V/V of Bb.

    V           VIIb    V/V (of Bb) V
    Bb          Db/Ab   C           F

  A full resolution to Bb is skipped in favor of 2 thrilling modulations:

    I      I
    Db     Eb  (We get a couple nice pentatonic lines here)


  We start in Eb major, slipping in a borrowed iv chord:

    I      iv          I
    Eb     Abm/Cb /Ab  Eb/Bb 

  The borrowed Abm is used to modulate to Gb major:

    ii   V        IV         V         V7      I
    Abm7 Dbadd9   Cbadd9/Eb  Db        Db7/Cb  Gb/Bb

  A i (Gbm) is used to modulate to E major:

    ii        I        ii   I  V7          I  iv       I
    Gbm/A     E/G#     E/F# E  B7sus/E     E  Am6/E    E


  The G#m chords are dotted with brief A chords then we resolve to E:

    iii            V  I
    G#m7   A  x4   B  E

    v/II    II
    C#m7    F#7add11

Revisiting the outcomes of the 21th century Chinese import boom

The conventional wisdom among economists is that the post-2000 Chinese import boom—which we know rapidly devastated the American manufacturing base—was overall good for the U.S.; that (as I argue) artificial barriers to trade generally make both parties poorer, and over the long run trade ends up lifting all boats. While I think it will always be true that trade barriers increase the price of products, a lot of the other assumptions may not be true. Continue reading  

Sleep Walk analysis

Sleep Walk” is pretty famous for its I – vi – iv – V verses, but there’s more interesting stuff going on, especially for 1959 top 40 radio.

  • The end of the bridge is a G7#9 (AKA the “Purple Haze” chord). The slide emphasizes this by sliding [D, G] up to [F, Bb] and back, and you can really hear the [B, F, Bb] in the rhythm guitar. I can’t think of any other top 40 song that used it so prominently; even “Purple Haze” mostly omits the major 3rd so it’s not as dissonant.
  • The ending is a G chord with the slide using a falling sixth interval: [G, E] – [Gb, Eb] – [F, D]. This is a common blues trick that turns a 6th chord (6 on top) into a 7th (7 on bottom).
  • The final cadence is pure jazz:
    • C6 [8-x-7-9-8-x]
    • G7b9+ [x-8-9-8-9-x] (root played only by bass)
    • C6add9 [x-10-10-9-10-10]

Take the medicine

I saw an image floating around Facebook that said the human body is “programmed” to be a “self-healing machine” and “pills only mask the symptoms” of illnesses. This kind of thinking leads to kids dying and suffering needlessly.

Symptoms are what kill you. You don’t get a gold star for “roughing out” a fever or a painful injury, and the stress endured doesn’t make your body stronger. Stress is bad for you and damages relationships.

Bodies aren’t programmed. Evolution is a sloppy mechanism that produces systems just barely sufficient to survive threats from the immediate environment. Unfortunately, our “immediate environment” is now global, so with respect to the evolutionary time scale our potential sources of illness has exploded. Our systems are not prepared, and even young, talented musicians can succumb to viruses like H1N1.

Why wouldn’t a Basic Income be consumed by inflation?

Interest in the Basic Income is definitely picking up. This recent piece from Andrew Flowers, like most, doesn’t at all mention the possibility that the BI amount could be somewhat or completely eaten away via increased prices.

The BI will give rent collectors—landlords, near-monopolies like AT&T/Comcast, state/local governments, on and on—large incentives to increase rents, prices, and fees. Of course it will have some level of inflation.

If the inflation effect turns out to be large, BI would be a waste of time and scary to roll back, but there’s also a danger it could be regressively redistributive. I think it’s likely Congress would pass the BI only if it also reduced more direct help to the poor. If Congress took away that help, inflation—if occurred—would effectively force the poor to turn over what’s left to the rent collectors higher up the wealth distribution.

BI is still an interesting thought experiment to me, and it’s cool that studies are underway, but those studies need to be large and long enough to detect for inflationary effects, and articles discussing BI should mention that risk.

There are plenty more feasible ways to help the poor: increase wage subsidies like the EITC, target wage subsidies toward those having particular trouble finding work, or even some WPA jobs.

Obligatory 2015 Marijuana update

The minimal evidence we have of marijuana usage harms keeps withering away under more careful study, but the very real harms of police enforcement go on. I’ve really stopped paying attention to this stuff because it never ends; one month of stories look like any other. I just pop in once in awhile to see the latest abuses. Yep, young women cavity searched on the side of the roadkids shot; tons of no-knock drug raids putting everyone in unnecessary danger

America’s criminal justice system is so brutal and resistant to reform that the only way to reduce harm is to lessen people’s contact with it: move regulation strategies away from criminal law. Thankfully, state referendums to get cops out of the pot business are all over and even nation candidates are being forced to take the issue seriously.

To think how much harm could’ve been avoided if the country hadn’t wrapped up marijuana with the war on crack in the 80s. Hard drugs truly were devastating some communities then and now, but the “smell of marijuana” gave the police practically unlimited power and financial resources to forcibly invade and ruin the lives of people, particularly in neighborhoods unlikely to afford decent lawyers. Very few upper class families receive the Cheye Calvo experience, but lots of the little people still do.

Plugin-based Systems (and Events)

Modern application design is solved! OK, well we at least have a set of camps with their own principles, tools, and paradigms leading us toward the light. One might be “build some components, wire them up with references to each other, and let them talk to each other.” We love/hate static typing, but it allows tools to reason about really large programs.

All that is great, but I feel like plugin system design is in the wild west. To be clear, I mean dropping a new directory of code in place, performing some ritual, and the system behaving radically differently. Of course, we’re getting better at this as apps learn from each other, but I feel like our principles and tools aren’t particularly well matched to this goal of plugins being able to cooperate on a deep level to build up a system.

Allowing plugins to provide APIs introduces a big set of challenges. Just a few:

  • How do we conditionally use API’s if they’re available?
  • How can a plugin decorate/filter the API’s output?
  • How can a plugin replace the API with its own?
  • If two plugins want to replace the API, which “wins”?
  • How can a plugin remove part of the behavior/API of another plugin?
  • How much can plugins detect about each other?

Most robust plugin systems solve these with event systems and some mechanism of ordering plugins to solve disputes (all unique).

A big problem is that events are almost always run-time linking based on strings. Hence it’s very difficult for tools and humans to reason about which listeners will be called, in what order, and what data will flow to each listener and be returned to the dispatching party. Ideally IDEs could sense all this stuff, and help wire up new listeners and events. Instead, devs on a plugin-heavy system must do string searching on event names or at best use some reporting tool built into the event system.

Symfony’s typed event objects and Ruby’s symbols probably help here. Drupal has a strong convention both in code and docs that helps, and is popular enough for toolmakers to focus on it. Middleware systems as in Express (node) and Stack (PHP) offer a formal way to compose applications, which is pretty exciting, but I’m not sure they solve any of the above problems of plugins tightly collaborating on processes.

What’s the future look like here, and what’s the way toward it? Standardizing on a single event system seems unlikely, but what are the best and most powerful ones out there? What language features would make this easier? Can someone stop me from diving deep into Event-driven programming literature?

Events and Dependency Injection

The Laravel podcast folks mentioned a backlash about firing events in controllers, and I would guess those arguments were based on the notion that events can be used as a sneaky way of using global dependencies. Depending on the design of the event system, the party firing the event can access resources returned by event listeners, and this pattern can be abused like a service locator.

If you allow events to return resources and to be called within a component, you don’t really know a component’s real dependencies without reading the source code. Not at all does this imply you shouldn’t do it, but just that there are trade-offs anytime you reach out for undeclared dependencies at runtime.

What might give the best of both worlds is a way of injecting a dispatcher limited to a single event. E.g. make a class that triggers a particular event and depend on that. This would be best baked into the language similar to generics, so reflection could determine the event(s) needed without a bunch of boilerplate single-event objects.