Humdrum lab 8

From CCARH Wiki
Revision as of 01:17, 30 June 2018 by Craig (talk | contribs) (→‎Attack/sustain configurations for modules)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Update

Update Humdrum extras by going to the humdrum-tools directory and typing:

   cd $(which beat | sed 's/humdrum-tools.*/humdrum-tools/')
   make update
   make

chorck

Chorck is a Humdrum Extras tool for checking the part-writing syntax of chorales. documentation for the chork tool

Eight syntax rules are checked by the program, as defined in the music-theory textbook: . Tonal Harmony with an Introduction to Twentieth-Century Music by Stefan Kostka and Dorthy Payne:

  1. Parallel 5ths between two voices when moving to different pitch classes.
  2. Parallel Octaves between two voices when moving to different pitch classes.
  3. Contrary parallel 5ths -- when two voices move in parallel 5ths displaced by an octave. (such as an octave and a fifth going to a fifth)
  4. Unequal 5ths -- when the bass part and another voice move from dim 5ths to perfect 5ths or vice versa.
  5. Hidden 5ths -- when the soprano moves in similar motion with another voice and the soprano leaps to a perfect 5th with that voice.
  6. Hidden 8va -- when the soprano moves in similar motion with another voice and the soprano leaps to a perfect octave with that voice.
  7. Voice crossing -- when an inner voice goes above the soprano voice or below the bass voice.
  8. Open spacing -- when the interval between successive voices other than the bass exceeds an octave.

How many times does Bach violate the rules?

   chorck chor*.krn -w | wc -l

List of the rule violations by type

   chorck *.krn -w  | sed 's/between.*//' | sortcount
   647	7. Voice crossing
   491	5. Hidden 5th
   441	8. Open spacing
   243	6. Hidden octave
   93	4. Unequal 5th
   61	3. Contrary parallel 5th
   36	1. Parallel 5th
   6  	2. Parallel octave

List of the rule violations by voice pairs

chorck *.krn -w  | sed 's/on line.*//' | sortcount

338	8. Open spacing between alto and tenor
329	7. Voice crossing between tenor and bass
202	5. Hidden 5th between soprano and alto
191	5. Hidden 5th between soprano and tenor
174	6. Hidden octave between soprano and tenor
156	7. Voice crossing between soprano and alto
103	8. Open spacing between soprano and alto
98	5. Hidden 5th between soprano and bass
84	7. Voice crossing between alto and bass
78	7. Voice crossing between soprano and tenor
46	6. Hidden octave between soprano and bass
37	4. Unequal 5th between bass and soprano
32	4. Unequal 5th between bass and alto
24	4. Unequal 5th between bass and tenor
23	6. Hidden octave between soprano and alto
19	3. Contrary parallel 5th between bass and alto
18	3. Contrary parallel 5th between tenor and soprano
14	1. Parallel 5th between tenor and soprano
12	1. Parallel 5th between tenor and alto
11	3. Contrary parallel 5th between bass and tenor
7	3. Contrary parallel 5th between bass and soprano
6	3. Contrary parallel 5th between tenor and alto
4	1. Parallel 5th between bass and soprano
3	1. Parallel 5th between bass and tenor
3	2. Parallel octave between bass and alto
2	2. Parallel octave between bass and tenor 
2	1. Parallel 5th between bass and alto
1	2. Parallel octave between tenor and soprano
1	1. Parallel 5th between alto and soprano


Which files contain parallel octaves?

chorck -wfr 2  chor*.krn
2. Parallel octave between bass and tenor on line 57 (chor078.krn)
2. Parallel octave between bass and tenor on line 52 (chor114.krn)
2. Parallel octave between bass and alto on line 65 (chor164.krn)
2. Parallel octave between bass and alto on line 94 (chor226.krn)
2. Parallel octave between tenor and soprano on line 34 (chor270.krn)
2. Parallel octave between bass and alto on line 45 (chor334.krn)


Looking at the rule violations in VHV

    chorck -r 2 chor078.krn | pbcopy

Then paste into VHV:

Paralleloctave.png


Is a parallel octave at a phrase boundary a rule violation?


cint

cint is a tool that extract counterpoint modules from polyphonic music. documentation for cint

It is a generalized tool related to chorck, which is a specialized tool.


Getting a list of counterpoint modules in a piece

cint --raw chor001.krn | head -n 10
10 8 3
12 8 5
15 8 8
3 1 3
6 1 6
4 1 4
3 -3 6
5 -3 8
8 -3 10
3 2 3

The most common modules in Bach chorales:

cint --raw *.krn | sortcount | head -n 10
3500	5 -2 6
3354	6 2 5
2867	3 -2 4
2838	4 -2 5
2735	6 -2 6
2579	5 1 6
2498	3 -2 3
2479	3 1 4
2436	3 2 3
2414	10 2 10

The -O option will collapse compound intervals such as "10 2 10" into "3 2 3" (10th is an octave plus a 3rd).

cint -O --raw *.krn | sortcount | head -n 10
5070	3 2 3
5033	6 2 5
4746	3 -2 4
4394	5 -2 6
4213	5 2 3
4088	3 -2 3
3943	2 -2 3
3833	4 -2 5
3346	3 1 4
3335	6 -2 6

The most common module in Bach chorales is a rising parallel 3rd "3 2 3"



parallel thirds

The three-interval counterpoint module for stepwise rising parallel thirds is "3 2 3". this can be done as a filter in VHV:

  !!!filter: cint -O --search "3 2 3"

The -O option collapses intervals greater than an octave to less than an octave, such as 10th (an octave plus a 3rd) being transposed to 3rds.

Risingthirds.png


Josquin modules

What about in Josquin's music:

cint  -R -O --raw  h://jrp/Jos | sortcount | head -n 10

  23123	3 1 3
  19880	6 1 5
  19517	4 1 3
  19515	3 -2 3
  18545	3 2 3
  16389	3 -2 4
  15812	5 -2 6
  15784	5 1 6
  15772	5 1 5
  15625	8 1 8

The most common is a repeated 3rd.

Note attacks/sustains

Renaissance music is more polyphonic than Bach chorales, so it is better to indicate if the notes are attacked or sustained at each point in the module:


oznin:chorales css$ cint -R -O -x --raw h://jrp/Jos | sortcount | head -n 10

 13912	3xx -2 3xx
 13343	3xx 2 3xx
 8782	6sx -2 8xx
 7779	4sx 1 3sx
 7402	7xs 1 6sx
 7374	3xx 1 4sx
 7315	4xs 1 3sx
 6932	3xx -2 4xs
 6878	6sx 1 5sx
 6537	6xx 1 5sx

With respect to note attacks/sustains, a falling parallel 3rd is the most common, followed by a rising parallel 3rd.

Regular expressions

All parallel thirds in a chorale:

cint --raw chor001.krn  | grep "3 .* 3"  | sortcount
10	3 -2 3
10	3 2 3
3	3 1 3
1	3 4 3
1	3 3 3


Remove repeated note cases:

 cint -U --raw chor001.krn  | grep "3 .* 3"  | sortcount
 10	3 2 3
 10	3 -2 3
 1	3 4 3
 1	3 3 3

With note attack information

  cint -U -x --raw chor001.krn  | grep "3[sx]* .* 3[sx]*"  | sortcount
  7	3xx -2 3xx
  7	3xx 2 3xx
  3	3xs 2 3xx
  2	3sx -2 3xx
  1	3xx 3 3xx
  1	3xs -2 3xx
  1	3xx 4 3xx


Highlight modules which are parallel 3rds without repeats where both notes attack on the thirds:

  !!!filter: cint -U -x --search "3[sx]* .* 3[sx]*"


Parallel3rds.png


Chained counterpoint modules

Sequences of modules can be extracted or searched for by using the -n option:

   cint --raw chor001.krn  -O -n 2 | head -n 10
  3 8 3 -3 6
  5 8 5 -3 8
  8 8 8 -3 3
  3 1 3 2 3
  6 1 6 2 5
  4 1 4 2 3
  3 -3 6 1 5
  5 -3 8 2 6
  8 -3 3 2 6
  3 2 3 -2 4

The -h option will put an "h" label on harmonic intervals (making it easier to read chains):

  cint --raw chor001.krn  -Oh -n 2 | head -n 10
3h 8 3h -3 6h
5h 8 5h -3 8h
8h 8 8h -3 3h
3h 1 3h 2 3h
6h 1 6h 2 5h
4h 1 4h 2 3h
3h -3 6h 1 5h
5h -3 8h 2 6h
8h -3 3h 2 6h
3h 2 3h -2 4h

Also the attack markers are only added to harmonic intervals, so -x will also make it easy to distinguish between harmonic and melodic intervals:

cint --raw chor001.krn  -Ox -n 2 | head -n 10
3xx 8 3xx -3 6xx
5xx 8 5xx -3 8xx
8xx 8 8xx -3 3xs
3xx 1 3xx 2 3xx
6xx 1 6xx 2 5xs
4xx 1 4xx 2 3xs
3xx -3 6xx 1 5sx
5xx -3 8xx 2 6xx
8xx -3 3xs 2 6xx
3xx 2 3xx -2 4xs

Given a harmonic interval of a 3rd between two notes (where both are attacking at the same time), what are the input and output voice motions for that interval?

cint --raw *.krn  -Ox -n 2  | grep " 3xx " | sortcount -p | head -n 10
4.12	3xx 2 3xx 2 3xx
2.57	3xx -2 3xx -2 3xx
1.16	3xx -2 3xx -2 4xs
1	3xx -2 3xx 2 3xx
0.86	3xx 2 3xx -2 3xx
0.81	2xs -2 3xx -2 4xs
0.79	3xx 2 3xx 2 8xx
0.78	3xx 2 3xx -2 4xs
0.76	3xx 2 3xx 2 2xs
0.73	3xx 2 3xx 1 4sx

The most common case is that the 3xx interval is in the middle of a sequence of parallel thirds rising by step. The second most common is parallel thirds falling by step, and then the third most common cases is a falling stepwise parallel third followed by the lower note continuing down stepwise while the upper note remains sustained.

Attack/sustain configurations for modules

Searching for cases where the module is "5 -2 6", but then segmenting into attack/sustain cases:

cint -x *.krn  --raw | egrep "^5[xs]+ -2 6[xs]+" | sortcount -p
57.46	5xx -2 6xs
17.06	5xs -2 6xs
11.03	5xx -2 6xx 
9.23	5sx -2 6xs
4.74	5xs -2 6xx
0.49	5sx -2 6xx


The most common case for the "5 -2 6" module is for the two notes to attack together, then the bottom note drops a step while the top voice remains sustained (happening 57% of the time). The second most common cases is that the top note is sustained from a previous sonority while the lower voice is moving stepwise downwards through a fifth and then a sixth with the upper note. The third most common case occurs when both note are attack on both harmonic intervals of the module.



Lab 1 (intro) Lab 2 (Essen) Lab 3 (searching) Lab 4 (JRP) Lab 5 (Wikifonia) Lab 6 (bar chart) Lab 7 (regular expressions) Lab 8 (chorck & cint)