This file is maintained by David Huron, with input from Tim Racinsky, Kyle Dawkins, and Jasba Simpson. Updated copies of this file are available by sending a request to: dhuron@watserv1.uwaterloo.ca Comments and suggestions are welcome.
File last revised 1994/8/12.
INDEX:
Humdrum is a set of general-purpose software tools intended to assist music researchers in posing and answering research questions. Humdrum allows researchers to encode, manipulate, and output a wide variety of musically-pertinent representations. The emphasis is on posing and answering questions about music.
Humdrum is not (1) a MIDI sequencer, (2) a music printing package, or (3) a computer sound synthesis language.
Humdrum allows users to pose and answer questions such as the following:
"Humdrum" is actually two things: (1) the `Humdrum Syntax' and (2) the `Humdrum Toolkit'.
The "Humdrum Syntax" is a grammar for representing sequential symbolic information using ASCII data. Note that "Humdrum" is not a representation scheme in the conventional sense -- like DARMS. Humdrum is a *syntax* within which an endless number of representation schemes can be defined. Theoretically, any type of sequential symbolic data may be accommodated -- such as square no- tation, Schenkerian graphs, piano fingerings, changes of emotional states, MIDI data, acoustic spectra, North Indian tabla bols, ballet steps, concurrent television schedules, or industrial chemical processes.
The "Humdrum Toolkit" is a set of more than 60 inter-related software tools. These general-purpose tools manipulate ASCII data conforming to the Humdrum Syntax. If the ASCII data represents music-related information, then we can say that the Humdrum Tools manipulate music-related information.
Humdrum's capabilities are quite abstract, and so it is difficult to characterize precisely what Humdrum can do.
Humdrum can encode information in various forms, such as French lute tablatures, conducting gestures, or structural relationships. It can transform, classify, coordinate, transfer, restructure, contextualize, and otherwise manipulate both pre-defined and user- defined information.
Humdrum can be used to search for a mind-boggling variety of types of patterns. It is able to characterize the similarity between various types of information according to user-defined criteria of similarity.
Further concrete examples of Humdrum's capabilities are given following a few more preliminary questions.
Humdrum will be of potential benefit to anyone wishing to pursue systematic investigations of musical information. This includes the posing of "factual" questions about music, and the testing of hypotheses about musical organization.
In short, Humdrum may prove valuable to music theorists, music analysts, ethnomusicologists, historical musicologists, psycho- musicologists, music librarians, dance scholars, linguists, and others.
Humdrum is less well suited to individuals involved in creative (i.e. generative) musical activities -- such as composition, conducting, or performance. However, Humdrum is well suited to *studying* compositions, conducting, performances ...
Humdrum was designed for the UNIX operating system. It also runs under DOS and OS/2 -- provided basic UNIX commands are available. For example, Humdrum runs on DOS systems that have installed the `MKS' UNIX utilities.
Humdrum does not currently work on APPLE systems, since UNIX utilities are essential. Theoretically, Humdrum should run under APPLE's A/UX system, but no one has tried this yet.
Yes. Linux users must ensure that the "getopts" function has been installed as a part of the "bash" shell. Currently, the Humdrum MIDI software is unavailable under Linux.
The Humdrum Toolkit is being distributed by the Center for Computer Assisted Research in the Humanities (CCARH), in Menlo Park, CA. It is also be available via "anonymous ftp."
The Humdrum Toolkit is available at:
archive.uwaterloo.caOn internet type:
ftp> open archive.uwaterloo.ca (establishes link to ftp site)
[login according to prompt] (login to ftp remote host; specify
"anonymous" or "ftp" as the login name;
use your own login name as password)
ftp> cd uw-data/humdrum (change directories to Humdrum archive)
ftp> mget * (download all files)
ftp> bye (logout and end link to ftp site)
If you are downloading directly to floppy disks, you will need
three (empty) 1.4 megabyte DOS-formatted disks. Copy the file `hum.2'
to a disk designated `disk 2'. Copy the file `hum.3' to a disk
designated `disk 3'. Copy all other files to a disk designated `disk 1'.
(The local install procedure will be initiated from `disk 1'.)It is essential to read the Humdrum Toolkit Installation Guide.
For users who have downloaded Humdrum from the FTP site, the file "install.txt" contains a complete ASCII text of the Installation Guide. If you have access to a postscript printer, it is preferable to print the entire installation guide (16 pages) from the FTP file "install.ps".
For users who have ordered disks by mail, the distribution disks are accompanied by a printed Installation Guide.
It is expected that printed documentation and disks will be available soon from:
Center for Computer Assisted Research
in the Humanities,
525 Middlefield Road, Suite 120
Menlo Park, California 94025
Pricing information and availability inquiries may be addressed to:
Tel. (415) 322-3307 (Do not telephone prior to September 1, 1994).return to index
The Humdrum Toolkit is being distributed on a non-profit basis. The software itself is "free" -- but remains protected by copyright. If you order Humdrum by mail, you will be asked to pay for the cost of the disks, documentation, and mailing. On FTP the software is free.
Any serious user will want to have copies of the printed docu- mentation and installation guide. The documentation is also available as postscript files on FTP, and can be printed on a local postscript printer. The documentation entails about 570 pages of material.
Although the Humdrum Toolkit is nominally "free" -- copies of Humdrum must be REGISTERED in order to be legal. See below.
The purpose of user registration is to provide evidence to granting agencies that Humdrum is being used by the scholarly community. User registration helps to assure future funding for software development and user support.
The FTP site provides information concerning registration. New users can submit an e-mail registration form. Once your registration form is received, you will be sent a serial number for your copy.
The size of Release 1.0 is about 4 megabytes when uncompressed. This does not include printable postscript files for the manuals which may be downloaded via FTP. The postscript manual files may contain another 3 megabyes of data.
The Humdrum Toolkit includes some 60 software tools, demonstration software, a selection of about 150 musical scores, an Installation Guide, and a Reference Manual.
The Humdrum Toolkit Reference Manual provides technical descriptions of representation formats, file organizations, command invocations, options, and other features or Release 1.0. The documentation includes sections on:
Yes.
About 15% of the code is written in C, another 15% in kornshell, and about 2% using the LEX lexical parser and YACC compiler-compiler. The bulk of the code is in AWK. (The development time for AWK programs is about one-tenth of the time required to develop comparable C programs.) C is used for tools that have special I/O requirements and to accelerate some computationally intensive tools.
The question is mal-formed. Humdrum doesn't dictate how to represent such things as a quarter-note. Remember, that Humdrum is a *syntax* within which representations can be defined. Users are free to use whatever string of characters they want in order represent a quarter-note. The only restriction is that the representation must conform to the Humdrum Syntax.
Actually, there are a large number of pre-defined representations each conforming to the Humdrum Syntax. Users aren't required to use these pre-existing representations, but they are generally more convenient than starting from scratch. Think of these pre- defined representations as analogous to macro packages.,p> Each representation conforming to the Humdrum Syntax is given a unique name, preceded by two asterisks. For example, "**freq" is a pre-defined representation used to represent frequency; "**pcset" is a pre-defined representation used to represent pitch-class sets; "**cocho" is a pre-defined representation used to represent cochlear coordinates. There are lots of these pre- defined representations.
To answer the previous question: in the "**recip" representation, quarter-notes are represented by the ASCII numeral "4" (the reciprocal of the American duration names). But remember, HUMDRUM, does not require you to represent quarter-notes this way. Only the "**recip" representation requires this. If you prefer "crotchet" to "quarter note", Humdrum obliges.
Still not catching on. There are an infinite number of ways of representing a piece in the Humdrum format -- it depends on what sort of information the user is interested in. Some users will be interested in stem-direction and size of note-heads. Other users will be interested in representing the heart-rate of listeners.
For example, here is an encoding of a complete sonata-allegro movement that conforms to the Humdrum syntax:
**form Introduction Exposition Development Recapitulation Coda *-
Currently, the most commonly used Humdrum representation is **kern. **kern is a core pitch/duration representation. Below is a **kern representation showing the beginning of "Happy Birthday." In addition, we've represented the lyrics as well:
**kern **lyrics 8.g Hap- 16g py 4a birth- 4g day 4cc to 2b you. 8.g Hap- 16g py 4a birth- 4g day 4dd to 2cc you. *- *-Note the following: Time moves down the page. Data are arranged in columns (called "spines") beginning with a keyword (e.g. **kern) indicating the type of representation. Data are terminated by a "spine-path terminator" (*-). Each line represents concurrent activities across all spines. Spines are separated by tabs. In the case of **kern, durations are represented by the reciprocal numbers of the American designations (4=quarter, 2=half; 8.=dotted-eighth). Pitches are represented by letter names (a-g and A-G). Lower-case letters indicate pitches above (and including) middle C; upper-case letters indicate pitches below middle C. Letters are repeated (e.g. "cc" or "CC") for each successive octave distance from middle C. Although not shown in the above example, **kern is also able to represent rests, ties, phrases, slurs, keys, key signatures, meter signatures, keys, accidentals, articulation marks, stem directions, beaming, barlines, and ornaments.
The following example shows the first and last two measures for Fugue 20 from the Well-Tempered Clavier Vol. II:
!! J.S. Bach, WTC Book II, Fugue 20; BWV 889b **kern **kern **kern *k[] *k[] *k[] *a: *a: *a: *M4/4 *M4/4 *M4/4 *t72 *t72 *t72 =1 =1 =1 4r 1r 1r 4e . . 4c . . 4f . . =2 =2 =2 4G# 1r 1r 4r . . 8r . . 8d . . 8B . . 8e . . !! Continuing measure 27: =27 =27 =27 8r 8E 8r 8Dn 8r 32r . . 32e . . 32f# . . 32g# 8BB 4r 8.g#T 8E . . . . 32f# . . 32g# 8C 8r [2a 8AA 32r . . 32B . . 32c . . 32d . 8EE 8.c#T . 8GG . . . 32B . . 32c# . =28 =28 =28 32FF 8d 8a] 32EE . . 8DD . . . 8f 8b 32EE . . 32FF . . 8.EET 8G# 8e . 8B 8g# 32DD . . 32EE . . 2AAA; 2AA; 2c; 2e; 2a; ====== ====== ====== *- *- *-Lines beginning with a double exclamation mark are "global comments" and pertain to all spines. ("Local comments" pertain to single columns or spines.) Following the "exclusive interpretation" (**kern), several "tandem interpretations" specify the key-signature (*k[]), the key (*a:), the meter signature (*M4/4), and the tempo (*t72). Barlines are indicated by an equals-sign. Rests are indi- cated by the lower-case letter `r'. Columns of data (spines) are separated by tabs. In this case, each spine represents a different musical part or voice. Parts are ordered from left-to right with the lowest voice in the left-hand spine. In the final chord, double- stops (two pitches) are evident in the lower two voices. When only one voice is active, the other voices encode "null tokens" (.) as place holders. The file is structured like a score turned sideways. Trills are designated by the upper-case `T'; tied notes are designed by square brackets; pauses are indicated by the semicolon.
Remember, we have highlighted only the **kern representation. This is only one of a (potentially infinite) number of representations consistent with the Humdrum Syntax.
There are currently independent pre-defined representations for such data as: pitch, frequency, MIDI, cents, semitones, pitch-class, German Tonhoene, French solfege, chroma, absolute and relative scale degree, fretted-instrument tablatures, figured bass, functional harmony, embellishment tones, melodic accent, harmonic and melodic intervals, sensory dissonance, dates, elapsed duration, time-spans, metric position, sequential event ordering, canonical note durations, metric syncopation, beat-position, time, rhythmic prototypes, parametric and non-parametric similarity, sound pressure level, relative amplitude, spectral content, spectral centroid, dynamics, pitch-class set, normal form, interval vectors, textual underlay, plus many others.
Remember that Humdrum embodies an unbounded *class* of representation schemes. Users are free to concoct their own task-specific representations -- such as a scheme to represent Telugu notation or Dagomba dance. Humdrum representations may be very highly crafted, or they may be invented in a matter of seconds. It is common to generate "throw-away" representations that are used only for a single research task.
There are currently about 2,500 encoded works consistent with the Humdrum syntax -- mostly in the **kern representation.
Gregorian chant, school of Notre Dame polyphony, vocal works by Machaut, Morley, Dunstable, Power, Schubert, Brahms, Weber, Foster. Traditional British folk ballads, American folk organum, Barbershop quartets, hymns; instrumental works by JC Bach, JS Bach, WF Bach, Beethoven, Brahms, Buxtehude, Chopin, Clementi, David, Debussy, Dvorak, Fischer, Franck, Frescobaldi, Froberger, Gabrieli, Granados, Grieg, Handel, Haydn, Liszt, Mattheson, Mendelssohn, Merulo, Mozart, Nielsen, Pachelbel, Reger, Scheidt, Schoenberg, Schubert, Schumann, Sibelius, Sweelinck, Telemann.
Non-western music from Bali, Burma, Cameroon, Caucacus, China, Columbia, Japan, Korean, Tahiti, Thailand, and from Pondo, Venda, Xhosa, and Zulu cultures.
No. Some of the encoded data is proprietary or restricted by copyright and so is not likely to be released in the near future.
The Center for Computer Assisted Research in the Humanities (CCARH) has encoded very large databases of musical score information. These "MuseData" (TM) databases represent a major resource for music scholarship. CCARH plans to make these databases available to music scholars at a modest price in the near future. The databases will be available in the Humdrum **kern format (as well as in the DARMS, SCORE, and MIDI formats). For further information contact:
Center for Computer Assisted Research
in the Humanities,
525 Middlefield Road, Suite 120
Menlo Park, California 94025
return to indexNearly all Humdrum commands accept some Humdrum input(s) and produce some corresponding Humdrum output. This means that information can be processed through a series of successive Humdrum commands.
Here are some examples of simple Humdrum pipelines.
The following command extracts all woodwind parts from the file "ives":
extract -i '*ICww' ivesThe following command outputs the line numbers for all sonorities in the file "machaut" where the leading-tone has been doubled:
deg -x machaut | grep -n '7.*7'The following commands identify all phrase-endings in the file "wagner" that are approached by a descending semitone:
semits -xt wagner | fill > temp
assemble wagner temp | grep -n '}.*-1[^0-9]'
A common musicological task is searching for various patterns.
The `patt' and `pattern' commands accept a user-specified
template file such as the following:
P5
P5
Given the above two-line file ("template"), the following command will
identify all instances of parallel fifths between the bass and alto
parts for the file "caccini":
extract -i '*bass,*alto' caccini | hint -c | pattern -s = -f templateGiven the following three-line "template" file:
=
.* +
sus
... the following command outputs the measure numbers where
suspensions are found in the file "bwv552":
extract -i '**embel' bwv552 | patt -e -f template | grep '='The following command produces an inventory of all pitch-class sets evident for successive vertical sonorities in the file "opus24". In this case, only Z-related sets are requested in the inventory:
pc opus24 | fill -s = | pcset | grep 'Z' | sort | uniqThe following script command finds all instances of 12-tone rows in Webern's Opus 24:
matrix -n 12 prime
rowfind opus24
The following command outputs the final two measures for all works
in the current directory; the output is played as a MIDI output.
yank -o ^= '$-1-$' * | midi | performThese examples barely scratch the surface of Humdrum's capabilities.
Yes. There are innumerable ways of defining a "theme" or "motif." Typically, motives are thought of as pitch/duration patterns. However, motivic instances typically appear at different pitch heights, in transpositions, different modes, in augmentation, and so on. Hence, a motif might be better defined as an interval/duration pattern, or as an interval/relative-duration pattern, or as a diatonic interval pattern, a pitch-contour pattern, a metric pattern, etc. Searching for any such patterns is trivial using Humdrum.
Humdrum also allows the user to constrain pattern searches by looking for combinations of information. For example, the user might seek only those pitch patterns that exhibit certain sequences of articulation marks, are anchored in some specified way to a phrase boundary, and/or are accompanied by certain harmonies.
Pattern searches need not be melodically oriented (horizontal search). Searches can also be vertical, or even diagonal (e.g. a Klangfarben- melodie -- a melody that traverses between several instruments). Patterns may also be combinations of horizontal, vertical, and diagonal. For example, find all instances of a lowered seventh based a sub- dominant root approaching a V chord, when the oboe and bassoon are playing, but not at the beginning of a phrase.
In addition to exact pattern matches, Humdrum provides tools that allow matches with passages that are *similar* but not identical to the sought pattern. Patterns can be sought in which embellishments have been added to specified structural elements. Patterns of patterns, and patterns of patterns of patterns can be studied.
Yes. Humdrum can important MIDI data via the `record' and `encode' commands. `Record' allows the recording of raw MIDI data in the Humdrum format. `Encode' permits the user to map real-time MIDI activity to any user-defined Humdrum representation.
Humdrum can export MIDI data via the `smf' and `perform' commands. `smf' is used to generate Standard Midi Files which can be imported to other applications software -- such as MIDI sequencers or nota- tion packages. The `perform' command plays Humdrum-format MIDI information in real-time.
In order to use the Humdrum MIDI capabilities, you must have access to an MPU-401 compatible MIDI card. Currently, the Humdrum MIDI tools only work under DOS.
Not currently. Programs to do automatic functional analysis are not sufficiently reliable to be used in music scholarship.
Humdrum is unable to print musical scores. Existing commercial software is better suited to this task. It is hoped that a future release of Humdrum will be better able to communicate data to commercial printing programs.
Although Humdrum might be used in high-level aspects of composition, Humdrum is not well suited to very low-level acoustical (sound-function) manipulations common in electroacoustic music.
Remember that Humdrum's emphasis is on *posing* and *answering* research questions rather than *displaying* or *formatting* information. Suitable questions might be theoretical, analytic, historical, ethnographic, stylistic, perceptual, cognitive, or whatever.
No. Graphic user interfaces have the important virtue of being self-documenting. However, in SOFTWARE TOOLS applications, it is difficult to design a graphic user interface that matches the efficiency and generality of command-line pipelining.
Humdrum is rooted in the UNIX "software tools" design philosophy. That is, each tool in the toolkit carries out a simple operation. However, by interconnecting the tools, the capacity for music processing is legion. In essence, assembling Humdrum command lines amounts to a form of computer programming. Learning Humdrum is comparable in complexity to learning pascal, perl, or kornshell programming.
Users who understand the concept of a UNIX pipeline, will readily grasp how Humdrum works. Users who are familiar only with menu-driven software will find Humdrum difficult to learn.
The principal reasons for using computers in music scholarship are the following:
Understanding UNIX is an essential pre-requisite to the lucid use of Humdrum. If you do not have access to a UNIX system, you can purchase a set of commercial UNIX utilities that will operate on your DOS machine. The recommended utilities are available in the "MKS Toolkit" -- which you can purchase in most university computer stores. (In the case of Windows NT, Humdrum should also work under Consensys Corporation's "Portage".)
The essential foundation for using Humdrum includes:
Note that Microsoft "edit" (comes with DOS) is unsuitable for Humdrum since it insists on replacing ASCII tabs by spaces.
A 50-minute VHS videotape is available that demonstrates many of the types of manipulations that can be carried out using the Humdrum Toolkit. The videotape is available in the North American NTSC format only, and is distributed at cost. Contact Humdrum Research Software (see address below).
Humdrum was designed and originally programmed by David Huron at the University of Waterloo. The Humdrum Toolkit was extensively revised and augmented with the assistance of Tim Racinsky, Kyle Dawkins, and Jasba Simpson.
Both snail-mail and e-mail mailing lists are maintained. You can receive direct information concerning Humdrum by sending your name, address, and e-mail address to dhuron@watserv1.uwaterloo.ca
If you are reading this document in printed form and have no access to electronic mail, you can send the above information to:
Humdrum Research Software
Conrad Grebel College
University of Waterloo
Waterloo, Ontario
Canada N2L 3G6
return to index