Scarlet & Grey
Ohio State University
School of Music



Music 824: Assignment #2 - Answers


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

  1. Is the file "syrinx" a Humdrum file?

    COMMAND:    humdrum syrinx
    ANSWER:         yes

  2. How many untied notes are there in the file "syrinx"?

    COMMAND:    census -k syrinx
    ANSWER:         257

  3. Are there any double-sharps in the file "syrinx"?

    COMMAND:    grep '##' syrinx
    ANSWER:         no

  4. Are there any double-flats in the file "syrinx"?

    COMMAND:    grep '\-\-' syrinx
    ANSWER:         yes

  5. How many double-flats are there in the file "syrinx"?

    COMMAND:    grep -c '\-\-' syrinx
    ANSWER:         6

  6. Are there any staccato marks in "syrinx"?

    COMMAND:    grep \' syrinx
    ANSWER:         no

  7. Are there any trills, mordents, or turns?

    COMMAND:    grep -v '^[!*]' syrinx | grep '[TtWwMmS$]'
    ANSWER:         Yes. Two trills.

  8. Are there any changes of meter?

    COMMAND:    grep '\*M[0-9]
    ANSWER:         yes

  9. Are there any changes of key signature?

    COMMAND:    grep '\*k\[.*\]'
    ANSWER:         no

  10. How many comments are there in the first movement of Bach's Brandenburg concerto No. 2? (bwv1047a.krn)

    COMMAND:    census bwv1047a.krn
    ANSWER:         36

  11. How many local comments are there in "bwv1047a.krn"?

    COMMAND:    grep '^![^!]' bwv1047a.krn
    ANSWER:         one - found in ten spines

  12. How many single barlines are there in "bwv1047a.krn"?

    COMMAND:    census -k bwv1047a.krn
    OR:                    grep -c '^=[^=]' bwv1047a.krn
    ANSWER:         118

  13. How many measures are there in "bwv1047a.krn"?

    COMMAND:    grep -c '^=[^=]' bwv1047a.krn
    OR:                    census -k bwv1047a.krn
    ANSWER:         118

  14. How many double barlines are there in bwv1047a.krn?

    COMMAND:    grep -c '^==' bwv1047a.krn
    OR:                    census -k bwv1047a.krn
    ANSWER:         1

  15. Are there any doubly-dotted notes in bwv1047a.krn?

    COMMAND:    grep '[0-9]\.\.[^.]' bwv1047a.krn
    ANSWER:         no

  16. How many untied notes are there in the flauto dolce part from the first movement of the second Brandenburg?

    COMMAND:    extract -i '*Ifltds' bwv1047a.krn | census -k
    ANSWER:         1359

  17. What is the highest note in the oboe part for the first movement of the second Brandenburg?

    COMMAND:    extract -i '*Ioboe' bwv1047a.krn | census -k
    ANSWER:         ddd or D6

  18. In the second movement of the second Brandenburg (bwv1047b.krn) which part has the most number of rests?

    COMMAND:    extract -f 1 bwv1047b.krn | census -k
    ANSWER:         violin part: 62 rests

  19. In the Essen Folksong Collection, which German state has more encoded melodies: Hessen or Brandenburg?

    COMMAND:    grep -c '!!!ARE:.*Hessen' */*
                               grep -c '!!!ARE:.*Brandenburg' */*
    BETTER:          grep -l '!!!ARE:.*Hessen' */* | grep -c
                               grep -l '!!!ARE:.*Brandenburg' */* | grep -c
    ANSWER:         Hessen (400 songs)

  20. In the Essen Folksong Collection, how many German folksongs are classified as dance songs? (in German `Tanz').

    COMMAND:    grep '!!!AGN:.*Tanz' */* | grep -c
    ANSWER:         312