Humdrum Lab 1

From CCARH Wiki
Revision as of 17:27, 11 March 2014 by Craig (talk | contribs) (→‎Key)
Jump to navigation Jump to search


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
  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?