Difference between revisions of "Humdrum Lab 1"

From CCARH Wiki
Jump to navigation Jump to search
Line 53: Line 53:
  
  
=== Searching ====
+
=== Searching ===
 +
 
 +
Create a search index for the chorales:
 +
    tindex *.krn > chorales.index
 +
 
 +
Search for the melodic sequence "C D E F G A B C", counting how many times it occurs:
 +
    themax -p "cdefgabc" chorales.index | wc -l
 +
 
 +
To locate the pattern within the music:
 +
    themax -p "cdefgabc" chorales.index --loc | theloc
 +
which should return the result:
 +
  chor190.krn::1 58=10B2-65=11B3
 +
  chor325.krn::1 17=5B1-24=6B4
 +
 
 +
This means that the melodic pattern "cdefgabc" occurs in two chorales (190 and 325).  In both cases, the bass part (::1) has the pattern.  The pattern occurs from note 58 to 65 in the bass part to chorale 190 which is from measure 10 beat 2 until measure 11 beat 3.  Simiarly, the pattern occurs in the bass part of chorale 325 in measure 5 to 6.

Revision as of 17:54, 11 March 2014


Bach Chorales

Download

A Humdrum Edition of the Bach Chorales is available at http://kern.ccarh.org/browse?l=371chorales

The data files can be downloaded using the humcat and humsplit commands:

    mkdir chorales
    cd chorales
    humcat -s h://370chorales | humsplit

This should create 370 files in the format chor001.krn, chor002.krn, chor003.krn, etc.

MIDI rendering

Convert a particular chorale into a MIDI file with this command:

    hum2mid chor001.krn -o chor001.mid

Graphical Music Notation

Key

Each chorale is hand-labeled with a musical key. To generate a histogram of key designations in the chorales:

  extract -f 1 *.krn | grep '\*.*:' | sort | uniq -c | sort

Questions:

  1. What is the most common key?
  2. What is the most common major key?
  3. What is the most common minor key?
  4. What is the least common major key (other than zero counts)?
  5. What is the least common minor key (other than zero counts)?
  6. How many chorales are labeled as being in a modal key?


Vocal Range

To count all of the notes by pitch-class for each vocal part, use the prange command. Here is a sample command which extracts the bass part data:

  extract -f 1 *.krn | prange

or alternatively extracting by text pattern (Bass, Tenor, Alto, Soprano):

   extractx -g Bass *.krn | prange

For the bass part, the lowest note is CC (C2) and the highest note is e (E4), with a total vocal range of 28 semitones. The average (base-12) pitch is E- (E-flat 3), which is both the mean and median.

Do a similar vocal range analysis on the other three parts.

Questions:

  1. Which voice has the widest range?
  2. What is the highest and lowest note for each vocal part.


Searching

Create a search index for the chorales:

    tindex *.krn > chorales.index

Search for the melodic sequence "C D E F G A B C", counting how many times it occurs:

   themax -p "cdefgabc" chorales.index | wc -l

To locate the pattern within the music:

   themax -p "cdefgabc" chorales.index --loc | theloc

which should return the result:

  chor190.krn::1	58=10B2-65=11B3
  chor325.krn::1	17=5B1-24=6B4

This means that the melodic pattern "cdefgabc" occurs in two chorales (190 and 325). In both cases, the bass part (::1) has the pattern. The pattern occurs from note 58 to 65 in the bass part to chorale 190 which is from measure 10 beat 2 until measure 11 beat 3. Simiarly, the pattern occurs in the bass part of chorale 325 in measure 5 to 6.