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


Humdrum Exercise #15 - Answers


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

  1. In Gregorian chant, what is the most common interval following a rising major second?
    COMMAND:     extract -i '**kern' liber* | mint | context -n 2 -o ^= | grep '^+M2' | sort | uniq -c
    ANSWER:         708 instances of +M2 followed by -M2
  2. In Gregorian chant, what is the most common interval following a rising minor second?
    COMMAND:     extract -i '**kern' liber* | mint | context -n 2 -o ^= | grep '^+m2' | sort | uniq -c
    ANSWER:         154 instances of +m2 followed by +M2
  3. Consider diatonic intervals only. In Gregorian chant, the most common sequence of intervals consists of repeated unisons. For example, the most common 10-note interval pattern is 9 repeated unisons. How many sequential notes do we have to consider before a string of unisons is no longer the most common diatonic interval pattern?
    COMMAND:     extract -i '**kern' liber* | mint -d | context -o ^= -n 10 | rid -GLId | sort | uniq -c | sort -n
                                extract -i '**kern' liber* | mint -d | context -o ^= -n 11 | rid -GLId | sort | uniq -c | sort -n
                                extract -i '**kern' liber* | mint -d | context -o ^= -n 12 | rid -GLId | sort | uniq -c | sort -n
                                extract -i '**kern' liber* | mint -d | context -o ^= -n 13 | rid -GLId | sort | uniq -c | sort -n
                                etc
                                extract -i '**kern' liber* | mint -d | context -o ^= -n 17 | rid -GLId | sort | uniq -c | sort -n
    ANSWER:         When -n is 17, a sequence of unisons is no longer the most common interval pattern.
                                This means that beyond 17 pitches, string of unisons are no longer in the majority.
  4. In French folksongs, what scale degree most commonly follows the subdominant?
    COMMAND:     context -n 2 -o ^= france* | solfa -x | grep '^fa' | sort | uniq -c | sort -n
    ANSWER:         Twenty-four subdominant pitches are followed by the mediant.
  5. In French folksongs, what scale degree most commonly precedes the subdominant?
    COMMAND:     context -n 2 -o ^= france* | solfa -x | grep 'fa$' | sort | uniq -c | sort -n
    ANSWER:         Twenty-nine subdominant pitches are preceded by the dominant.
  6. In French folksongs, what scale degree most commonly begins a phrase?
    COMMAND:     yank -m '{' -r 0 france* | solfa -x | rid -GLId | sort | uniq -c | sort -n

    Due to a bug with yank you might have to use the following command:

    COMMAND:     cat france* | yank -m '{' -r 0 | solfa -x | rid -GLId | sort | uniq -c | sort -n

    ANSWER:         Twenty-seven phrases begin with the dominant (`so').
  7. For those French folksongs whose phrases begin with the dominant pitch, what is the most common ending pitch of the phrase?
    COMMAND:     context -b '{' -e '}' -o ^= france* | solfa -x | humsed 's/ r$//; s/ .* / /' | grep '^so' | sort | uniq -c | sort -n
    ANSWER:         The majority (8) of phrases beginning on the dominant also end on the dominant.
  8. BONUS QUESTION: In Austrian folk songs, what is the most common interval formed by the first and last notes of each phrase?
    COMMAND:     cat *.krn | yank -m '[{}]' -r 0 | context -b '{' | hint -v | rid -GLId | sort | uniq -c | sort -n
    ANSWER:         There are 60 phrases that begin and end on the same note (P1 is most common).

    A problem with the above approach is that no intervals are calculated when the phrase begins or ends with a rest. A better approach is as follows:

    COMMAND:     humsed '/r/d' *.krn | context -b '{' -e '}' -o ^= | humsed 's/ .* / /' | hint -v | rid -GLId | sort | uniq -c | sort -n
    ANSWER:         There are 93 phrases that begin and end on the same note (P1 is most common).

Return to Music 824 Index