SYNOPSIS
OPTIONS
DESCRIPTION
A counterpoint module consists of four notes as illustrated in the first measure of the musical example given below. A module contains two harmonic intervals (marked in blue) and two melodic intervals (marked in red) as highlighted in the second measure. Since any three of these intervals can be used to calculate the fourth, one of the intervals can be omitted from the description of the module without loss of information (as long as none of the four notes in the module are rests). Thus the number triple (10 -2 12) can serve as a compact description of the counterpoint module given in the following example:
Here is sample input and default output analysis data from the cint program related to the above musical example. The output data includes a **cint spine containing the counterpoint module in its reduced three-interval description.
To recover the missing melodic interval of the top part in the third measure, the following equation can be used: Mt = H2 - H1 + Mbwhere H1 is the first harmonic interval, H2 is the second harmonic interval, Mt is the top melodic interval, and Mb is the bottom melodic interval. In other words, the top horizontal (melodic) interval is equal to the second harmonic interval minus the first harmonic interval plus the bottom horizontal interval. For the above example: Mt = (12-1) - (10-1) + -(2-1) + 1 = 2The subtraction of one from each diatonic interval is needed for setting the offset of diatonic intervals at 0 rather than 1 in order to correctly add and subtract intervals (0 = unison, 1 = second, 2 = third, etc.). The +1 at the end of the calculation shifts the interval offset back to 1 (1 = unison, 2 = second, 3 = third, etc.). Likewise, here are the equations to calculate each of the other three intervals given three of the four counterpoint module intervals: H1 = H2 - Mt + Mb H2 = H2 + Mb - Mb Mb = H1 - H2 + Mt Interval selection and formattingBy default, counterpoint modules will be reported as a list of three intervals: the first harmonic interval followed by the bottom melodic interval and ending with the second harmonic interval. The -t option can be used to also include the top melodic interval of the module (which will be placed after the bottom melodic interval in the sequence).
The -T option can be used to display the top melodic interval of the counterpoint modules instead of the bottom melodic interval.
In addition, the -H option will suppress display of both harmonic intervals, and -M suppresses melodic intervals.
For increased distinction between the two types of intervals, the melodic interval(s) can be placed within curly braces by using the -y option. The -m option can alternatively be used to place an "m" marker after each melodic interval:
Harmonic intervals can also be enclosed in square brackets (see module latices described further below for more useful application of square brackets). Alternatively, the -h option can be used to add an "h" character after each harmonic interval.
The -c option can be used to separate intervals by commas rather than spaces:
Parentheses can be placed around the counterpoint module interval set by adding the -p option:
Raw module outputThe --raw option is used to output counterpoint interval modules without formatting into data spines, and without including the original music.
Voice crossings and restsWhen voices cross, harmonic intervals will be reported as negative intervals. The following counterpoint module is (10 6 -3) with the second harmonic interval being a third, but with the top voice sounding below the bottom voice. The module (10 6 -3) can be expressed as (10 4 3) if the two voices are "uncrossed" as shown in the third measure of the example below.
In the third measure of the above example, the bottom melodic interval changes from 6 to 4 when the voices are uncrossed: H2,new = -H2,old Mb,new = Mb,old + H2,oldCalculations have to be done on zero-offset intervals: H2,new = -((3-1) + 1) = 3 Mb,new = (6-1) + -(3-1) + 1 = 5 - 2 + 1 = 4 Use the -C option to uncross any harmonic intervals. Using this option will cause all harmonic intervals to be positive, but the role of parts within the module will be lost (bottom voice can and up in top of module). For example, the module (10 6 -3) would be converted into (10 4 3) as shown in the above example. Intervals between notes and rests in a contrapuntal module are labeled as "R" as illustrated in the following example. When a rest is present in the module, the implicit top melodic interval may be unrecoverable if the rest is in the bottom voice (see the -t option for including the top melodic interval in the module description). The -R option can be given to cint to suppress extraction of modules which contain rests.
Data organization with more than two partsCounterpoint modules consist of pairs of voices. When more than two voices are present in polyphonic music, the count of pairings will increase faster than the number of voices. For two voices, there is one sequence of modules; for three voices there are three sequences; four voices yield six module sequences; five voices yield 10 sequences, and so on. Data for multiple parts can be extracted in several different ways. The default is a combinatorial display of all possible two-part modules, but options for more compact form can also be calculated. Combinatorial listing of modulesBy default, the cint program will list all combinations of pair-wise counterpoint modules which can be created between the parts in the music. In the output Humdrum data, the pairing are placed next to the bottom (leftmost) voice, with one spine for each **kern spine to the right of the current spine. Below is an example when there are four parts. The bottom part will list three modules after it, describing the module between the bottom part and each of the parts above it (to the right in the Humdrum data). This process iterates for each part, such that a list of all modules created with parts to the current part's right will be listed next to the music for that part.
This data (with durations added) can be printed as music notation using the --verse option:
The modules are listed above the part that forms the bottom of the module, and each "verse" of numbers indicates the top voice. For example, the three modules listed above the bass part are the modules against the three higher parts, with (10 -2 13) for the soprano/bass module, (6 -2 8) for the alto/bass module, and (1 -2 3) for the tenor/bass module. Part selectionThe -k option can be used to specify which **kern spines are used to calculate counterpoint modules. For example, a four-part texture will usually generate six **cint analysis spines; however, using the option -k 1,3 will cause only a single analysis spine where the modules are calculated between the first and third **kern spines:
cin -k 1,3 input Module latticesMulti-voice modules can be encoded more compactly using the -l option to generate module lattices which are vertical chains of modules (see horizontal chains in the next section). Note that lattices will not be exactly equivalent to the combinatorial form discussed above. In the combinatorial form, no two harmonic interval notes can both be sustained notes; however, the lattice form of modules allows for two sustained harmonic notes since only one note attack in one part in the lattice is needed to trigger a harmonic event (while all other parts could be sustained). In the following example, the same musical example as above is displayed as a lattice rather than as individual modules. In this case, 6 numbers are needed to encode the individual 6 modules. Individual modules can be extracted from the lattice with interval arithmetic. For example, the module between the bass and the soprano parts (10 -2 13), can be calculated like this: H1,B-S = (1-1) + (6-1) + (5-1) + 1 = 10 Mb,B = -2 H2,B-S = (3-1) + (6-1) + (6-1) + 1 = 13 ∴ moduleB-S = (10 -2 13)
The default ordering of intervals in the lattice is time-wise, forming columns in the lattice. An alternate display by rows, giving a part-wise orientation to the lattice can be extracted by using the --rows option.
Interleaved lattice modulesA variant of module lattices related to the --rows display can be extracted by using the -L option. This option interleaves the modules found in the lattice between parts rather than as a single array of numbers. Here are equivalent forms of lattice data in a single array spine, and interleaved with the parts:
Module chainsCounterpoint modules can be linked together into chains of two or more modules. Each module is elided with the previous one by sharing a common harmonic interval. The -n option is used to indicate the length of the chain. By default, cint will extract single counter point modules. The following example show what would be extracted if "-n 2" is used to extract two successive modules at a time.
The second measure in the above example shows two counterpoint modules chained together. In this case the length-2 chain is (10 -2 12 2 8). Notice that the harmonic and melodic intervals in the chain alternate in the interval description of the chain. Each counterpoint module is elided with the next when the chain length is greater than 1. For example, the two modules (10 -2 12) and (12 2 8) are elided so that the harmonic interval of 12 is not repeated in the description.
Sustain/Attack descriptorsCounterpoint in real music often contains suspensions, passing tones, and other cases where the notes in the counterpoint pairings do not start notes in both parts at the same time. The following example show such a case where the top voice plays two notes while the bottom voice holds a single note.
Measure two of the above example shows how the music is segmented for analysis with counterpoint modules. A note attack in either voice will initiate a new module, so the above example contains two counterpoint modules (5 1 6) and (6 2 6). The -s option can be given in order to mark whether each note in the counterpoint module is attacked or sustained from a previous note attack. Measure 3 of the above example shows the interval descriptions of the modules. The postfix character "s" indicates a sustained note, and "x" indicates a note attack. For harmonic intervals, the first s/x character represents the attack state of the bottom note, while the second character represents the attack state of the top note. For melodic intervals, the first character is for the first note, and the second character is for the second note (in case you were thinking it was the other way around). The -S option can be used to mark intervals which contain at least one sustained note without marking note attacks. For the above example, using the -S option would generate the modules (5 1s 6s) and (6s 2s 6), or the module chain (5 1s 6s 2s 6). Which note in the interval is sustained is unspecified. The -x option is similar to the -s option, but the attack/sustain markers are only affixed to the harmonic intervals (the first and last numbers in a standard module). The --attack option can be used to enforce two constraints on the extracted counterpoint modules. First, it requires that both starting pitches in the modules are note attacks; and secondly, the ending pair of notes must also be note attacks. Thus if there are any sustained notes within the initial counterpoint module, subsequent modules will be chained to the first until a module ending in two simultaneous notes attacks is found. Here is an example:
In the case where --attack is used, the second and third modules are link into a chain of two modules. This causes the first harmonic interval in the chain (5) to contain two note attacks, and also the last two harmonic intervals (6). The intermediate harmonic intervals (the middle "6") contains one sustained and one attacked note. To construct a module which extends through the intermediate sustained note, just add all of the melodic intervals together: (1 - 1) + (2 - 1) + 1 = 2Thus, the counterpoint module which ignores the intermediate harmonic interval caused by a sustain and attack on F and d is (5 2 6).
Rhythmic descriptorsChromatic intervals and interval description variantsZero-offset diatonic intervalsMusicians prefer to see diatonic intervals displayed with an offset starting at 1 for a unison. This means that "2" represents an interval of a second, 3 for thirds, and so on. However, when doing arithmetic manipulation of intervals, zero-offset intervals are more convenient to work with. This would mean that 0 = unison, 1 = second, 2 = third, and so on. To display diatonic intervals with a zero offset, use the -z option:
Base-40 interval descriptionsBase-40 is a method of encoding diatonic pitches as integers with chromatic alterations up to double sharps or flats. The base-40 chroma for pitches can be built up from the property that a minor second is a difference of 5 between pitch numbers in the base-40 system, and major seconds are a difference of 6. The C chroma value is set to the value 2 rather than 0 so that the octave values for C♭ and C♭♭ remain in the same octave as C♮ just above these pitches when using division by the base to extract the octave number. Here is a complete table of the base-40 chroma, using C=2 as the reference:
To calculate an absolute pitch such as G4 (The G above middle C), multiply the octave by 40 and add the chroma value for the G pitch-class: Note that base-40 pitch representations preserve chromatic alterations of diatonic pitch-classes (up to double sharps/flats). Therefore F♯4 (180) is not in the same as the base-40 pitch G♭4 (184). A useful property of the base-40 system is that the difference between pitch numbers in the base-40 system represent one-to-one mappings with diatonic intervals:
Octave reduction of harmonic intervalsWide intervals larger than an octave can be reduce to be within an octave by using the -o option. This will reduce the smallest vertical interval in the module (or module chain) so that it occurs less than an octave above the bottom note, and the top part will not cross under the bottom part. The highest harmonic interval in the module may exceed an octave since both upper notes will be transposed by the same octave amount.
Module pitchesThe --pitches option can be used to display the underlying pitch grid used to calculate counterpoint modules. Here is some sample music to extract a pitch grid from:
The --pitches option will extract only the pitch information from the parts, and only the first pitch in each spine of the part. The sonorities (harmonic slices) are preserved in the same style as the original Humdrum file. Sustained pitches across multiple sonorities are indicated in the same manner as ties in **kern data, using "_" (underscores) for intermediate tied notes, and "[" and "]" for starting and ending ties.
The options -7 (base-7, diatonic pitches), --12 (base-12, twelve-tone, MIDI pitches), or --40 (base-40 pitches) can be used in conjunction with the --pitches option to extract pitches into one of those three alternate numeric representations of pitch.
Note that base-40 pitch enumerations can be converted into either base-7 or base-12, but the other two representations are exclusive and cannot map onto each other. Rhythmic information about each row of notes can be added to the data by including the -r option when using the --pitches option:
The first column labeled **absq is the "absolute quarter note duration" location of each line in the file. In other words, if the column as a value 6.5, that means the notes on that line occur 6.5 quarter note durations after the start of the music. The **bar column indicates the measure number in which the notes occur, and **beat indicates the beat number within the music on which the notes occur. The beat is defined by the bottom number in the time signature, with compound meters such as 6/8 being assigned a beat of a dotted quarter note. Module searchingThe --search option can be used to search for modules or fragments of modules. The option is followed by a regular expression which is compared against constructed module strings. Below is an example search result for the module chain "7xs 1 6 sx -2 8xx". Any notes which form a module that matches to the search query will be marked with an "@" sign. These marks can be used to highlight notes in graphic notation of the music.
myank -m 7-8 jrp://Bus1001a | cint --search "7xs 1 6sx -2 8xx" -x -n 2 Note that the search string "7xs 1 6sx -2 8xx" contains note-attack letters ("s" and "x"). When searching for note-attack information, the -x option must also be include. In other words, searching is done with the requested formatting of the search module strings. Also note that this search string contains a chain of two modules, so the -n 2 option is also required (or the chain length can be larger than 2).
When the --count option is given while searching, only a count of the number of module patterns found matching the search query will be returned. The -f option can also be given to cause note counts to be output for each file or data segment as well as the total count. Here is an example of search for the "7xs 1 6sx -2 8xx" suspension in J.S. Bach chorales and the music of Josquin des Prez:
In other words, the "7xs 1 6sx -2 8xx" suspension occurs infrequently in the chorales of J.S. Bach, but more often in the music of Josquin. To calculate the feature density in both repertories in order to do a better direct comparison:
Suspension markingThe --suspensions option is a special-purpose option that searches music for suspensions between pairs of voices. If the --mark option is used, the notes in the matching modules will be marked with the user-signifier "@", and the marked music can be printed with the marks highlighted. Here is an example: Here is a list of some suspensions which will be searched for when the --suspensions option is used (also using -x to attach note attack states to harmonic intervals, and using a chain length of two or more):
Module note markingThe -N option is used to add markers to counterpoint modules when a particular character is found in the **kern token for notes. User-definable characters in **kern tokens include: i, j, l, N, V, Z, @, @, +, |, <, and >. When the -N is used, any marker character found on any note in the score will be prefixed to the counterpoint module.
Note ID trackingThe --id option can be used to include more detailed note information within counterpoint modules. When this option is turned on, note ids will be extracted from local comments preceeding the note. The comment will have this form:!ID:#where # is a unique integer value serving as a serial number for the note/rest.
EXAMPLESBach chorale counterpoint interval modulesShowing top 20 modulesThe following command pipeline shows the 20 most common counterpoint interval modules in 370 J.S. Bach Chorales. For example the most common module is (5 -2 6) at 2.33% of all modules extracted from the Bach chorales. The module (5 -2 6) meaning that a pair of voices form a harmonic interval of a 5th followed by a 6th, with the bottom part performing a falling second between these two harmonic intervals (and the top melodic interval implicitly being a unison).
The --raw option is used to output a listing of all modules without any Humdrum spine structure or echoing of input music. The sortcount script collates the raw data extracted by cint, with the -p option causing sortcount to display counts as percentages. If the --raw option were not used, the formatting and input music could alternatively be stripped using this command pipeline: For better readability of modules, the fourth interval (the top melodic interval) can be added with the -t option, and the -y option can be used to enclose the two melodic intervals in curly braces for better readability:
The module (5 {-2 1} 6) can be displayed graphically as shown below. There are two pairs of notes in the module: the first pair form a 5th harmonic interval, and the second pair forms a 6th harmonic interval. The bottom note moves down a step while the top note says on the same pitch: Adding attack/sustain informationThe above analysis finds that (5 -2 6) is the most common module in the Bach chorales. Now, with what sort of attack/sustain configuration does this module occur? A more refined analysis will keep track of whether or not the notes in the module are note attacks or note sustains. To do this with the cint program, use the -x option to mark attack/sustain states of notes as the letters "x" for note attacks, and "s" for note sustains. The first letter describes the state of the note in the bottom part, while the second letter describes the state of the note in the top part. For example "sx" means that the bottom note is sustained (from a previous module) while the top note is attacked at this harmonic interval. The harmonic intervals can be termed hard if both notes are attacked ("xx"), or soft if only one is attacked while the other is sustained ("sx" or "xs").
When considering attack/sustain states for the four notes of the module, the most common module is now (10xx 2 10xx) which in musical terms is a parallel tenth moving upwards, with all four notes of the module being attacked. For the (5 -2 6) module, the most common attack/sustain type is (5xx -2 6xs) which means that the two notes are attacked at the start of the module, and then bottom note moves down a step while the top note sustains. Here are all cases of (5 -2 6) present in the Bach chorales along with their relative frequencies, extracted with this command pipeline:
Chromatic qualifiersBy default the cint program outputs module intervals as purely diatonic intervals, such as 2 for seconds, 3 for thirds, etc. To add chromatic qualifiers to the intervals, use the --chromatic option. This will allow distinguishing related diatonic intervals such as m3 for minor thirds and M3 for major thirds.
The most common module is (p5xx {-M2 p1} M6xs), which is a hard perfect 5th going to a soft major 6th, with the bottom part falling a major second and the top part remaining on the same pitch. Extracting the module (5 -2 6), while keeping track of sustain/attack states as well as chromatic alterations:
| egrep -i "[mpad]5[sx]+ -[mpad]2 [mpad]6[sx]+" | sortcount -p | head -n 20
Module densities by vocal partBelow are the top module categories for each paring of Soprano, Alto, Tenor and Bass. Here is an example command pipeline to extract Soprano–Bass pairings. Note that the -o option is used to transpose modules to be within a harmonic interval octave (such as re-categorizing 12ths as 5ths).
The most common module between Sopranos and Tenors is a parallel 6th falling by a second. For Alto/Bass and Tenor/Bass, the most common module is a parallel 3rd rising by a second. Alto/Bass has the greatest module diversity, while Alto/Tenor has the least. The Alto/Tenor pairing is more likely to contain a harmonic interval of a 4th (probably indicating that triad tonics are more likely in the Alto while the Tenor is playing a fifth). Early Renaissance counterpoint interval modulesThe most common counterpoint interval modules in the music of Josquin des Prez:
The most common module is a module starting with a 6th going to an octave in contrary motion, with the bottom note of the 6th interval sustained from an earlier sonority. The most common counterpoint interval modules in the music of Johannes Ockeghem:
Comparing the two composers, both share their most common module of (6sx -2 8xx), as well as their second most common module of (3xx 2 3xx) (parallel 3rds rising stepwise). Parallel intervalsParallel 5thsHow many parallel 5ths exist in the J.S. Bach chorales? cint h://370chorales --chromatic -Uo --raw | grep "^p5.*p5$" | sortcount -t The -U option is used to filter cases where a parallel 5th is played on repeated notes (which is a repeated 5th, not a parallel 5th). The -o option is used to count parallel 12ths (one octave + a 5th) as a parallel 5th. Compare to Josquin and Ockghem works:
Overall density of parallel fifths in the three repertories:
The density of parallel 5ths decreases from 0.21% for Ockeghem to 0.11% for Josquin to 0.02% for J.S. Bach chorales. This ordering is also chronological... Parallel 6thsHere is a similar analysis comparing parallel 6ths densities between the same repertories:
Commands to extract the data for the above table (the -U option is used to suppress modules which contain melodic unisons):
Ockeghem has the most restricted set of melodic motions for the parallel 6ths. 91% of Ockeghem's parallel 6ths are stepwise, and most of the rest are by falling thirds. Ockeghem has more parallel 6ths rising by a second; while Josquin's and Bach's most common parallel 6th motion is falling by a second. Densities of parallel 6ths in each repertory:
Contrary v Similar motionHere is an example of how to examine contrary versus similar motion in counterpoint interval modules. Use the -H option to exclude harmonic intervals from the module, and use -t to include the top melodic interval in the module. repeated notes in either voice of the module are filtered out in this analysis using the -U option of cint. Also grep is used to exclude modules containing soft harmonic intervals. After modules with soft harmonic intervals are removed, chromatic alterations of the diatonic notes are stripped with the sed command.cint h://370chorales -RUHts --raw --chromatic | grep -v "s" | sed 's/[mpadsx]//gi' | sortcount -p | head -n 20 cint h://jrp/Jos -RUHts --raw --chromatic | grep -v "s" | sed 's/[mpadsx]//gi' | sortcount -p | head -n 20 cint h://jrp/Ock -RUHts --raw --chromatic | grep -v "s" | sed 's/[mpadsx]//gi' | sortcount -p | head -n 20
Here is a breakdown of contrary and similar motion modules for three repertories. The music of Josquin and Ockeghem have nearly equal amounts contrary and similar motion modules. Bach chorales show a preference for similar motion, with a preference for upward similar motion.
Suspension formula counts in various repertoriesSuspension formulas can be extracted from music by using the --suspensions option of cint. Note that cint will not try to find all suspensions (or counterpoint modules) in music with sub-spines or chords (this applies in particular to piano music). However, vocal music and nearly all instruments other than piano should work well. The --raw option is used in conjunction with --suspensions so that the formula for each identified suspension will be listed. These can then be sorted and counted as in the following tables. You can use the note counts underneath each table to estimate the density of suspensions in each repertory for better direct comparisons.Works of Johannes Ockeghem:
notecount -R h://jrp/Ock 80,982 Works of Josquin des Prez:
notecount: 438,031 Works of Pierre de la Rue:
notecount: 213,873 Works of Mabrianus de Orto:
notecount: 45,433 Masses of Giovanni Pierluigi da Palestrina:
notecount: 671,091 370 Chorales of J.S. Bach:
notecount: 84,666 Brandenburg concertos of J.S. Bach:
notecount: 103,745 WTC fugues of J.S. Bach:
notecount: 50,961 London Symphonies of Joseph Haydn:
notecount: 201,236 String quartets of Joseph Haydn:
notecount: 338,373 String quartets of Wolfgang Amadeus Mozart:
notecount: 151,727 String quartets of Ludwig van Beethoven:
notecount: 234,098 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 SEE ALSOLIMITATIONS
DOWNLOAD
The source code for the program was last modified on 19 Sep 2013. Click here to go to the full source-code download page. |