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


Humdrum Exercise #16 - Answers


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

  1. Extract and format the text for the Gregorian chant "liber10".
    COMMAND:     extract -i '**silbe' liber10 | text | rid -GLId | fmt
  2. How many words are there in the Gregorian chant "liber11"?
    COMMAND:     extract -i '**silbe' liber11 | text | rid -GLId | wc
    ANSWER:         170 words
  3. How many syllables are there in the Gregorian chant "liber11"?
    COMMAND:     extract -i '**silbe' liber11 | rid -GLId | grep -v = | wc
    ANSWER:         376 syllables
  4. Does the word "supendit" occur in the text of the chant "liber20"?
    COMMAND:     extract -i '**silbe' liber20 | text | grep -i 'supendit'
    ANSWER:         yes
  5. What word occurs prior to "descendi" in the chant "liber30"?
    COMMAND:     extract -i '**silbe' liber30 | text | context -n 2 | grep -i ' descendi'
    ANSWER:         caelo
  6. What word begins the sentence containing the word "corde" in the chant "liber47"?
    COMMAND:     extract -i '**silbe' liber47 | text | context -e '[?.]$' | grep -i 'corde'
    ANSWER:         Quam
  7. How many sentences are there in the text for the chant "liber11"?
    COMMAND:     extract -i '**silbe' liber11 | text | context -e '[?.]$' | rid -GLId | wc
    ANSWER:         24
  8. Identify any sentences that are exact repetitions of other sentences in the text for the chant "liber11"?
    COMMAND:     extract -i '**silbe' liber11 | text | context -e '[?.]$' | rid -GLId | sort | uniq -dc
    ANSWER:         Et laudabili et glorioso in saecula. (2 times) ANSWER:         Et laudabilis et gloriosus in saecula. (7 times)
  9. BONUS QUESTION: What is the greatest number of syllables in any word in text for the chant "liber11"?
    COMMAND:     extract -i '**silbe' liber11 | humsed '/[^-]$/s/$/%/; s/^\.%/./' | grep -v = | context -e '%' | humsed 's/[^ ]* /X /g; s/[^ ]*%/X/' | rid -GLId | sort | uniq -c | sort -n
    ANSWER:         5 syllables (1 instance)

Return to Music 824 Index