SYNOPSIS
OPTIONS
DESCRIPTION
The input Humdrum data must contain four monophonic spines of **kern data. Non-kern spines will be ignored. If there are more than four **kern spines on a line, then the first four **kern spines are assumed to be the SATB voices and other **kern data after will be ignored. Errors are reported as global comments before the line on which offending error starts, and is of the form: !! Warning: <type>. <Error description and voicing location> As an example, the following music can be input into the chorck command: When the above data is run through the chorck command, four errors will be detected. In the example output below, blue text indicates the additional text added by the chorck command, and the bold red text indicates where the problem occurs. Dark red indicates the notes preceding rule-violating movements. chorck file.krn | hgrep Warning -mbWhich will return this result for the above example input: Metrical considerationsChorck checks successive sonorities for rule violations; however, application of rules are also related to the metrical pattern. For example, The following example will pass all of the tests:
In this case, when considering the notes falling on the beat, the bass and soprano parts play in parallel octaves from C to E. Chorck only checks successive sonorities, of which there are three in the example: (c e g cc), (c e g dd), and (e f g ee). But the D in the soprano is also a passing-tone between two more preceptually relevant sonorities which are occuring on the beat. To handle these types of cases in chorck, the offbeats can be removed by using the sample command, which will sample the music at quarter-note beats, and remove sonorities occurring off of the beats: The output from sample can then be sent to chorck for analysis, which will now be able to identify the parallel octave motion: Applying chorck directly to a Bach chorale (BWV 347) will identify 5 rule violations:
Compare the above results to the following analysis which is created by first filtering the chorale through the sample command, which removes two violations and adds three new ones:
Selective sonority exclusionsInstead of pre-processing chorale music with sample, a more generalized method of determining if any particular sonority is perceptually relevant would be to require a certain number of note attacks in that sonority. Perhaps the best method is to removed all sonorities which contain only one note attack from being considered by the chorck command. This can be done with the -s option.Below is a comparison of using chorck with and without the -s option. When not specifying the -s option, the parallel octave motion in the bass and soprano voices is not detected. But when applying the -s option, the intermediate sonority with only a single note attack on D5 in the soprano voice is ignored, and the parallel octave motion is found:
chorck -s file.krn Rests and the -s, -d, -t optionsWhen determining the number of voices with the -s, -d or -t options, rests are treated equal to notes. Consider the following examples:
chorck -s file2.krn
In the first example, the -s option was able to suppress the second line of the data where only the soprano is starting a new note and the other three voices are holding previously sung notes. In the second example, the second line does have a single note being started, but the other three voices are starting rests, and therefore the program will not exclude that line because of the breaks in the continuity of the voices. In the second case, it becomes perceptually relevant that there is only a single note being played in isolation in the second line of data, and the linkage between the first and third lines of data are weakened. Applying chorck on Bach choralesTry applying chorck to the data for 370 Bach four-part chorales from the KernScores website. First, you can count the number of rule violations separated out by subcategory of which voices are involved, using this command pipeline:chorck *.krn | grep Warning | sort | uniq -c | sort -nrThe results shown below demonstrate that open spacing between the alto and tenor are the most common rule that Bach violates in the chorales, and this occurs three times more often than open spacing between the alto and soprano voices. Parallel fifths or octaves are the least common of the rule violations: 338 !! Warning: 8. Open spacing between alto and tenor 329 !! Warning: 7. Voice crossing between tenor and bass 202 !! Warning: 5. Hidden 5th between soprano and alto 191 !! Warning: 5. Hidden 5th between soprano and tenor 174 !! Warning: 6. Hidden octave between soprano and tenor 156 !! Warning: 7. Voice crossing between soprano and alto 103 !! Warning: 8. Open spacing between soprano and alto 98 !! Warning: 5. Hidden 5th between soprano and bass 84 !! Warning: 7. Voice crossing between alto and bass 78 !! Warning: 7. Voice crossing between soprano and tenor 46 !! Warning: 6. Hidden octave between soprano and bass 37 !! Warning: 4. Unequal 5th between bass and soprano 32 !! Warning: 4. Unequal 5th between bass and alto 24 !! Warning: 4. Unequal 5th between bass and tenor 23 !! Warning: 6. Hidden octave between soprano and alto 19 !! Warning: 3. Contrary parallel 5th between bass and alto 18 !! Warning: 3. Contrary parallel 5th between tenor and soprano 14 !! Warning: 1. Parallel 5th between tenor and soprano 12 !! Warning: 1. Parallel 5th between tenor and alto 11 !! Warning: 3. Contrary parallel 5th between bass and tenor 7 !! Warning: 3. Contrary parallel 5th between bass and soprano 6 !! Warning: 3. Contrary parallel 5th between tenor and alto 4 !! Warning: 1. Parallel 5th between bass and soprano 3 !! Warning: 2. Parallel octave between bass and alto 3 !! Warning: 1. Parallel 5th between bass and tenor 2 !! Warning: 2. Parallel octave between bass and tenor 2 !! Warning: 1. Parallel 5th between bass and alto 2 !! Warning: 1. Parallel 5th between alto and soprano 1 !! Warning: 2. Parallel octave between tenor and soprano Next, you can check to see how often in the chorales the eight rules that chorck checks for are violated using this command pipeline: chorck *.krn | grep Warning | sed 's/\..*//' | sort | uniq -cWhich will give the following answer saying that the parallel-octaves rule is the rule Bach violates the least, while hidden-fifths, voice-crossing, and open-spacing rules are the ones he violates the most: 37 !! Warning: 1 (parallel 5ths) 6 !! Warning: 2 (parallel octaves) 61 !! Warning: 3 (contrary parallel 5ths) 93 !! Warning: 4 (unequal 5ths) 491 !! Warning: 5 (hidden 5ths) 243 !! Warning: 6 (hidden octaves) 647 !! Warning: 7 (voice crossing) 441 !! Warning: 8 (open spacing)These counts can be put into perspective by dividing by the total number of sonorities present in the chorales. The sonority count can be measured by counting the lines of data in the chorales, excluding lines which contain barlines, which will return a count of 30276: rid -GLId *.krn | grep -vc =
Fermatas (denoted by a semicolon in **kern data) consistently marks phrase boundaries in the chorales, so the rule violations can be separated between phrase endings and the rest of the phrase. To count the number of rules triggered at phrase boundaries, the following command pipeline can be used: chorck *.krn | grep -A 1 Warning | grep -c ';'The above command will find 306 rule violations at phrase boundaries, which is 306/2019 = 15% of the total violations. To count the number of phrases (3120), use this command (in a bash shell): for i in *.krn; do extract -f1 $i | hgrep ';'; done | wc -lThe above command extracts the bass voice from each file and then searches for fermatas. Fermatas cannot be searched for in the full-voice texture because sometimes voices have extra notes before ending on a fermata note. This means that rule-violations occur about 50% more often at phrase boundaries compared to inside of phrases: 306/3120 = 9.8% at boundaries compared to (2019-306)/(30276-3120) = 6.3% at other locations in the phrase. (Excluding rules 7 and 8, which rarely occur at phrase boundaries, from the comparison will increase the difference). Here is a command pipeline which counts the number of rule violations by rule at the phrase boundaries: for r in 1 2 3 4 5 6 7 8; do echo "rule $r:"; chorck *.krn -r $r \ | grep -A 1 Warning | grep -c ';'; doneWhich returns these results: rule 1: 12 (parallel 5ths) rule 2: 4 (parallel octaves) rule 3: 22 (contrary parallel 5ths) rule 4: 21 (unequal 5ths) rule 5: 165 (hidden 5ths) rule 6: 85 (hidden octaves) rule 7: 15 (voice crossing) rule 8: 4 (open spacing) Separating the total counts into phrase-middles and phrase-endings for each rule:
Note in particular that rules 7 & 8 (voice crossing and open spacing) are only violated by Bach in the middle of phrases, and extremely rarely at the ends of phrases at fermatas. Next, it is useful to display the relative frequency of rule violations by the occurrence of each type of sonority (all, phrase-ending, phrase-middle):
Rules 1-6 are more common to occur at phrase boundaries, while rules 7 & 8 are more common to occur at phrase boundaries. In particular, parallel octaves are thirteen times more likely to occur at phrase boundaries than at other locations in a phrase; while open spacing is thirteen times more likely to occur in the middle of phrases rather than at phrase boundaries. Refined analysis with the -s optionThe -s can be used to filter out intermediate sonorities which can hide musically relevant violations of rules 1-6 (which examine the voice relationships across two sonority regions). To count the number of sonorities which do not contain single note-attacks, try this command (in a bash shell) which will count 22267 sonorities (as compared to 30276 sonorities when including ones with single-note attacks in the previous section).for i in *.krn; do chorck -as $i; done | wc -lThe -a option will list the sequence of pitches being examined in base-40 pitch notation, with the number of rows equivalent to the number of sonorities. When examining these 22267 sonorities, 1580 rule violations were found, which is an overall rate of 7.1%: chorck -s *.krn | grep -c WarningCounts of the individual rule violations can be done as before with this command pipe line: chorck -s *.krn | grep Warning | sed 's/\..*//' | sort | uniq -c 113 !! Warning: 1 (parallel 5ths) 0.51% 9 !! Warning: 2 (parallel octaves) 0.04% 80 !! Warning: 3 (contrary parallel 5ths) 0.36% 98 !! Warning: 4 (unequal 5ths) 0.44% 487 !! Warning: 5 (hidden 5ths) 2.19% 252 !! Warning: 6 (hidden octaves) 1.13% 219 !! Warning: 7 (voice crossing) 0.98% 322 !! Warning: 8 (open spacing) 1.45%Counts for phrase boundary rule violations can be done with this command pipeline (which is better than the simpler method given in the previous section): for r in 1 2 3 4 5 6 7 8; do echo "rule $r:"; chorck *.krn -s -r $r \ | grep -A 1 Warning | grep -c ';'; done rule 1: 16 (parallel 5ths) rule 2: 4 (parallel octaves) rule 3: 23 (contrary parallel 5ths) rule 4: 21 (unequal 5ths) rule 5: 164 (hidden 5ths) rule 6: 85 (hidden octaves) rule 7: 9 (voice crossing) rule 8: 4 (open spacing)With the above violation counts, a similar summary table as in the prevous section, but probably more musically accurate, can be constructed:
Open spacing is one of the two most common rule violations, but
it is 12 times more commonly found in the middle of phrases as compared
to phrase endings. Also parallel octaves, which is the least-commonly
violated rule, occurs 6 times more often at phrase boundaries as compared
to the middle of phrases. Again, all rule violations occur more often
at phrase boundaries, except for rules 7 and 8.
ONLINE DATA
program file.krnIt can also read the data over the web: program http://www.some-computer.com/some-directory/file.krnPiped data works in a somewhat similar manner: cat file.krn | programis equivalent to a web file using ths form: echo http://www.some-computer.com/some-directory/file.krn | program Besides the http:// protocol, there is another special resource indicator prefix called humdrum:// which downloads data from the kernscores website. For example, using the URI humdrum://brandenburg/bwv1046a.krn: program humdrum://brandenburg/bwv1046a.krnwill download the URL: Which is found in the Musedata Bach Brandenburg Concerto collection. This online-access of Humdrum data can also interface with the classical Humdrum Toolkit commands by using humcat to download the data from the kernscores website. For example, try the command pipeline: humcat humdrum://brandenburg/bwv1046a.krn | census -k REFERENCES
DOWNLOAD
The source code for the program was last modified on 12 Jun 2009. Click here to go to the full source-code download page. |