Music 824: Computer Applications in Music Research
Ohio State University
School of Music


Humdrum Exercise #12 - Answers


All of the following commands assume that you are located in the appropriate score directory.

  1. It is commonly thought that melodies are organized with a preference for small melodic intervals (the so-called "pitch-proximity principal"). It is possible that small intervals arise simply because of limitations of range. Most pitches occur in the central part of an instrument's or voice's range, so even for random melodies most intervals ought to be small. Using the Humdrum scramble command compare the average interval size for an actual melody with the average interval size when the order of notes for the melody has been randomly rearranged. (For this exercise use the French patriotic song Allons enfants de la patrie [france01.krn]).
    COMMAND:     semits -x france01.krn | xdelta -a -s ^= | grep -v '[=r\[]' | rid -GLId | stats
    ANSWER:         The average interval size for the actual melody is 1.97 semitones.

    COMMAND:     scramble -r france01.krn | semits -x | xdelta -a -s ^= | grep -v '[=r\[]' | rid -GLId | stats
    ANSWER:         The average interval size for the randomized melody is roughly between 3.7 and 4.1 semitones.
  2. It is commonly thought that large intervals tend to be followed by smaller intervals. If small intervals are already very common, wouldn't we expect to see many small intervals following large intervals by chance? For this question, use the french08.krn folksong and assume that a "large" interval is 5 semitones or larger.
    Begin by creating a "reassignment" file for the recode command:
    >=5 large
    >0 small
    COMMAND:     semits -x france08.krn | xdelta -a -s ^= | grep -v '[r=\[]' | recode -i '**Xsemits' -f reassign > temp
                                context -n 2 temp | grep -c 'large large'
                                scramble -r temp | context -n 2 | grep -c 'large large'
    ANSWER:         For the actual melody, there is only one instance of a large interval followed by a large interval.                                   For the random melody, there is typically between 0 and 1 instance of two successive large intervals.
  3. Does Bach tend to avoid V-IV progressions in his chorale harmonizations?
    COMMAND:     extract -i '**harm' *.hrm | context -n 2 -o | grep -c '^V IV$'
                                extract -i '**harm' *.hrm > temp
                                scramble -r temp | context -n 2 -o | grep -c '^V IV$'
    ANSWER:         There are two V-IV progressions in the Bach chorale sample.
                                For the scrambled progressions there are roughly 14 V-IV progressions.
                                Bach appears to avoid V-IV progressions.
  4. In Bach's the two-part Invention No. 11, does he use more or fewer augmented elevenths harmonic intervals than would be expected by chance?
    COMMAND:     ditto -s = inven11.krn | hint | grep -c 'A11'
    ANSWER:         There are 11 augmented elevenths in the actual music.

    COMMAND:     extract -f 1 inven11.krn > temp1
                                extract -f 2 inven11.krn > temp2
                                scramble -r -s = temp1 > temp1s
                                assemble temp1s temp2 | ditto -s = | hint | grep -c 'A11'
    ANSWER:         There are and average of roughly 7 augmented elevenths in the randomized music.
                                Bach appears to "seek-out" augmented elevenths in Invention No. 11.

Return to Music 824 Index