For this exercise you will need to know the following new commands:
UNIX Commands | Humdrum Commands |
---|---|
humsed | |
Change directories to /var/opt/Humdrum/Scores and answer the following questions. For each question, keep a record of both the answer, and the command(s) used to find your answer.
**harm
(harmony) information.
What proportion of all chords is in first inversion?
Second inversion?
(N.B. You don't need humsed to answer this.)
COMMAND: extract -f 1 *.hrm | rid -GLId | grep -v = | wc 2877 2877 10243
ANSWER: There are 2,877 chords ...
COMMAND: extract -f 1 *.hrm | rid -GLId | grep -v = | grep -c b 821
ANSWER: There are 821 first inversion chords; 821 divided by 2877 is 0.285367 so 28.5 percent of chords are first inversion.
COMMAND: extract -f 1 *.hrm | rid -GLId | grep -v = | grep -c c 64
ANSWER: There are 64 second inversion chords; which is 2.2 percent.
COMMAND: extract -f 1 *.hrm | grep -v = | rid -GLId | sort | uniq -c | sort -n
ANSWER: 383 "I" chords; i.e. I chords in root position.
COMMAND: extract -f 1 *.hrm | humsed 's/;//g' | grep -v = | rid -GLId | sort | uniq -c | sort -n
ANSWER: 529 "I" chords
COMMAND: extract -f 1 *.hrm | humsed 's/[bcd;]//g' | grep -v = | rid -GLId | sort | uniq -c | sort -n
ANSWER: 722 "I" chords (ignoring inversion)
COMMAND: extract -f 1 *.hrm | humsed 's/[bcd;7]//g' | grep -v = | rid -GLId | sort | uniq -c | sort -n
ANSWER: 732 "I" chords (ignoring inversions and sevenths)
COMMAND: extract -f 1 *.hrm | rid -GLId | grep '/' | sort | uniq -c | sort -n
ANSWER: There are 13 instances of "viib/V".
COMMAND: extract -f 1 *.hrm | humsed 's/[bcd;7]//g' | rid -GLId | grep '/' | sort | uniq -c | sort -n
ANSWER: There are 19 instances of "vii/V" when inversion is ignored.
COMMAND: extract -f 1 *.hrm | rid -GLId | grep '/' | humsed 's%.*/%%' | sort | uniq -c | sort -n
ANSWER: There are 176 instances of "X of V"; the second most common ... There are 72 instances of "X of vi".
This document is available at http://csml.som.ohio-state.edu/Music824/Exercises/exercise15.html