
For J.S. Bach's chorale harmonizations, extract the **harm spines and answer the following questions:
COMMAND: extract -i '**harm' *.hrm | rid -GLId | grep 'b' | sort | uniq -c | sort -n
ANSWER: tonic (174 instances)
COMMAND: extract -i '**harm' *.hrm | rid -GLId | grep '7' | sort | uniq -c
ANSWER: Most common sevenths: V6-5 (46) and ii6-5 (46)
ANSWER: First inversion is more common than root position for seventh chords
COMMAND: extract -i '**harm' *.hrm | rid -GLId | grep 'c' | sort | uniq -c
ANSWER: Tonic second inversion (18 instances)
COMMAND: extract -i '**harm' *.hrm | humsed 's/[b-g0-9;]//g' | rid -GLId | grep -v = | sort | uniq -c | sort -n
ANSWER: tonic major function (732 instances)
COMMAND: extract -i '**harm' *.hrm | humsed 's/i/I/g; s/v/V/g; s/[b-g0-9;]//g' | rid -GLId | grep -v = | sort | uniq -c | sort -n
ANSWER: tonic function (793 instances)
COMMAND: extract -i '**harm' *.hrm | context -n 2 -o '[=r]' | rid -GLId | sort | uniq -c | sort -n
COMMAND: extract -i '**harm' *.hrm | humsed 's/;//g' | context -n 2 -o '[=r]' | rid -GLId | sort | uniq -c | sort -n
ANSWER: V-I (161 instances)
COMMAND: extract -i '**harm' *.hrm | context -n 3 -o '[=r]' | grep ' IV V$' | sort | uniq -c | sort -n
ANSWER: I-IV-V is the most common (6 instances)
COMMAND: extract -i '**harm' *.hrm | context -n 2 -o '[=r]' | grep ';$' | sort | uniq -c | sort -n
ANSWER: V-I (99 times); V/V-V (32 times) V7/V-V (21 times); V7-I (12 times0